[Asterisk-Users] Dial through IAX to FWD

Andrew C. Brown andy_lists at bananabread.net
Wed Jul 27 11:13:44 MST 2005


Walid Azab wrote:
> 
> Hi..
>  
> I am trying to do something but it is giving me some hard time here. I
> have an IAX2 trunk to FWD which is registered and working just fine. I
> have =>* 011|. *as my dial pattern to allow that. But if I want to dial
> a toll free number I would have to  dial 011*1800XXXXXXX
>  
> What trunk dial rule should I use to enable anyone to call a toll free
> number by simply dialing 1800XXXXXX instead of having to dial
> 011*1800XXXXXXX?
> 
>  
> Thanks
> 

You have to start the string with an underscore '_' if you want asterisk
to evaluate it as a generalized pattern.

If I am understanding correctly what you want:

=> _1800|.,1,Dial(IAX/yourFWDidstring/${EXTEN},60,r)

=> _011|.,1 Dial(IAX/yourFWDidstring/${EXTEN:3},60,r)

Anything beginning with 011 would be routed out FWD with the number
following 011 since ${EXTEN:3} represents what the user dialed but with
the first three digits stripped off. Anything beginning with 1800 would
be routed out FWD with the 1800 number exactly as dialed.



More information about the asterisk-users mailing list