[Asterisk-Users] ${EXTEN} vs ${CALLERIDNUM} vs ??

Matthew Boehm mboehm at cytelcom.com
Fri Oct 8 06:59:53 MST 2004


I've got 2 phones with extensions 3001 and 3002 and the following dialplan:

exten => 2020,1,AgentCallBackLogin((|@mycontext)

When one of the 2 phones calls 2020, they have to enter in all the needed
info. I can shorten this by doing this:

exten =>
2020,1,AgentCallBackLogin(${CALLERIDNUM}|${CALLERIDNUM}@cytel-internal)

This way, they only have to enter their password because CALLERIDNUM is
equal to their actual extension. (this is default behavior.)

The problem is, if I add "real" callerid info to the phones in sip.conf, the
above exten=> no longer works because CALLERIDNUM is now equal to
"2223432988".

If I use ${EXTEN} in the dialplan, that doesn't work because its replaced
with 2020 as the dialed extension.

Is there no other way to reference the calling persons actual extension? ie:

${EXTEN} = the called extension
${CALLERIDNUM} the callers phones callerid number
${EXTENFROM} = the extension of the phone that is calling

Thanks,
Matthew




More information about the asterisk-users mailing list