[asterisk-users] Incoming INVITE with Portability Info and LRN

Steve Edwards asterisk.org at sedwards.com
Fri Mar 18 20:26:50 CDT 2016


> 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



More information about the asterisk-users mailing list