Files
openbts/AsteriskConfig/extensions.conf
2011-10-07 02:40:51 +00:00

58 lines
1.6 KiB
Plaintext

[globals]
[default]
; This is the context for handsets that are allowed to attached via open registration.
; Normally, this context is only used for testing.
; These are test extensions that you might want to disable after installation.
; Create an extension, 2600, for evaluating echo latency.
exten => 2600,1,Answer() ; Do the echo test
exten => 2600,n,Echo ; Do the echo test
exten => 2600,n,Hangup
; The 2101 extension is used for factory testing with zoiper.
exten => 2101,1,Dial(SIP/zoiper)
; The 2100 extension is for factory testing with the test SIM.
exten => 2100,1,Dial(SIP/IMSI001010000000000)
[outbound-trunk]
; If you had an external trunk, you would dial it here.
exten => _N.,1,Answer()
[phones]
; This is the context for handsets provisioned through the realtime database.
; This assumes that OpenBTS units all are running their SIP interfaces on port 5062.
exten => _N.,1,Set(Name=${ODBC_SQL(select dial from dialdata_table where exten = \"${EXTEN}\")})
exten => _N.,n,GotoIf($["${Name}" = ""] ?outbound-trunk,${EXTEN},1)
exten => _N.,n,Set(IPAddr=${ODBC_SQL(select ipaddr from sip_buddies where name = \"${Name}\")})
exten => _N.,n,GotoIf($["${IPAddr}" = ""] ?outbound-trunk,${EXTEN},1)
exten => _N.,n,Dial(SIP/${Name}@${IPAddr}:5062)
[sip-local]
; This context is the union of all of the in-network contexts.
include => default
include => phones
[sip-external]
; This is the top-level context that gives access to out-of-network calling.
; also includes the in-network calling.
include => sip-local
include => outbound-trunk