Question : PBX in a Flash 911 Dialing

I have a PBX In a Flash setup for a company with two locations.  Each location has different phone numbers so I have a custom context for each extensions depending on where it is located.  For example:

[from-location1]
exten => _1NXXNXXXXXX,1,goto(from-internal,112${EXTEN},1)
exten => _NXXNXXXXXX,1,goto(from-internal,112${EXTEN},1)
exten => _NXXXXXX,1,goto(from-internal,112${EXTEN},1)
include => from-internal

[from-location2]
exten => _1NXXNXXXXXX,1,goto(from-internal,111${EXTEN},1)
exten => _NXXNXXXXXX,1,goto(from-internal,111${EXTEN},1)
exten => _NXXXXXX,1,goto(from-internal,111${EXTEN},1)
include => from-internal

Then I have two outbound routes to use different trunks:
Route Name: Location One
Dial Patterns:
111|19999999999
111|011.
111|1800NXXXXXX
111|1866NXXXXXX
111|1877NXXXXXX
111|1888NXXXXXX
111|1NXXNXXXXXX
111|NXXNXXXXXX
111|NXXXX.
111|NXXXXXX

Route Name: Location Two
Dial Patterns:
112|19999999999
112|011.
112|1800NXXXXXX
112|1866NXXXXXX
112|1877NXXXXXX
112|1888NXXXXXX
112|1NXXNXXXXXX
112|NXXNXXXXXX
112|NXXXX.
112|NXXXXXX

Over the weekend location two needed to dail 911 but when they did, they got the "your call cannot be completed as dialed" message.

How do I set it up so each location calls 911 and it routed to their local 911 center?  My SIP provider supports local 911 routing.

Thanks.

Answer : PBX in a Flash 911 Dialing

I figured it out myself, so for anyone else that has the same issue, here is what to do:

in extensions_custom.conf you need to add a new extension in the [from-internal-custom] section as follows:

exten => 911,1,goto(${CONTEXT},${exten},1)      
exten => 911,2,Hangup()
exten => h,1,Hangup()

Then, in your custom context sections you need to add the extension as well as follows:

[from-location1]
exten => 911,1,Set(CALLERID(number)=[ENTER YOUR PHONE NUMBER])
exten => 911,1,Dial(SIP/trunk1/[ENTER 10 DIGIT 911 NUMBER]|300|)      
exten => 911,2,Hangup()
exten => h,1,Hangup()

[from-location2]
exten => 911,1,Set(CALLERID(number)=[ENTER YOUR PHONE NUMBER])
exten => 911,2,Dial(SIP/trunk2/[ENTER 10 DIGIT 911 NUMBER]|300|)      
exten => 911,3,Hangup()
exten => h,1,Hangup()

You can find the 10 digit 911 number in the front of your local phonebook.

I hope this helps anyone who needs it.
Random Solutions  
 
programming4us programming4us