Asterisk Configuration

Fran├žais backlinks print PDF
historysimilar
The following are snippets of Asterisk configuration files to assist you in configuring your Asterisk set-up to use SIP Broker.

TrixBox Trunk Setup

[sip_nat.conf]
externip=blah.dyndns.org
localnet=192.168.0.1/255.255.255.0

Trunk Name - sipbroker

PEER Details
[sipbroker-out]
type=peer
fromuser=<sipbroker username>
fromdomain=dyndns.org
host=sipbroker.com
port=5060
canreinvite=yes

Incoming Settings - Leave Blank
Registration - Leave Blank

Create an Outbound Route
Include in your Dial Pattern - an outbound Trunk Select Prefix (Ex: 86|. )
Test SipBroker - Select your Trunk 86, Dial *266-300 to hear Monkeys - Ex: Dial 86*266300
Dial: 86*011188888 to hear Sipbroker Test Announcement


sip.conf

[general]
externip=blah.dyndns.org
localnet=192.168.0.1/255.255.255.0

[sipbroker-out]
type=peer
fromuser=<URI username>
fromdomain=<URI domain>
host=sipbroker.com
port=5060
canreinvite=yes

OR

[sipbroker]
type=peer
context=sipbroker_inbound
fromuser=<URI username>
fromdomain=<URI domain>
host=sipbroker.com
port=5060
incominglimit=3
insecure=invite
nat=yes
canreinvite=no


extensions.conf (Asterisk 1.2.x)

[general]
priorityjumping=yes

; This macro dials SIP Broker and if ENUM fails falls back to VoIP provider 1.
[macro-dialprovider]
exten => s,1,Dial(SIP/${MACRO_EXTEN}@sipbroker-out) ; Call SIP Broker for ENUM lookup
exten => s,2,Congestion
exten => s,102,Dial(SIP/${MACRO_EXTEN}@provider-context) ; If failed then Dial provider
exten => s,103,Congestion
exten => s,203,Busy

; This macro dials SIP Broker.
[macro-dialsipbroker]
exten => s,1,Dial(SIP/${ARG1}@sipbroker-out)
exten => s,2,Congestion
exten => s,102,Busy

[examples]
exten => _X.,1,Macro(dialprovider) ; e164 dialing
exten => _*X.,1,Macro(dialsipbroker,${EXTEN:0}) ; SIP-Code dialing



The extensions.conf option "priorityjumping" was depreciated in Asterisk 1.2, and support has been (apparently) completely removed in 1.4.

extensions.conf (Asterisk 1.4.x)

; This macro dials SIP Broker and if ENUM fails falls back to VoIP provider 1.
[macro-dialprovider]
exten => s,1,Set(CALLERID(all)=<${CALLERID(num)}>) ; Set outbound CallerID
exten => s,n,Dial(SIP/sipbroker-out/${MACRO_EXTEN},30) ; Call SIP Broker for ENUM lookup
exten => s,n,NoOp( Dial Status: ${DIALSTATUS})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-CONGESTION,1,Congestion
exten => s-CANCEL,1,Hangup
exten => s-BUSY,1,Busy
exten => s-CHANUNAVAIL,1,Dial(SIP/provider-context/${MACRO_EXTEN},30) ; If failed then Dial provider
exten => s,n,Hangup

[macro-dialsipbroker]
exten => s,1,Set(CALLERID(all)=<${CALLERID(num)}>) ; Set outbound CallerID
exten => s,n,Dial(SIP/sipbroker-out/${ARG1}) ; Call SIP Broker for ENUM lookup
exten => s,n,Hangup

[examples]
exten => _X.,1,Macro(dialprovider) ; e164 dialing
exten => _*X.,1,Macro(dialsipbroker,${EXTEN:0}) ; SIP-Code dialing


extensions.conf (Asterisk 1.4.x) - incoming

In extensions.conf, you need to define the context [sipbroker_inbound]. 
For example, if you want to enable calling *1234 567890 from SIP Broker's partners, the extension 567890 must exist in [sipbroker_inbound] in your dialplan.



Created by: martin last modification: Sunday 15 of July, 2012 [06:50:03 UTC] by pinazo


Google Search
 
Menu [hide]
Online users
We have 11 online users
Online users