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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050727/4a2781d5/attachment.htm
On Wed, 27 Jul 2005 18:07:23 +0200 "Walid Azab" <wazab@star-communications.net> 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? > > > ThanksAre you using Aserisk@Home or setting up the configs yourself??
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.