This is not the latest version of this documentation, for the one that is upto date, please see the latest version (2.6.9)
SIP trunks transmit voice and video data over IP networks and offer a cost-effective alternative to traditional telephone lines. Interoperability with other communication systems is important and can be affected by protocol, codec, and feature compatibility. To ensure successful communication, work with a provider that offers compatibility testing and support.
The device has been tested with most Asterisk based Analogue Gateways and proprietary systems like Avaya, Cisco etc. In short, the device works with any gateway that is supported by Asterisk itself.
Now for purposes of demonstration we’re going to do a few things:
Setting up the LTE trunk is done by clicking on the Edit LTE Trunk button in the Trunks page.
Now we’ve given 9 as our dialout prefix and Extension/1000 as our default action, the default action can pretty much be anything (IVRs or Queues or just Extensions) for simplicity we’ve chosen the extension 1000 to redirect all the calls to.
Now from our Softphone which is registered with our PBX we can make a call by dialing 9<number>, so if the number you want to dial is 9072188777 you would dial 99072188777.
Setting up a regular trunk is a little more complicated in comparison to the LTE trunk but still pretty easy as there are not many options. You can click on the green Create New Trunk button to start creating a new trunk.
The above given is the configuration for a barebones SIP trunk (also running asterisk).
Now let's go through the form and see what each field does:
The name is just an identifier for you to keep track of.
The host is the IP address of the device that you’re going to be connecting to, in our case it’s 10.254.248.2 The port is bog standard 5060 but it may be different in your case be sure to check on that in case of troubleshooting.
this is what you would use to dial the outside world from your PBX similar to the one in the LTE Trunk. In our case it’s 8, so if we want to dial outside using the Office trunk we would use the number 8<number>.
This is what the device will do when a call is received on this specific trunk, you can set it to anything from IVR to Queues to Extensions. This depends entirely on your usecase.
If you enable Gateway Authentication, you need to fill in the details which will be provided to you by the SIP provider or the gateway configuration.
Codecs are used to encode and decode the audio data, the device supports a wide variety of codecs, but for the sake of simplicity we’ve gone with the most common one.
Now coming to the configuration on the gateway (10.254.248.2), it would look something like this, in case of sip.conf and pjsip.conf respectively:
In sip.conf:
In pjsip.conf:
In the extensions.conf you would have something like this:
In our example we’re using the context name sip-difuse you can define your own, now in practice what should happen is when a call is initiated with the dialout prefix 8 as in our example it should go to this trunk, our device truncates the prefix before sending it to the other gateway so on the other side if you dial 8050123456789, it will only see 050123456789.