[asterisk-users] SOLVED Problems Overwriting CallerID with True ANI

Steve Totaro stotaro at totarotechnologies.com
Fri Nov 3 10:40:17 MST 2006


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



More information about the asterisk-users mailing list