Emergency 911 access is a critical part of any
Asterisk configuration. It is important to ensure that your callers will always be able to access e911 from inside of your organization. I allow my
DUNDi peers to use my outbound phone line for their calls. I need to ensure that people at my location are able to dial e911, regardless of whether my one outbound Zap channel is "in use" by anyone else.
The following [internal-context] context should be the context in which you place your devices that will have outbound e911 access.
[internal-context]
include => e911
The [e911] context is where the route for outbound e911 calls is defined. The SoftHangup application is used to hang up any call on the outound Zap channel that is not an e911 call, allowing outbound access. The GROUP_COUNT function is used to ensure that an active e911 call is not terminated if another device attempts to dial the emergency number.
[e911]
; External e911
exten => 911,1,GotoIf($["${GROUP_COUNT(e911)}" >= "1"]?exit)
exten => 911,n,ChanIsAvail(DAHDI/3,s)
exten => 911,n,GotoIf($["${AVAILSTATUS}" = "0"]?pass)
exten => 911,n,SoftHangup(DAHDI/3,a)
exten => 911,n,Wait(2)
exten => 911,n(pass),Set(GROUP(outbound)=e911)
exten => 911,n,MixMonitor(${CDR(uniqueid)}.ogg,b)
exten => 911,n,Dial(${TRUNK}/w911)
exten => 911,n(exit),Answer(500)
exten => 911,n,Playback(all-outgoing-lines-unavailable&vm-goodbye)
exten => 9911,1,Goto(911,1)