Connecting OBi (OBi202) to Twilio SIP?

I want to connect Twilio SIP to the OBi202 endpoint. It seems like it would be easy to consider Twilio SIP support, and OBi is the SIP endpoint ...

I found the settings for the RTP port range, server, and credentials, but other than that, I'm stuck and can't connect. Can someone give some recommendations on connecting OBi to Twilio?

Edit: I managed to figure out the incoming routing, although, as Devin said, it requires a third party. I am setting up a free account on iptel.org. They provide registration and allow me to connect my OBi to their pure SIP service. Using verbs, I can dial incoming calls to my Twilio numbers directly to my Obi! I'm still testing, but it seems to be working so far.

Edit: I played with the iptel outbound service. I can successfully transfer a SIP call from my OBi to Twilio, but then I got a little stuck. It seems I am getting a double charge for an incoming Twilio SIP call, then for outgoing redirection does not seem to work. I will send more details as soon as I debug further ...

+7
twilio sip
source share
3 answers

Twilio the evangelist is here.

AFAIK, today there is no way for Obi to receive an incoming SIP call directly from Twilio.
In order for Twilio to know where to send the SIP call, Obi must register on any SIP registration server, and Twilio does not provide registration today.

Another evangelist from my team (John Gottfried) wrote blog entries showing how to use Obi and RaspberryPi to run RasPBX to get Twilio to make a SIP call to Ob .

Regarding the outgoing calls from Obi to Twilio, I have not really tried this with Obi. If Ob can make a direct IP call (without requiring registration), this should be possible. I did this using XLite , a free softphone.

If you can figure out how to make outgoing calls from Ob, I would like to hear how you did it.

Hope this helps.

+1
source share

Twilio added SIP registration as a feature in October 2016.

https://www.twilio.com/blog/2016/10/introducing-sip-registration.html

Incoming calls

SIP registration allows you to connect a SIP device to receive INPUT calls to your number. Basically, your device is β€œregistered” with twilio, so twilio knows that your device exists and can call it when there is an incoming call.

To receive incoming calls, you must log in to twilio, specify the phone number and configure the SIP domain in the "Programmable Voice" section:

  • Add a SIP domain (e.g. mysipdomain.sip.twilio.com).
  • Add user / credentials to this sip domain

Twilio SIP Domain Config

Please note that you can use either mysipdomain.sip.us1.twilio.com or mysipdomain.sip.twilio.com . Obitalk defaults to the former, but Twilio UI displays the latter. Both work for now.

Go to the obitalk toolbar and configure one of the available SPs on your Obihai box to use Twilio.

  • Enter twilio sip domain (e.g. mysipdomain )
  • Provide the sip username and password that you configured in twilio as part of the sip domain.
  • save

Obitalk configuration for Twilio SIP registration

The obitalk toolbar should demonstrate successful sip registration for your configured SP, and you will be able to dial a Twilio number and have your SIP phone ring.

Outgoing calls

To handle outgoing calls from your registered SIP phone, you need to specify the URL in the Voice Configuration section of the SIP domain in Twilio. When your registered SIP device attempts to make an outgoing call, Twilio will ask the URL for instructions on what to do.

This is more complicated because you need to host a small web application somewhere for twilio to talk (there is currently no twimlet). The web application itself can be quite simple if all we want to do is parse the request and tell twilio in the <Dial> number requested. If you are making an international number, you must make sure that you include these countries in your account.

Here is one open source application that you can use for this purpose. https://github.com/timbeyers/sip2pstn-simpledial

I have a quick and dirty php implementation that I prefer (due to the ease of hosting on almost any cheap paid hosting).

https://gist.github.com/mattpr/9ed8f97f0a7a184c17da99a3d2463e7a

+1
source share

Now you can do it with Twilio and Obihai. Please visit the Obihai or Twilio website for step-by-step instructions.

0
source share

All Articles