Forward calls to the SIP trunk
This guide walks you through the process of initializing the call via the SIP trunk. The setup consists of three primary steps:
- Create the call
- Forward call to SIP Trunk
Final Step: Initializing the call
Creating the call
Endpoint:
POST /v2/prepare_inbound
Headers:
Request Body
Response Format
synthflow_call_id This is the call ID that should be sent to the SIP trunk via the X-EI header.
call_status Indicates the status of the call. A value of registered means that SynthFlow is operational, while failed indicates a service outage.
Forward call to SIP Trunk
After the call is created on SynthFlow, redirect Twilio calls to it using TwiML commands. Make sure to include the received synthflow_call_id
in the SIP headers using the X-EI
key, formatted as follows:
X-EI=S.synthflow_call_id
;
Regex pattern: (S|E)\.([^\;]+);
Here’s a code snippet for redirecting a call:
Note: The transfer call will work the same as before.