What is correct Dial plan to pass callerid for 911 call?

My DID provider telasip supports E911 call. What I need to do is to pass callerid to them. I have something like below and for some reason it does not work. Please advice what is wrong? Thanks in advance.

exten => 911,1,Ringing
exten => 911,2,Wait(1)
exten => 911,3,Dial(SIP/Telasip-gw/${EXTEN},${callerid})
exten => 911,4,Hangup

that wont work. Dial() take the form


destination is a channel or channels like SIP/yourphone, SIP/provider/extension, Zap/g1/extension, or many like SIP/yourphone&SIP/yourprovider/yourcellnumber.

Ringtime is how many seconds it will try for. You are giving it your phone number as the number of seconds it should try for.

You will want to first do something like Set(CALLERID(number)=yourphone#) and then Dial(). That should do it.

Alternatively in sip.conf you can define fromuser= as your caller id and the caller id will be always sent…

Thanks a lot for your reply.

If I do not want to hardcode the callerid in Set function, how can I pass the callerid dynamically? I have a vairiable callerid set in my agi script. every time a call is made, callerid is set. How do I pass this to set function?

remembering that variables are (as I recall) case sensitive—


this will set the outgoing caller id number to be whatever is in the ${callerid} variable…