Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

VoIP Phones - Asterisk: Difference between revisions

no edit summary
No edit summary
No edit summary
[[File:Asterisk_logo.png]]
 
We want to register, as that makes it 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.
 
Asterisk is extremely flexible and covering different uses for it is outside the scope of example as the setup used here was very basic.
 
==Registration==
In sip.conf register:
<syntaxhighlight>
register => +44123456789:password@voiceless.aa.net.uk
</syntaxhighlight>
 
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:
<syntaxhighlight>
[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
</syntaxhighlight>
 
==Dialplan==
In extensions.conf we can define the default context, assuming we have a Snom registered:
<syntaxhighlight>
[default]
exten => s,1,Dial(SIP/snom)
</syntaxhighlight>
Here's how we could connect outbound calls from the Snom that we have:
<syntaxhighlight>
[snom]
 
exten => _X.,1,Dial(SIP/voiceless/${EXTEN})
</syntaxhighlight>