Take a look at cid_rewrite from www.generationd.com  This automates name
lookup (based on reverse phone number) using 411.com, a local database of
callerID's, ability to block users based on a parameter, etc.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, January 23, 2006 2:24 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] how to set caller id?

On Monday 23 January 2006 06:03, Ronald Wiplinger wrote:
> C F wrote:
> > The one you demonstrate should have *never* worked.
>
> well, it did,  ....
>
> > Pre 1.2 you do:
> > exten => s,1,SetCIDNUM(12345789)
> > Post 1.2 you do:
> > exten => s,1,Set(CALLERID(num)=123456789)
>
> I need to get the callers phone number there!
> How can I do it now?
>
> exten => _91NXXNXXXXXX,3,NoOp(SetCallerID(${username}))
>
> exten =>
> 
>_91NXXNXXXXXX,4,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN:${TRUNKMSD}},$
>{TAR
>IFF})
Hi, I had similar problem and Tony Mountifield gave me the idea "If you want
your script to be compatible with both 1.0 and 1.2, try something like this:
$calleridname = $input{calleridname} || (($input{callerid} =~ /"(.*)"/) ? $1
: "unknown");
$callerid = ($input{callerid} =~ /<(.*)>/) ? $1 : $input{callerid};"

So I did put the first line in astcc.agi as:
my $callerid = $input{calleridname} || (($input{callerid} =~ /"(.*)"/) ? $1
: 
"unknown");
and then:
exten => _1NXXNXXXXXX,1,Set(CALLERID(all)="${CALLERIDNAME}" -
${CALLERIDNUM}) exten =>
_1NXXNXXXXXX,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4)
.......
Worked for me, hope it gives you a clue.
benchev
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options vit Na
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

Reply via email to