IAX2 Beta Service

2talk have now launched an IAX2 Beta service aimed at customers with an ‘Asterisk’ based IP-PBX system including the following:

If your IP-PBX, gateway or phone supports the IAX2 protocol then it should be compatible with 2talk’s IAX2 service.  IAX2 has a number of advantages over the SIP protocol including:

For more benefits of IAX2 over SIP visit:
http://www.voip-info.org/wiki/view/IAX+versus+SIP

To use the 2talk IAX2 Beta Service you need to connect to ‘iax.2talk.co.nz’ (rather than 2talk.co.nz).  Below is a basic example configuration in the Asterisk ‘iax.conf’ file where the customer phone number is 099749000 and password is ‘mypassword’.  Obviously you replace these with your own phone number and password.

[general]

bandwidth=low
disallow=all
allow=gsm
allow=alaw
allow=ulaw
allow=ilbc
trunkfreq=20
trunktimestamps=yes
tos=ef

register => 099749000:mypassword@iax.2talk.co.nz

[099749000]
type=friend
username=099749000
trunk=yes
context=from-trunk    (* See below note on context)
host=iax.2talk.co.nz
secret=mypassword
auth=md5
disallow=all
allow=gsm
allow=alaw
allow=ulaw    (specify your own codec preferences in the allow’s here)


* If your context for incoming calls is not ‘from-trunk’ then you will need to login to 2talk live and change your ‘IAX2 context’ under the ‘Preferences’ column and ‘Voice Quality & Networking’ section.  Here you can specify your own context string used for incoming IAX2 calls.  By default Trixbox/FreePBX servers tend to use ‘from-trunk’ which is why we have made this the default context setting for IAX2 trunks.

NOTE: If you wish to have multiple numbers presented over IAX2 then you need to create a ‘register’ and ‘peer’ entry for each number in your IAX configuration file since each line on your account acts independantly.

Trixbox Settings

Trixbox configuration is done slightly differently than standard Asterisk configurations. Below is an example IAX2 configuration for Trixbox (Version 2.6.2) sent through by a user. Obviously you will need to change the phone number 099749000 and password 'mypassword' to be your own 2talk phone number and password. The example also assume g729 is used as the codec. If you do not have a license for this codec then substitute this for gsm, alaw or ulaw etc.:

[Peer Details]
username=099749000
type=friend
secret=mypassword
nat=route
insecure=very
host=iax.2talk.co.nz
fromuser=099749000
disallow=all
trunk=yes
context=from-trunk
canreinvite=no
bandwidth=low
allow=g729 ; Replace the codec with gsm or alaw if you do not have the g729 codec supported
requirecalltoken=no ; Required for Asterisk 1.6 compatibility

[User Details]
username=099749000
type=friend
secret=mypassword
nat=route
insecure=very
host=iax.2talk.co.nz
context=from-pstn

[Registration]
099749000:mypassword@iax.2talk.co.nz

Trixbox 2.8 settings

A customer using Trixbox 2.8 has also posted the following simplified instructions. Update your iax_additional.conf settings and add the following (replacing 099749000 with your own 2talk number and mypassword with your own password). This was generated with the "OutGoing" section of the trunk dialog. "Incoming" was left blank. Neverless, it receives incoming calls because the type=friend.

[099749000]
host=iax.2talk.co.nz
username=099749000
secret=mypassword
type=friend
requirecalltoken=no
context=from-trunk
trunk=yes
allow=g729 ; Replace the codec with gsm or alaw if you do not have the g729 codec supported

Also a couple of other points to note:

You then need to update your dial plan and replace the ‘Dial’ command(s) to use IAX2 instead of SIP. For example:

exten => _X.,1,Dial(IAX2/099749000/${EXTEN})

NOTE: You should disable any SIP registrations to 2talk on the same phone numbers otherwise the call may not be delivered by IAX2.  Please also remember that the 2talk IAX2 trunking service is a BETA service - so please report any problems you have to support@2talk.co.nz.  If you want a stable production system then you are better using SIP to connect to 2talk until the IAX2 service comes out of Beta.