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

Eric "ManxPower" Wieling eric at fnords.org
Fri Nov 2 13:04:35 CDT 2007


Tilghman Lesher wrote:
> On Friday 02 November 2007 12:07:48 Eric "ManxPower" Wieling wrote:
>> 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)
> 
> There's no need to go to these lengths.  chan_zap already parses out the
> ANI and places it in the Caller*ID field, with the DNIS becoming the initial
> extension.
> 
Oct 31 12:47:41 VERBOSE[30056] logger.c:     -- Executing
 >>> Set("Zap/49-1", "DID=1231234*4812*") in new stack

Looks to me like it is not working.  The poster did not paste anything 
before or after the VERBOSE message, and did not paste his dialplan, so 
I am making a few assumptions.



More information about the asterisk-users mailing list