Specific 911 Outgoing DID

Is there a way to map 911 from all extensions to a specific DID? We have multiple caller IDs (some set to users cell phone numbers), and want to make sure that in the event that 911 is dialed that the correct DID and thus e911 address is passed… Thanks!

exten=>_911,1,Set(CALLERID(num)=${cid}) ; cid variable is the desired caller id
same=>n,Dial(${TRUNK}/${EXTEN},25)
same=>n,Hangup()

Or use execif for example

ExecIf($["${EXTEN}"= “911”]?Set(CALLERID(num)=15619230427)) ; where 15619230427 is the CID

Thanks so much for your reply. I understand what you are saying, but didn’t know where I need to add this code. I am using FreePBX. Any idea what config file I should add it to?

Thanks!
Josh

custom context on freepbax are written on /etc/asterisk/extensions_custom.conf , an easy way using the GUI make an outbound route just for dial the 911 , and add a fixed caller id for that route. Make sure you check the option Override Extension on the route cid option . Future FreePBX request , visit http://www.freepbx.org/forum/