Project translated automatically.
Log in
or
register,
to view the original
Call SIP Routing Logic for Retell AI + Jambonz.cloud (Dynamic Number Replacement) Brief Description
I have built (already ready) an outbound calling system using Retell AI. The flow works as follows:
n8n initiates a call to Retell
Retell makes the call through Jambonz.cloud (important: this is a cloud application, not a self-hosted instance)
Jambonz then sends the call to the local telecom operator
Jambonz is needed because Retell uses elastic SIP trunking, while the local operator does not
Now I need to add additional routing logic between Jambonz and the operator:
What Needs to Be Implemented
1. Dynamic Call Routing Based on Metadata
Retell can pass a custom SIP header with metadata
For one specific destination number, it is necessary to:
extract the target number from this metadata
replace the original dialed number with the extracted one
then perform the usual call routing
All other calls should go through unchanged
2. Additional Conditional Rule
If a certain tag is present in the metadata:
the number replacement should be as follows: prefix (from metadata) + original subscriber number
Current Configuration
Outbound Assistant Retell AI
Jambonz.cloud
Local SIP Operator (not elastic)
What Is Required from You
Analyze the current architecture and advise where it is better to implement the logic: through Jambonz (task, hook, app) or through a separate webhook server
Implement a simple handler (Node.js or Python) that:
accepts SIP headers
applies routing and number replacement rules
returns the updated destination number
Ensure that this logic applies only to one specific number, while all other calls go through unchanged
Required Skills
Strong experience with Jambonz (preferably cloud version)
SIP telephony, SIP headers, routing logic
Webhook/API development (Node.js or Python)
Experience integrating with Retell AI will be a plus