trmg Notes - Shadytel/Dialplan GitHub Wiki
This is an always evolving setup and is far from perfect. I will update my notes here as I modify things. Also, if you think I can do something better, please let me know!
Test Numbers
Here are some numbers you can dial to test the ability for calls to complete to my network. You are also welcome to call me (871-5111) if it's a sane time of day (Pacific Time).
- 871-0020 - Fake milliwatt via Asterisk
- 871-0023 - Businessfunk
- 871-0024 - Terrible MOH
- 871-3000 - "Phonestuffs" IVR
- 871-4264 - 4ANI, will read back the calling party number as received by me
- 871-5990 - Test announcement from the BCM50.
- 871-6200 - Sensaphone 400 behind the rack 'o gear at VoFR Communications DBA TRMGTel.
- 871-6299 - Test announcement from the "media gateway" ISR 2851
- 871-6990 - Test announcement from the "tandem" ISR 2851
Asterisk Notes
TODOs: Add anti-trombone check.
[ib-iax-scdp]
; Initial context to flag call as a SCDP call
exten => _XXX.,1,Set(scdp=1)
same => n,NoOp(***INBOUND SCDP CALL = ${scdp}***)
same => n,NoOp(***CALLING PARTY:${CALLERID(num)}***)
same => n,NoOp( ***CALLED PARTY:${EXTEN}***)
same => n,Goto(ib-iax-scdp-b,${EXTEN},1)
same => n,Hangup()
[ib-iax-scdp-b]
; This inbound context is for the Shadytel Coordinated Dialing Plan
include => ob-iax-scdp-tandem
; This is for temporary "legacy" supported dialing
;include => internal
; My local prefix(es)
exten => _871XXXX,1,Progress()
same => n,Goto(internal,${EXTEN:3},1)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
[ob-iax-scdp-tandem]
; This outbound context is for the Shadytel Coordinated Dialing Plan
; gewt
exten => _415XXXX,1,Progress()
same => n,Dial(DAHDI/G0/1222${EXTEN},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; techfury90 - via gewt
exten => _696XXXX,1,Progress()
same => n,Dial(DAHDI/G0/1222${EXTEN},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; joe_z
exten => _563XXXX,1,Progress()
same => n,Dial(IAX2/trmg-joe_z/${EXTEN},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; doppler through joe_z
exten => _357XXXX,1,Progress()
same => n,Dial(IAX2/trmg-joe_z/${EXTEN},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; appledash
exten => _428XXXX,1,Progress()
same => n,Dial(IAX2/trmg-appledash/${EXTEN},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; andrew867
exten => _222XXXX,1,Progress()
same => n,Dial(IAX2/trmg-to-andrew-trunk/${EXTEN:3},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
exten => _709XXXX,1,Progress()
same => n,Dial(IAX2/trmg-to-andrew-trunk/${EXTEN:3},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
exten => _867XXXXX,1,Progress()
same => n,Dial(IAX2/trmg-to-andrew-trunk/${EXTEN:3},,g)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; My local prefix(es) - TODO: ADD ANTI-TROMBONING CHECK
; This is for testing purposes so I can dial myself
exten => _871XXXX,1,Progress()
same => n,Set(CALLERID(num)=222${CALLERID(num)})
same => n,Goto(internal,${EXTEN:3},1)
same => n,GoTo(scdp-rls-handler,s,1)
same => n,Hangup()
; Catchall
exten => e,1,Goto(scdp-rls-handler,s,1)
same => n,Hangup()
[ob-iax-scdp-internal]
; This outbound context is for local Shadytel Coordinated Dialing Plan translations
exten => _1222XXXXXXX!,1,Set(CALLERID(name)=TRMG A)
same => n,Set(CALLERID(num)=871${CALLERID(num)})
same => n,Goto(ob-iax-scdp-tandem,${EXTEN:4},1)
same => n,Hangup()
[scdp-rls-handler]
; Building this as different cause codes surface.
exten => s,1,Set(cc=${HANGUPCAUSE})
same => n,NoOp(***RLS CAUSE: ${cc}***)
same => n,ExecIf($[${cc} = 0]?Goto(nis))
same => n,ExecIf($[${cc} = 16]?Goto(normalclearing))
same => n,ExecIf($[${cc} = 17]?Goto(busy))
same => n,ExecIf($[${cc} = 34]?Goto(nocircuit))
same => n,ExecIf($[${cc} = 88]?Goto(nis))
same => n,ExecIf($[${cc} = 100]?Goto(nis))
same => n(catchall),Playback(/var/lib/asterisk/sounds/intercepts/scdp_facility_trouble,noanswer)
same => n,SayNumber(${cc})
same => n,Playback(silence/1&/var/lib/asterisk/sounds/intercepts/scdp_facility_trouble,noanswer)
same => n,SayNumber(${cc})
same => n,Hangup()
same => n(normalclearing),Playback(silence/1&/var/lib/asterisk/sounds/intercepts/dialing_w_shadytel,noanswer)
same => n,Hangup()
same => n(busy),Busy()
same => n(nocircuit),Playback(/var/lib/asterisk/sounds/intercepts/scdp_cbcad,noanswer)
same => n,Playback(silence/1&/var/lib/asterisk/sounds/intercepts/scdp_cbcad,noanswer)
same => n,Hangup()
same => n(nis),Playback(/var/lib/asterisk/sounds/intercepts/scdp_nis,noanswer)
same => n,SayNumber(${cc})
same => n,Playback(silence/1&/var/lib/asterisk/sounds/intercepts/scdp_nis,noanswer)
same => n,SayNumber(${cc})
same => n,Hangup()
Cisco Notes
Here is an example of a basic VoIP config, translation-pattern, and dial-peer for an H.323 call to gewt
VoIP Configuration
voice service voip
no ip address trusted authenticate
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
Note: "no ip address trusted authenticate" disables automatic "toll fraud" preventions in modern IOS versions. Personally, I don't like it, and instead I use ACLs and/or firewall rules to block undesired IPs from hitting the ISR.
Translation Pattern
voice translation-rule 1010000
rule 1 /^......./ //
voice translation-profile strip_cac
translate called 1010000
This is to strip the "carrier access code" I use on my local network for SCDP calls (which is 1-222, a currently unassigned NPA)
Dial-Peer
dial-peer voice 1222415 voip
description GEWTTANDEM SCDP - H323
translation-profile outgoing strip_cac
huntstop
destination-pattern 1222415.T
session target ipv4:[IP_of_destination]
codec g711ulaw bytes 80