[asterisk-users] Problems Overwriting CallerID with True ANI

William Piper william.piper at gmail.com
Fri Nov 3 13:57:01 MST 2006


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 at 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


More information about the asterisk-users mailing list