VoIP Phones - Asterisk: Difference between revisions
Appearance
Content deleted Content added
mNo edit summary |
lang="ini" |
||
| Line 11: | Line 11: | ||
*Accept authenticated calls and route them to a context. |
*Accept authenticated calls and route them to a context. |
||
sip.conf: |
sip.conf: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
[aaisp-incoming-username] |
[aaisp-incoming-username] |
||
type=user |
type=user |
||
| Line 28: | Line 28: | ||
sip.conf: |
sip.conf: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
[general] |
[general] |
||
match_auth_username=yes |
match_auth_username=yes |
||
| Line 40: | Line 40: | ||
=== Separate Section === |
=== Separate Section === |
||
sip.conf: |
sip.conf: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
[aaisp-outgoing-account] |
[aaisp-outgoing-account] |
||
type=peer |
type=peer |
||
| Line 54: | Line 54: | ||
=== Combined Section === |
=== Combined Section === |
||
sip.conf: |
sip.conf: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
[aaisp-incoming-username] |
[aaisp-incoming-username] |
||
type=friend |
type=friend |
||
| Line 83: | Line 83: | ||
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. |
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: |
You can register (and tell Asterisk that it's behind NAT) with these settings under the [general] section: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
localnet=10.0.0.0/8 |
localnet=10.0.0.0/8 |
||
register => +441234567980:outgoingpass@voiceless.aa.net.uk/extn |
register => +441234567980:outgoingpass@voiceless.aa.net.uk/extn |
||
| Line 95: | Line 95: | ||
See Asterisk's included example sip.conf for examples of how to send the call to different contexts etc. |
See Asterisk's included example sip.conf for examples of how to send the call to different contexts etc. |
||
For outbound calls: |
For outbound calls: |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
exten => _X.,1,Dial(SIP/voiceless-out/${EXTEN}) |
exten => _X.,1,Dial(SIP/voiceless-out/${EXTEN}) |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
For inbound calls (assuming you're routing call to a registered Snom): |
For inbound calls (assuming you're routing call to a registered Snom): |
||
<syntaxhighlight> |
<syntaxhighlight lang="ini"> |
||
[voiceless-in] |
[voiceless-in] |
||
exten => _X.,1,Dial(SIP/snom) |
exten => _X.,1,Dial(SIP/snom) |
||