Jon Weisman
2007-Nov-09 00:34 UTC
[asterisk-users] If caller id is null set to a specific number
All, If someone calls into my asterisk box and has a private number I would like to set the callers id to a specific telephone number, only when the ANI is missing, otherwise if present just pass it along. Any ideas? TIA, Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071108/d21a4dd2/attachment.htm
Michelle Dupuis
2007-Nov-09 00:54 UTC
[asterisk-users] If caller id is null set to a specific number
Have a look at the smartCID script on www.generationt.com It allows you to have a database of numbers and override the name (and number), flag numbers for screening, etc. MD _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jon Weisman Sent: Thursday, November 08, 2007 7:35 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] If caller id is null set to a specific number All, If someone calls into my asterisk box and has a private number I would like to set the callers id to a specific telephone number, only when the ANI is missing, otherwise if present just pass it along. Any ideas? TIA, Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071108/c22a4a2c/attachment-0001.htm
Doug Lytle
2007-Nov-09 01:14 UTC
[asterisk-users] If caller id is null set to a specific number
Jon Weisman wrote:> All, > > If someone calls into my asterisk box and has a private number I would > like to set the callers id to a specific telephone number, only when > the ANI is missing, otherwise if present just pass it along. Any ideas?[incoming] exten => s,1,Gosubif($["${CALLERID(number)}" = "" ]?set-cid,s,1:2) [set-cid] exten => s,1,Set(CALLERID(number)=5551212) exten => s,n,Return() Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Jon Weisman
2007-Nov-09 01:35 UTC
[asterisk-users] If caller id is null set to a specific number
I get the same response with or w/o ANI... :( ----- Original Message ----- From: "Doug Lytle" <support at drdos.info> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Sent: Thursday, November 08, 2007 8:14 PM Subject: Re: [asterisk-users] If caller id is null set to a specific number> Jon Weisman wrote: >> All, >> >> If someone calls into my asterisk box and has a private number I would >> like to set the callers id to a specific telephone number, only when >> the ANI is missing, otherwise if present just pass it along. Any ideas? > > [incoming] > > exten => s,1,Gosubif($["${CALLERID(number)}" = "" ]?set-cid,s,1:2) > > [set-cid] > > exten => s,1,Set(CALLERID(number)=5551212) > exten => s,n,Return() > > Doug > > -- > Ben Franklin quote: > > "Those who would give up Essential Liberty to purchase a little Temporary > Safety, deserve neither Liberty nor Safety." > > > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Eric "ManxPower" Wieling
2007-Nov-09 05:06 UTC
[asterisk-users] If caller id is null set to a specific number
Doug Lytle wrote:> Jon Weisman wrote: >> All, >> >> If someone calls into my asterisk box and has a private number I would >> like to set the callers id to a specific telephone number, only when >> the ANI is missing, otherwise if present just pass it along. Any ideas? > > [incoming] > > exten => s,1,Gosubif($["${CALLERID(number)}" = "" ]?set-cid,s,1:2) > > [set-cid] > > exten => s,1,Set(CALLERID(number)=5551212) > exten => s,n,Return()ANI is not Caller*ID. A caller can block their Caller*ID, but not their ANI. It is CALLERID(num), not CALLERID(number) In 1.2+ you can do it as (all one line): exten => s,1,ExecIf($["${CALLERID(num)}" = ""],Set,CALLERID(num)=4055551212) OR exten => s,1,ExecIf($[${LEN(${CALLERID(num)})} = 0],Set,CALLERID(num)=4055551212)