Steve Edwards
2016-Mar-18 20:35 UTC
[asterisk-users] Incoming INVITE with Portability Info and LRN
On Fri, 18 Mar 2016, Trey Hilyard wrote:> I thought this would be as easy as > exten => _XXXXXXXXXX\;rn=+19136630000,1,Goto(from_pstn,${EXTEN:0:10})Have you tried the '_!.' pattern? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
Steve Edwards
2016-Mar-19 00:58 UTC
[asterisk-users] Incoming INVITE with Portability Info and LRN
On Fri, 18 Mar 2016, Steve Edwards wrote:> Have you tried the '_!.' pattern?The '_x.' pattern works fine. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
Steve Edwards
2016-Mar-19 01:26 UTC
[asterisk-users] Incoming INVITE with Portability Info and LRN
> On Fri, 18 Mar 2016, Trey Hilyard wrote: > >> I thought this would be as easy as >> exten => _XXXXXXXXXX\;rn=+19136630000,1,Goto(from_pstn,${EXTEN:0:10})How about something like: [parse-lrn] exten = _x.,1, verbose(1,[${EXTEN}@${CONTEXT}]) same = n, set(DID=${CUT(EXTEN,\;,1)}) same = n, set(LRN=${CUT(EXTEN,\;,2):3:12}) same = n, execif($["${LRN:0:1}" = "+"]?set(LRN=${LRN:1})) same = n, execif($["${LRN:0:1}" = "1"]?set(LRN=${LRN:1})) same = n, goto(${LRN},${DID},1) same = n, hangup() -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
Trey Hilyard
2016-Mar-20 12:11 UTC
[asterisk-users] Incoming INVITE with Portability Info and LRN
On Mar 18, 2016 8:27 PM, "Steve Edwards" <asterisk.org at sedwards.com> wrote:>> >> On Fri, 18 Mar 2016, Trey Hilyard wrote: >> >>> I thought this would be as easy as >>> exten => _XXXXXXXXXX\;rn=+19136630000,1,Goto(from_pstn,${EXTEN:0:10}) > > > How about something like: > > [parse-lrn] > exten = _x.,1, verbose(1,[${EXTEN}@${CONTEXT}]) > same = n, set(DID=${CUT(EXTEN,\;,1)}) > same = n, set(LRN=${CUT(EXTEN,\;,2):3:12}) > same = n, execif($["${LRN:0:1}" "+"]?set(LRN=${LRN:1})) > same = n, execif($["${LRN:0:1}" "1"]?set(LRN=${LRN:1})) > same = n, goto(${LRN},${DID},1) > same = n, hangup()That's a good one. One thing it doesn't do is actually validate that the LRN is mine, but that shouldn't be tough to add now the the LRN is in its own variable. Thanks for the help!> > -- > Thanks in advance, > ------------------------------------------------------------------------- > Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST > https://www.linkedin.com/in/steve-edwards-4244281 > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160320/ab7c731e/attachment.html>