Asterisk

Asterisk is a very popular open source PBX which will work well with 2talk’s platforms. Other variants/forks of Asterisk include Trixbox and Callweaver. We currently do not support the IAX protocol - although we expect to add this support in the near future. For now you should use SIP to connect your Asterisk/Trixbox server to 2talk. The way you configure your Asterisk server is up to you, but the following provides a good template to start making calls through 2talk.

Since examples are always the best way to illustrate configuration guides, here is an example configuration where obviously you should replace the ‘yournumber’ with your actual 2talk number (e.g. 099749000) and ‘yourpassword’ with your 2talk account password. NOTE: 2talk use the STD code+number format for usernames e.g. 099749000 rather than the E164 version (6499749000) as some providers do.

sip.conf

[general]

registerattempts=0

registertimeout=20

; Register line should be somewhere inside your general section

register => yournumber:yourpassword@sip.2talk.co.nz/yournumber

[2talk]

type=friend
username=yournumber
fromuser=yournumber
secret=yourpassword
host=sip.2talk.co.nz
context=default   ; or your own selected context if desired
dtmfmode=rfc2833
disallow=all
allow=ilbc
allow=gsm
allow=alaw
allow=ulaw
;allow=g729   ; only if you have licenses to use it
nat=yes
canreinvite=no
insecure=very  ; use insecure=invite,port in later versions of Asterisk such as v1.4

extensions.conf

[default]

;receive incoming calls to a connected phone

exten => s,1,Dial(SIP/yournumber)

; outbound calls (outside of your own PBX)

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