Commit 8e06d65b authored by caela akari's avatar caela akari
Browse files

Add new file

parent c33bb34b
; 7tel tandem router v2
#include "extensions.helpers.conf"
; context for 7tel trunk signaling v2
[ts2]
; match a "please route this for me!!!" request
exten => _0XX-XXX-XXXX,1,Log(NOTICE,autoroute ${EXTEN})
same => n,Dial(Local/${EXTEN}@tandem_translate)
same => n,Log(NOTICE,autoroute fell through)
same => n,Gosub(error,1,intercept_lost(R3))
; match a zone hop in a routing code
exten => _1-XX-!,1,Log(NOTICE,class1 ${EXTEN})
same => n,Gosub(route2,1,class1(${EXTEN}))
same => n,Gosub(error,1,intercept_reorder(U3))
; match a locality hop in a routing code
exten => _2-XXX-XXXX,1,Log(NOTICE,class 2 ${EXTEN})
same => n,Dial(Local/${EXTEN:1}@tandem_local)
; match a debug dialtone request
exten => _3!,1,Read(RCODE,trunk_dial,0,i,1,20)
same => n,Dial(Local/${RCODE}@ts2)
same => n,Gosub(error,1,intercept_lost(R8))
; invalid routing code
exten => i,1,Gosub(error,1,intercept_net_error(R9))
; translates to routing codes if necessary
[tandem_translate]
; local (this tandem)
exten => _0-${LINKNAME}-XXX-XXXX,1,Dial(Local/${EXTEN:-7}@tandem_local)
; distant routes
exten => _0-XX-XXX-XXXX,1,Answer
; first, see if we're logical neighbors with (directly connected to) the target zone
same => n,ChanIsAvail(IAX2/class1-${LINKNAME}-${EXTEN:1:2}/${EXTEN:-7}@ts2,t)
same => n,GotoIf($["${AVAILCHAN}" == ""]?isfar)
; we are, so just automatically route
same => n,Dial(Local/1${EXTEN:1:2}2${EXTEN:-7}@ts2)
same => n,Gosub(error,1,intercept_net_error(R1))
; we arent neighbors with the zone, we'll have to use manually entered routes
same => n(isfar),Dial(Local/${EXTEN}@tandem_far)
; distant tandems that need to be reached through other tandems
[tandem_far]
; routes look like this:
; exten => _0-96-XXX-XXXX,1,Dial(Local/1241962${EXTEN:-7}@ts2)
#tryinclude "extensions.tandem.routes.conf"
; unreachable (or invalid) zone
exten => i,1,Gosub(error,1,intercept_reorder(R7))
; routing within the zone
[tandem_local]
#tryinclude "extensions.tandem.local.conf"
; locality routing
exten => _ZXX-XXXX,1,Gosub(route2,1,class2(${EXTEN}))
; context for 7tel numbering plan routing
[snp]
include => tandem_local
include => tandem_translate
; number doesnt conform to numbering plan spec
exten => i,1,Gosub(error,1,intercept_reorder(N1))
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment