Dial to the SIP endpoint
In scenarios where your telephony provider does not offer elastic SIP trunking or if you have a more complex telephony setup unsuitable for elastic SIP trunking, you can use direct SIP dialing to our endpoint.
In this scenario, Synthflow does not directly place or receive calls. Rather, your telephony system manages the dialing process to connect with the specified SIP endpoint. You will need to develop the integration logic tailored to your telephony provider’s requirements. From Synthflow’s standpoint, all call interactions will be treated as incoming, so your integration must explicitly define call direction handling.
Creating a V2 agent via API
Follow these steps to create a V2 agent using the SynthFlow API. The process involves two main steps:
- Creating a custom phone number
- Creating the agent and linking it to the phone number
1. Create a Custom Phone Number
Endpoint:
POST /v2/custom-numbers
Headers:
Body:
trunk_username
andtrunk_pwd
are optional fields.
2. Create a V2 agent
This call creates a V2 agent and binds it to the previously created phone number.
Make sure the phone number is created before calling this endpoint.
Endpoint:
POST /v2/agents
Headers:
Body:
See API documentation for other possible fields
Final Step: Configure Twilio
Once the trunk is ready on SynthFlow, redirect Twilio calls to it using TwiML commands.
Javascript Example:
Python Example: