[asterisk-users] Re: Please help parse this GotoIf line

Larry Alkoff labradley at mindspring.com
Thu Feb 1 23:14:55 MST 2007


Thanks for your reply Anselm.  I'll play it with tomorrow.

Let me ask a related question.  I also have to assign a calleridnum 
(number) of 'Internal' to each extension dialed on an internal to 
internal call.  They would all have 4 digit calleridnum in the range 4??
( or _4xx in dial plan form ) to be changed to 'Internal'.  I'd like to 
avoid many lines of code so is there any way to do that with a wild card 
or dial plan type?

Larry


Anselm Martin Hoffmeister wrote:
> Am Donnerstag, den 01.02.2007, 16:15 -0600 schrieb Larry Alkoff:
>> I wish to have my Grandstream GXP-2000 phones make a different 
>> distinctive ring for internal calls ( Internal ) or if the incoming call 
>> has no caller id 'NOCID'.
>>
>> The Grandstream phones calls allow 3 distinctive rings depending on the 
>> caller id.  I have one set up and working for 'Internal' calls but 
>> unfortunately the same tone will ring if caller id is absent on a call.
>>
>> My solution is to insert a caller id number of 'NOCID' if there is no 
>> caller id to have separate ring tones for 'NOCID' and "Internal' calls.
>>
>> I have gotten this far for the nth line in my extensions.conf 
>> [telasip-in] context but need help with the syntax.
>> In Asteriskish it would look something like:
>>
>> exten => s,n,GotoIf( NO  ${CALLERID} then SetCIDNum(NOCID)
> 
> I think something like
> 
> exten => s,n,GotoIf($["${CALLERID}" = ""]?anonymous:withnumber)
> exten => s,n(anonymous),Set(CALLERID(num)="NOCID")
> exten => s,n(withnumber),..........
> 
> should do the trick.
> 
> BR
> Anselm
> 
> _______________________________________________
> --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
> 


-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux


More information about the asterisk-users mailing list