[asterisk-users] Route an incoming call by ANI*DNIS

Eric "ManxPower" Wieling eric at fnords.org
Fri Nov 2 12:07:48 CDT 2007


exten => _XXXXXXX*XXXX*,1,Set(CALLERID(num)=${EXTEN:0:7)
exten => _XXXXXXX*XXXX*,n,Goto(${EXTEN:8:4},1)

The first line extracts the Caller*ID number from the incoming digits 
and sets the Caller*ID number to that value.

The second line goes to the actual extension or DID in your dialplan.

I have not tested this.  For more information on extracting characters 
from variables see README.variables (or whatever obvious name your 
version of Asterisk uses)

Dan Casey wrote:
> for this t1 my settings are
> d4,ami
> sf
> em_w
> 
> I was starting to suspect that em_w didn't support ANI.. I was hoping
> that this wasn't the case as the telco told me to use e&m wink.
> 
> I just went through "wink" nightmare with XO and i'm dreading repeating
> it..   I'll give it a try, thanks!
> 
> BJ Weschke wrote:
>> Dan Casey wrote:
>>   
>>> does anyone know how to route a call coming in with ANI*DNIS*
>>>
>>> Oct 31 12:47:41 VERBOSE[30056] logger.c:     -- Executing
>>> Set("Zap/49-1", "DID=1231234*4812*") in new stack
>>>
>>>
>>>
>>> I tried making a route for _.*4812*  but that matched everything rather
>>> then just the dnis i wanted..  any ideas?
>>>
>>> I would preferably like pass the callerid along to my extensions, but
>>> for now the important thing is routing.
>>>
>>>   
>>>     
>>  This shouldn't be necessary. I think with the correct signaling set in 
>> zaptel.conf, chan_zap should be doing the parsing work for you. What 
>> signaling are you set for now? You might want Feature Group D vs. EM_Wink?
>>
>> _______________________________________________
>> --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
>>   
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> --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
> 




More information about the asterisk-users mailing list