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
> -----Original Message----- > From: Matthew Boehm [mailto:mboehm@cytelcom.com] > Sent: Friday, October 08, 2004 10:00 AM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] ${EXTEN} vs ${CALLERIDNUM} vs ?? > > > exten => 2020,1,AgentCallBackLogin((|@mycontext) > > 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". >You could always add the "real" callerid info in the context that you use to dial outbound before dialing out. That way your internal folks see the internal caller id and when you dial to the outside world they see the "public" caller id. Just an idea, Robert Jackson
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@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