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

Chad Scott chad at idworld.net
Fri Oct 8 19:18:05 MST 2004


The way I've implemented it in my switch is to have a

exten => _91XXXXXXXXXX,1,GotoIf($[${CALLERIDNUM} : ^300[0-9]\$] ? 2:3)
exten => _91XXXXXXXXXX,2,SetCIDNum(800555${CALLERIDNUM})
exten => _91XXXXXXXXXX,3,Dial(${TRUNK}${EXTEN})

That's all from memory, but you get the idea.  They reason I don't 
change the CID arbitrarily is that we're using SIP phones that might 
have a divert configured, which means the Caller*ID is of the original 
caller, not the extension doing the diverting.

On Oct 8, 2004, at 6:59 AM, Matthew Boehm wrote:

> 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
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list