[asterisk-users] CID and CDR conflict?

Leo Ann Boon leo at datvoiz.com
Sun Oct 29 23:01:44 MST 2006


Mike Diehl wrote:
> Hi all,
>
> I've been beating my head against this for some time now.
>
> For incoming calls, I'd like to send my users a "localized" caller id number.  
> By "localized," I mean one with out the 1+areacode for local calls and only 
> 10 digits (minus the leading 1) for long distance calls.
>
> For example:
>
> I get a call from 15055551234.  Since I live in the 505, I should see:
> 5551234 on my caller id.
>
> However, if I get a call from 18035556789, I should see:
> 8035556789 on my caller id.
>
> The problem is that I also want to preserve the original calling number in my 
> CDR(src) field.  But everytime I change the CID number, it changes the 
> CDR(src) field.
>
> Is there any way I can have the best of both worlds?
>   
More than 1 ways to skin the rabbit:
a. Set CALLERID(num) to localized number for and store the original cid 
in the CDR(userfield)
b. Set CALLERID(name) to localized number. This method depends on the 
phone. Some phone will display only the name part if it's supplied (what 
you want), others will show both. The CDR(src) is preserved but 
CDR(clid) will look like "5551234" <1505551234>

Leo




More information about the asterisk-users mailing list