Steve Totaro
2006-Nov-03 08:24 UTC
[asterisk-users] Problems Overwriting CallerID with True ANI
I receive calls over a T1 with callerid and then *ani*dnis*. I am able to strip out the ani and the dnis in the dialplan but when I try to set the caller ID to be the ani, it looks ok but then if I do a NoOp callerid on the next line, I get unknown. Here is the section of my dialplan: exten => _*NXXNXXXXXX*NXXNXXXXXX*,1,Set(ANI=${EXTEN}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,2,Set(__ANI=${CUT(ANI,*,2)}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,3,Set(DNIS=${EXTEN}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,4,Set(__DNIS=${CUT(EXTEN,*,3)}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,5,SetVar(__TransferToExt=6101) exten => _*NXXNXXXXXX*NXXNXXXXXX*,6,Set(__CALLERID(name)=${ANI}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,7,Set(__CALLERID(number)=${ANI}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,8,NoOP(${CALLERID}) exten => _*NXXNXXXXXX*NXXNXXXXXX*,9,Goto(DNIS,${DNIS},1) [DNIS] exten => _NXXNXXXXXX,1,AGI(agi://172.16.1.135) exten => _NXXNXXXXXX,2,Setvar(__ActiveCallID=${ActiveCallID}) exten => _NXXNXXXXXX,3,Goto(ext-queues,${TransferToExt},1) exten => _NXXNXXXXXX,104,Goto(ext-queues,6004,1) exten => h,1,DeadAGI(agi://172.16.1.135:4574) Here is the output on the console: -- Attempting native bridge of SIP/Sangoma01-f7bd and SIP/Sangoma03-0548 -- Executing Set("SIP/Sangoma01-7f6e", "ANI=*4102921029*8007318154*") in new stack -- Executing Set("SIP/Sangoma01-7f6e", "__ANI=4102921029") in new stack -- Executing Set("SIP/Sangoma01-7f6e", "DNIS=*4102921029*8007318154*") in new stack -- Executing Set("SIP/Sangoma01-7f6e", "__DNIS=8007318154") in new stack -- Executing SetVar("SIP/Sangoma01-7f6e", "__TransferToExt=6101") in new stack * -- Executing Set("SIP/Sangoma01-7f6e", "__CALLERID(name)=4102921029") in new stack -- Executing Set("SIP/Sangoma01-7f6e", "__CALLERID(number)=4102921029") in new stack -- Executing NoOp("SIP/Sangoma01-7f6e", ""Unknown" <Unknown>") in new stack* -- Executing Goto("SIP/Sangoma01-7f6e", "DNIS|8007318154|1") in new stack Thanks, Steve Totaro
Steve Totaro
2006-Nov-03 10:36 UTC
[asterisk-users] SOLVED Problems Overwriting CallerID with True ANI
Steve Totaro wrote:> I receive calls over a T1 with callerid and then *ani*dnis*. I am > able to strip out the ani and the dnis in the dialplan but when I try > to set the caller ID to be the ani, it looks ok but then if I do a > NoOp callerid on the next line, I get unknown. > > Here is the section of my dialplan: > exten => _*NXXNXXXXXX*NXXNXXXXXX*,1,Set(ANI=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,2,Set(__ANI=${CUT(ANI,*,2)}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,3,Set(DNIS=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,4,Set(__DNIS=${CUT(EXTEN,*,3)}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,5,SetVar(__TransferToExt=6101) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,6,Set(__CALLERID(name)=${ANI}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,7,Set(__CALLERID(number)=${ANI}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,8,NoOP(${CALLERID}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,9,Goto(DNIS,${DNIS},1) > > [DNIS] > exten => _NXXNXXXXXX,1,AGI(agi://172.16.1.135) > exten => _NXXNXXXXXX,2,Setvar(__ActiveCallID=${ActiveCallID}) > exten => _NXXNXXXXXX,3,Goto(ext-queues,${TransferToExt},1) > exten => _NXXNXXXXXX,104,Goto(ext-queues,6004,1) > exten => h,1,DeadAGI(agi://172.16.1.135:4574) > > > Here is the output on the console: > -- Attempting native bridge of SIP/Sangoma01-f7bd and > SIP/Sangoma03-0548 > -- Executing Set("SIP/Sangoma01-7f6e", > "ANI=*4102921029*8007318154*") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", "__ANI=4102921029") in new > stack > -- Executing Set("SIP/Sangoma01-7f6e", > "DNIS=*4102921029*8007318154*") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", "__DNIS=8007318154") in new > stack > -- Executing SetVar("SIP/Sangoma01-7f6e", "__TransferToExt=6101") > in new stack > * -- Executing Set("SIP/Sangoma01-7f6e", > "__CALLERID(name)=4102921029") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", > "__CALLERID(number)=4102921029") in new stack > -- Executing NoOp("SIP/Sangoma01-7f6e", ""Unknown" <Unknown>") in > new stack* > -- Executing Goto("SIP/Sangoma01-7f6e", "DNIS|8007318154|1") in new > stack > > Thanks, > Steve Totaro >Solved. Apparently, the double underscore does not work for CALLERID and it is CALLERID(num) and not CALLERID(number). Thanks, Steve
William Piper
2006-Nov-03 13:57 UTC
[asterisk-users] Problems Overwriting CallerID with True ANI
Steve, I would suggest doing Set(__CALLERID(name)=${ANI}) without the __underscore. I would think that Set(__CALLERID(name)=${ANI}) is not the same as Set(CALLERID(name)=${ANI}) so when you are doing the NoOP(${CALLERID}) it is looking for $CALLERID(name) & $CALLERID(number) not $__CALLERID(name) & $__CALLERID(number). Don't know if that is really the case, but it sounds good to me :) bp On 11/3/06, Steve Totaro <stotaro@totarotechnologies.com> wrote:> > I receive calls over a T1 with callerid and then *ani*dnis*. I am able > to strip out the ani and the dnis in the dialplan but when I try to set > the caller ID to be the ani, it looks ok but then if I do a NoOp > callerid on the next line, I get unknown. > > Here is the section of my dialplan: > exten => _*NXXNXXXXXX*NXXNXXXXXX*,1,Set(ANI=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,2,Set(__ANI=${CUT(ANI,*,2)}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,3,Set(DNIS=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,4,Set(__DNIS=${CUT(EXTEN,*,3)}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,5,SetVar(__TransferToExt=6101) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,6,Set(__CALLERID(name)=${ANI}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,7,Set(__CALLERID(number)=${ANI}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,8,NoOP(${CALLERID}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,9,Goto(DNIS,${DNIS},1) > > [DNIS] > exten => _NXXNXXXXXX,1,AGI(agi://172.16.1.135) > exten => _NXXNXXXXXX,2,Setvar(__ActiveCallID=${ActiveCallID}) > exten => _NXXNXXXXXX,3,Goto(ext-queues,${TransferToExt},1) > exten => _NXXNXXXXXX,104,Goto(ext-queues,6004,1) > exten => h,1,DeadAGI(agi://172.16.1.135:4574) > > > Here is the output on the console: > -- Attempting native bridge of SIP/Sangoma01-f7bd and > SIP/Sangoma03-0548 > -- Executing Set("SIP/Sangoma01-7f6e", > "ANI=*4102921029*8007318154*") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", "__ANI=4102921029") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", > "DNIS=*4102921029*8007318154*") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", "__DNIS=8007318154") in new > stack > -- Executing SetVar("SIP/Sangoma01-7f6e", "__TransferToExt=6101") in > new stack > * -- Executing Set("SIP/Sangoma01-7f6e", > "__CALLERID(name)=4102921029") in new stack > -- Executing Set("SIP/Sangoma01-7f6e", > "__CALLERID(number)=4102921029") in new stack > -- Executing NoOp("SIP/Sangoma01-7f6e", ""Unknown" <Unknown>") in > new stack* > -- Executing Goto("SIP/Sangoma01-7f6e", "DNIS|8007318154|1") in new > stack > > Thanks, > Steve Totaro > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061103/4475515b/attachment.htm
Kevin Bockman
2006-Nov-04 08:05 UTC
[asterisk-users] Problems Overwriting CallerID with True ANI
Response inline. Steve Totaro wrote:> I receive calls over a T1 with callerid and then *ani*dnis*. I am able > to strip out the ani and the dnis in the dialplan but when I try to set > the caller ID to be the ani, it looks ok but then if I do a NoOp > callerid on the next line, I get unknown. > > Here is the section of my dialplan: > exten => _*NXXNXXXXXX*NXXNXXXXXX*,1,Set(ANI=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,2,Set(__ANI=${CUT(ANI,*,2)})Why don't you just do that in one line?> exten => _*NXXNXXXXXX*NXXNXXXXXX*,3,Set(DNIS=${EXTEN}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,4,Set(__DNIS=${CUT(EXTEN,*,3)})And this?> exten => _*NXXNXXXXXX*NXXNXXXXXX*,5,SetVar(__TransferToExt=6101)Use Set.> exten => _*NXXNXXXXXX*NXXNXXXXXX*,6,Set(__CALLERID(name)=${ANI}) > exten => _*NXXNXXXXXX*NXXNXXXXXX*,7,Set(__CALLERID(number)=${ANI})I'm not sure what would actually be getting set here. CALLERID() is a function, not a variable (which you use the _s for). Set(CALLERID(name)=${ANI}) Set(CALLERID(num)=${ANI)} num, not number.> exten => _*NXXNXXXXXX*NXXNXXXXXX*,8,NoOP(${CALLERID})You need to do NoOp(${CALLERID(all)}) or CALLERID(num) or CALLERID(name) or something. 'show function CALLERID'.> exten => _*NXXNXXXXXX*NXXNXXXXXX*,9,Goto(DNIS,${DNIS},1) > > [DNIS] > exten => _NXXNXXXXXX,1,AGI(agi://172.16.1.135) > exten => _NXXNXXXXXX,2,Setvar(__ActiveCallID=${ActiveCallID})Use Set instead of SetVar. You can probably get rid of this line anyway by setting the variable in your AGI itself to __ActiveCallID.> exten => _NXXNXXXXXX,3,Goto(ext-queues,${TransferToExt},1) > exten => _NXXNXXXXXX,104,Goto(ext-queues,6004,1) > exten => h,1,DeadAGI(agi://172.16.1.135:4574)Kevin