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

lang="ini"
mNo edit summary
(lang="ini")
*Accept authenticated calls and route them to a context.
sip.conf:
<syntaxhighlight lang="ini">
[aaisp-incoming-username]
type=user
 
sip.conf:
<syntaxhighlight lang="ini">
[general]
match_auth_username=yes
=== Separate Section ===
sip.conf:
<syntaxhighlight lang="ini">
[aaisp-outgoing-account]
type=peer
=== Combined Section ===
sip.conf:
<syntaxhighlight lang="ini">
[aaisp-incoming-username]
type=friend
If you're behind NAT it is helpful to make Asterisk register. It re-registers every 120 seconds by default anyway so should keep NAT sessions open.
You can register (and tell Asterisk that it's behind NAT) with these settings under the [general] section:
<syntaxhighlight lang="ini">
localnet=10.0.0.0/8
register => +441234567980:outgoingpass@voiceless.aa.net.uk/extn
See Asterisk's included example sip.conf for examples of how to send the call to different contexts etc.
For outbound calls:
<syntaxhighlight lang="ini">
exten => _X.,1,Dial(SIP/voiceless-out/${EXTEN})
</syntaxhighlight>
For inbound calls (assuming you're routing call to a registered Snom):
<syntaxhighlight lang="ini">
[voiceless-in]
exten => _X.,1,Dial(SIP/snom)
editor
698

edits