2talk SIP Trunking

What is a SIP trunk?

A SIP Trunk allow you to route concurrent calls over the Internet to an IP capable PBX system. 2talk uses the SIP protocol to deliver calls to your PBX platform. If you do not have a PBX or VoIP Gateway - or your existing PBX/gateway is not SIP capable then the 2talk SIP trunking service is not for you and you should never enable this feature on your account. SIP trunking can be seen as a low cost replacement for traditional PRI or analog circuits - using the Internet to make/receive calls instead. This means cost savings for you the customer since you do not need to order expensive circuits from your telecommunications provider and can use your existing broadband connection to terminate/place calls instead.

What do I need to setup SIP trunking?

SIP trunking is not for everyone and is primarily used by businesses. To setup SIP trunking you will need the following:

If you are unsure whether your IP-PBX is compatible with 2talk then contact support@2talk.co.nz for more information.

Do I have to use SIP trunking if I have an IP-PBX?

This depends. Many IP-PBX platforms can register (login) with 2talk as a normal phone would. In fact this is what many Asterisk users do using the ‘register’ directive in their SIP configuration. If you do not have a static IP address or your IP-PBX is behind NAT then you cannot use SIP Trunking and you will need to register your devices with 2talk and use the ‘Inbound trunking’ feature on each line instead to achieve a similar goal.

What are the benefits of using SIP trunking?

Many IP-PBX’s cannot be configured to register/login to 2talk as a client, so for these types of devices SIP trunking is the only way you can interconnect with 2talk. SIP trunking has many other benefits over a dynamic registration including:

How do I setup SIP trunking on my 2talk account?

Firstly ensure that your IP-PBX is configured correctly and ready to receive calls from 2talk. Then follow these steps:

Can I login to 2talk with a phone while I have SIP trunking enabled?

No, you cannot have SIP trunking enabled on the account at the same time as logging in/registering from another phone/device.  When you enable SIP trunking on your account you instruct 2talk to always send calls to your IP-PBX system and nowhere else.  If you try to login/register to 2talk on one of your numbers while SIP trunking is enabled then you login/registration will fail.  If you want to use SIP trunking and a standard VoIP phone with 2talk then you will need to setup 2 separate accounts to do this.

How do I configure my IP-PBX to connect to 2talk?

This of course depends on what type of IP-PBX you are using. The main setting you need to configure is the ‘host’ or ‘proxy’ address of your outbound trunk. You should set this to:

trunk.2talk.co.nz

NOTE: This is different to the default host name you use to connect to 2talk (which is 2talk.co.nz). The rest of your settings will likely be specific to your PBX platform. If you must enter an IP address as your host then perform a lookup of the above host name to find out it’s IP address (In windows you can open a command windows (Star -> Run -> ‘cmd’) and type ‘nslookup trunk.2talk.co.nz’. The IP address may differ depending on your geographical location etc.

One of the most common IP-PBX platforms in use today is Asterisk (or one of it’s variants such as TrixBox). Below is an example ‘SIP peer’ definition for Asterisk allowing you to route calls to 2talk via your SIP trunk:

[2talk]
type=friend
context=from-trunk
host=trunk.2talk.co.nz
dtmfmode=rfc2833
insecure=very
nat=never
qualify=no
canreinvite=no
disallow=all
allow=gsm
allow=alaw

This is only an example. You will need to decide which codecs and context you wish to use in your own setup. You may then route calls out through your 2talk trunk by adding a directive such as the one below into your extensions configuration:

exten => _X.,1,Dial(SIP/2talk/${EXTEN},,T)