[asterisk-users] How to handle "+" prefix

Adrian Marsh Adrian.Marsh at ubiquisys.com
Mon Sep 3 09:22:58 CDT 2007


The Goto solutions worked fine for me, substitute a 00 for the +, then pass
onto our carriers who take it from there.

Thanks for all the feedback though.  Most amusing.. :)


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Brandon Kruse
Sent: 02 September 2007 17:45
To: murf at digium.com; Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to handle "+" prefix

I had to do some work on the GUI for bandwidth, which sends
and matches + on every number.

To combat this, I just added one that says
exten => +extensionhere,1,Goto(${EXTEN:1})
exten => extensionhere,1,Noop("sweet.")

-bk
----- Original Message -----
From: "Steve Murphy" <murf at digium.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Saturday, September 1, 2007 5:49:17 PM (GMT-0800) America/Los_Angeles
Subject: Re: [asterisk-users] How to handle "+" prefix

On Thu, 2007-08-30 at 10:17 -0500, Brian West wrote:
> On Aug 30, 2007, at 10:11 AM, Jared Smith wrote:
> 
> > On Thu, 2007-08-30 at 15:42 +0100, Adrian Marsh wrote:
> >> Is there a way of using variables within the dialplan, eg:
> >>
> >> [globals]
> >> SOMEVAR=0179344
> >>
> >> [local]
> >> exten => _${SOMEVAR}.,1,NoOp(Dialled own number)
> >
> > No, unfortunately you can't use variables as part of the extension  
> > name
> > or pattern match.
> >
> 
> 
> Since when?  I knew you couldn't use them for pattern matches but in  
> 1.2 you could at one point I tested this personally.

Brian's right. But, the variable has to be a global, and is evaluated at
the time the extensions.conf file is read in; so, really, it's a
constant, and isn't evaluated at all at dial time. So, if you do one of
those "dialplan show" things, you'll see that the variable has been
substituted. Just had to fix a bug where AEL didn't provide the same
service.

murf


-- 
Steve Murphy
Software Developer
Digium


_______________________________________________
--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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3659 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20070903/c24dbb2e/attachment.bin 


More information about the asterisk-users mailing list