Forward SIP Domain Call to Elastic SIP Trunk - twilio

I'd like to allow SIP Domain registered phones to dial on prem extensions, and be connected through an Elastic Sip Trunk.
The idea being that remote workers can register their phones via Twilio, then be able to dial local extensions and reach people at the office.
Is it possible to connect the public domain and elastic sip trunk like that?

You will need the Twilio SIP Registered phones to dial via the E.164 phone numbers assigned to the Elastic SIP Trunk. A SIP Domain registered device cannot directly dial the Elastic SIP Trunk origination URI.
Another approach is to use Programmable Voice SIP to connect the second leg to the PBX, Outbound - Receiving SIP from Twilio. You can use the Studio Connect Call To widget (via SIP) for this as well.

Related

Twilio SIP Domains and Elastic SIP Trunk

I am having a problem with Twilio SIP Domains management:
I need to understand 2 things:
TwiML Sip transfer: When I TwiML Sip transfer successfully to the SIP Domain thru my Web App, the Webhook set in the SIP Domain is not triggered (I want to start another IVR session thru my Web App).
<Dial> <Sip username="xxxxxx" password="yyyyy">xxxxxx#zzzzz.sip.twilio.com?x-mycustomheader=foo&x-myotherheader=bar</Sip> </Dial>
Elastic SIP Trunk: When I call number X, where number X is linked to my Elastic SIP Trunk, I can see in the logs a Trunk Origination Failure and the Disaster Recovery webhook triggered. My idea is to have an Elastic Sip Trunk that is linked to a phone number X that triggers what's in the origination. Basically, to invoke the SIP domain. I set in the Origination sip:xxxxxx#zzzzz.sip.twilio.com
What am I doing wrong?

Twilio sip call is not working from tryit.jssip.net

I am using Twilio to make sip outgoing calls. I have created a sip domain, registered credential lists. Then i registered in Zoiper using the sip credentials and made an outbound call. It was working successfully.
Similarly i tried using tryit.jssip.net. But there it was asking for a WebSocket uri. What is that WebSocket uri for twilio ?
Is there something to do more in twilio to register sip endpoint in tryit.jssip.net
Sharing the screenshots here.
This is the jssip configuration. I entered sip uri and password. Websocket url is by default wss://tryit.jssip.net:10443. I didn't change it.
Then it got registered and i tried calling from that number. At that time the call got failed with a message Incompatible UDP
Twilio developer evangelist here.
Twilio doesn't publicly support SIP over websockets which JSSIP is asking for here. That is why you can't find the websocket URL to use.
If you are looking to use Twilio from a web browser, I suggest you take a look at Twilio Client.

Twilio SIP Trunking and Sip Domain

I am currently using Twilio for my cloud communication platform. A client of ours wants to SIP over to us, with headers, so we can continue the call on our end using Twiml.
I have tried setting up a SIP Domain and it works if I use a soft phone for an end point, but this isn't what I am trying to accomplish. I have also tried setting up a SIP Elastic Trunk and have that trunk connect to our SIP domain which in return call the Voice URL on the SIP domain.
I currently have setup a simple application to test this process. I have a Twilio number that calls a webhook, in the webhook (my app) I call the sip to the Twilio SIP trunk, but it fails. I am expecting to call the SIP domain and the Voice URL. I keep getting the error that the You tried to Dial a SIP Endpoint that is not currently registered with the corresponding SIP Domain. Please check your TwiML or REST API. (reference: TWilio Error Documentation.
Can anyone help me with this, please? I am currently using Twiml with PHP.
-- Update --
I am also following this documentation to a tee. I have a SIP Domain setup in my Twilio account, but it is requiring a registered user at an endpoint. In this documentation, it says when a sip call comes into the sip domain it will call the webhook, which it is not doing. Twilio SIP Domains
Twilio developer evangelist here.
I believe you're right to be confused about the SIP domain documentation. But the error message clears it up when it says:
Make sure the username matches a username in the Credential List used to authenticate the SIP Endpoint with the SIP Domain.
So your username does need to be an existing one, the SIP domain is not acting as a wildcard catch all for SIP addresses.
I will work to make sure the documentation is clearer.
Given that you are already receiving a webhook from an incoming call, why are you trying to get a second webhook from the SIP request? Could you not use the first webhook to direct the call the way you need?
In general, if you try to call a SIP endpoint via a SIP server/proxy, that SIP server/proxy needs to know how to reach that endpoint (routing). From the error text I derive that that isn't possible at the moment. Also, sometimes SIP servers only allow outbound calls from registered endpoints.
There are a number of things you can do:
Bypass the SIP server and call the endpoint directly (probably not what you want)
Configure a static path in the SIP server to the endpoint
Have the endpoint(s) register at the SIP server, so the SIP server knows who calls and how to reach the target.
Have you tried the possible solutions in the Error documentation?
Make sure the username (in the Request-URI) matches a username in the Credential List used to authenticate the SIP Endpoint with the SIP Domain
Prior to dialing, you can verify that your SIP Endpoint has successfully registered in the Console "Registered SIP Endpoints" tab found on the SIP Domains page.

How to validate sip incoming and outgoing URL for twilio sip trunk

I am using freepbx to connect to twilio elastic sip trunk. Which domain for incoming and outgoing URL to be used and how to authenticate it ?
Can I use softphone like eyebeam or x-lite to make call s ? What would be codec value ?

Twilio Elastic SIP Trunking Call Custom SIP Headers

In Twilio Rest API for each call there is a response which uniquely identify calls
Twilio-Request-Id: RQ5cedae4e7e7e4e70937a8198f5d2d1c0
Twilio-Request-Duration: 0.103
I want use Twilio Elastic SIP Trunking Call. So messages will be in raw SIP formats.
I wonder if Twilio provides this unique response Id-s(which you can use to identify your call details uniquely by) as custom SIP Headers extensions such as
X-Twilio-Request-Id = ...
X-Twilio-Request-Duration = ...
And what other custom SIP extension headers provided by Twilio about calls which are done via Elastic SIP Trunking?
It seems that Twilio send a unique Id in SIP OK Response
X-Twilio-CallSid: CA70554....

Resources