siptwiliosip-serveropensips

OpenSIPS and Twilio Elastic Sip Trunking


I'm very very new to the world of VoIP, so please forgive my terminological inaccuracies.

I have just installed ( on to a remote server ) the OpenSIPS software.

I have provisioned a Twilio Elastic SIP Trunk which has it's Origination SIP URI set to the IP address of the OpenSIPS server ( but it prepended with the protocol 'sip:' )

I have two iPhones with some VoIP apps, that allow me to specify Auth Name, Auth Password, Username, Display Name, Domain and SIP Proxy.

In OpenSIPS i have created a domain ( with the IP of my server ) also, i created two users ( on that domain ) and gave them Aliases of 100 and 101.

The software on the iPhones claims that it has 'registered' with the OpenSIPS server, so I have to accept that.

I believe that my configuration of the Twilio SIP Trunk is correct, on the basis that there aren't many settings to set, and they all look correct, and make some kind of logical sense.

What i cant figure out from here, and not for lack of searching the web, watching hours of webinars etc, is how do I get OpenSIPS to send outbound calls through to the Twilio Trunk, and also get the handsets to ring on incomming calls, and Twilio's SIP Trunk has a Termination SIP URI of xxxxxx.pstn.twilio.com which is ( im guessing ) supposed to be entered somewhere in to OpenSIPS but I cannot see how to configure this.

I'm looking for something that is a guide on how to 'connect' OpenSIPS to the Twilio Elastic Sip Trunking service.

Any help appreciated...


Solution

  • So, I'm guessing you want to set up an OpenSIPS instance which acts both as SIP registrar and basic SBC, by simply forwarding all outgoing traffic to the Twilio SIP trunk.

    SIP Registrar

    It looks like you've already handled the registrar part of OpenSIPS scripting. You can always generate a basic configuration that handles user registrations with:

    make menuconfig
        "Generate OpenSIPS script"
        "Residential script"
    

    To list the currently registered OpenSIPS users:

    opensipsctl ul show
    

    SIP Session Border Controller (basic routing)

    - managing outgoing traffic

    Here are a few useful scripting mechanisms:

    - managing incoming traffic