Messinet Secure Services
wiki:Asterisk/E911
Last modified 10 months ago Last modified on 08/01/11 23:43:32

Asterisk e911

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 DAHDI 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 DAHDI 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 => 9911,1,Goto(911,1)
exten => 911,1,GotoIf($["${GROUP_COUNT(e911)}" >= "1"]?exit)
same => n,ChanIsAvail(DAHDI/3,s)
same => n,GotoIf($["${AVAILSTATUS}" = "0"]?pass)
same => n,SoftHangup(DAHDI/3,a)
same => n,Wait(2)
same => n(pass),Set(GROUP(outbound)=e911)
same => n,MixMonitor(${CDR(uniqueid)}-emergency.ogg)
same => n,Dial(${TRUNK}/w911)
same => n(exit),Answer(500)
same => n,Playback(all-outgoing-lines-unavailable&vm-goodbye)