Instead of connecting calls directly to phone numbers, you can also use our system to connect to a Session Initiation Protocol (SIP) trunk. This option provides you with greater flexibility and control over your telecommunication system. Here's how to do it:
Use the 'connect' action to connect a call to your SIP trunk. The mechanism is similar to connecting to a phone number, but in this case, you'll provide the SIP URI of your trunk instead of a phone number.
The components in the SIP URI are: sip|sips:[recipient@]:ip/hostname[:port][;transport=tcp|udp]
If you do not specify the recipient in the SIP URI it will default to the called number.
Examples: sip:sip.example.com sips:sip.example.com:5061 sip:sip.example.com:5060 sip:sip.example.com:5060;tranport=tcp sip:+46123456@sip.example.com sip:+46123456@sip.example.com;transport=udp
{
"connect": "sip:+4612345678@example.com:5060;transport=udp",
"callerid": "+46766861234", // Optional
"next": "https://yourapp.example/elks/calls", // Optional
}
POST https://yourapp.example/elks/calls
| Parameter | Description |
|---|---|
| callid | The unique id of the call in our systems. |
| result | The result of the connect. Can be ”success”, ”failed” or ”busy”. |
To use this feature, your SIP servers will need to be whitelisted. Please contact our support.
You will need to modify your firewall settings to allow UDP traffic on port 5060. The IP addresses we use for SIP traffic to your server can be found here.