VoIP Phones - Asterisk

From AAISP Support Site

Asterisk logo.png

Asterisk is extremely flexible and covering different uses for it is outside the scope of this example as the setup used here was very basic.

Registration

We want to register, as that makes configuration simpler and avoids the "feature" where Asterisk replaces the caller ID of the person who called you with the username that was used to authenticate the call.

Also, by registering we can help avoid the situation where calls are being sent to a server that is not responding as registration will eventually time out.

In sip.conf register:

register => +44123456789:password@voiceless.aa.net.uk

This will allow incoming calls to hit the default context (see Asterisk's included example sip.conf for examples of how to send the call to different contexts etc.).

Define a proxy

Defining us as a SIP proxy for outbound calls:

[voiceless]
type=peer                        ; Only for outbound calls
remotesecret=password             ; password
defaultuser=+44123456789         ; Auth username
fromdomain=Asterisk  ; Might be good to put your hostname here.
host=voiceless.aa.net.uk
transport=udp
disallow=all
allow=alaw

Dialplan

In extensions.conf we can define the default context, assuming we have a Snom registered:

[default]
exten => s,1,Dial(SIP/snom)

Here's how we could connect outbound calls from the Snom that we have:

[snom]

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

Further Help

Customers using Asterisk and AAISP have created a website and IRC channel especially for this!