Penguin

iTalk is a service run by Auckland ISP Slingshot. It provides a SIP gateway to the NZ PSTN for $10/month. "local" calls and calls to other iTalk users are free, with reasonably cheap rates after that. Check the iTalk website for current availability of non -Auckland PSTN numbers. Number portability is also available.

The best thing about iTalk is that it is built on open protocols such as SIP, making it easy for you to integrate it with Asterisk.

In order to make your Asterisk pbx "talk" to iTalk, you need to define an instance for it in your sip.conf so you can reference it to dial outside numbers eg.

 [iTalk]
 type=friend
 secret=$your_italk_password
 username=649974xxxx
 fromuser=649974xxxx
 host=akl.italk.co.nz
 dtmfmode=rfc2833
 ;insecure=very        ; deleted
 insecure=port,invite    ; added
 nat=yes
 canreinvite=no
 disallow=all
 allow=ulaw
 allow=alaw                    ; see note further down
 ;allow=gsm                   ; deleted

When upgrading to the current version of Asterisk (Asterisk 1.6.0.6 ) I found that calls into iTalk were being rejected and callers were hearing a voice "Currently Unavailable". This even when outbound calls were fine. Looking at the logs I understood that the insecure=very line was being flagged as an error.

I have amended the sip.conf file with the offending lines commented out. Earlier versions of Asterisk may still work with insecure=very and not with the updated version - but you should be using the latest. Also allow=gsm has been deleted.

On 21 March 2007 I found that I needed to add the following to my sip.conf

 allow=alaw

Also inside the sip.conf you need to register to the iTalk proxy for ingress calls. eg.

register => $username:$password@akl.italk.co.nz/$extension_to_forward_incoming_calls_to

Inside extensions.conf (aside from having a valid extension to forward incoming calls to as specified in the register line above) you need to have rule to push egress calls out the "iTalk" sip define.

I route all egress calls out via it when people 'dial 1 to get out' so my rule inside extensions.conf looks like

exten => _1X.,1,Dial(SIP/iTalk/${EXTEN:1},30,Tr)

If you had other dial out methods for different toll areas you would obviously match it with the "09" prefix, ie.

exten => _09X.,1,Dial(SIP/iTalk/${EXTEN:1},30,Tr)

Slingshot/iTalk now allows registering other area codes so you could do your own toll bypass network all for only $10/areacode/month for unlimited calls ;)

ie.

have a declaration for each area code in sip.conf, then route via them based on what the user dials eg.

exten => _09X.,1,Dial(SIP/iTalkAKL/${EXTEN:1},30,Tr)
exten => _04X.,1,Dial(SIP/iTalkWLG/${EXTEN:1},30,Tr)
exten => _07X.,1,Dial(SIP/iTalkHLZ/${EXTEN:1},30,Tr)
exten => _03X.,1,Dial(SIP/iTalkCHC/${EXTEN:1},30,Tr)

Further notes

There are a few regions where you can get an iTalk number so your username will vary based on that (647974xxxx for hamilton for example).

The Auckland iTalk server can be referenced by IP instead, the other regional servers you must be address by DNS name to ensure they use the right calling realm.

The gsm codec is no longer supported, and you should be using the following instead (g729 only if you have it), use ulaw if you enjoy having your conversations transcoded between alaw and ulaw.

disallow=all
allow=alaw
;allow=g729