[Freeswitch-users] Channel variables for npdi and rn on LRN dipped calls.

Michael Collins msc at freeswitch.org
Tue Jan 8 04:00:09 MSK 2013


On Mon, Jan 7, 2013 at 12:45 PM, Victor Chukalovskiy <
victor.chukalovskiy at gmail.com> wrote:

>  Ken,
>
> Thank you very much for feedback. I'll then follow your regex example to
> parse it.
>
> -Victor
>
>  On 13-01-06 12:19 PM, Ken Rice wrote:
>
> You have to parse out the NDPI and RN values...
>
> Just use a regex like
> ^(?:+1|1)?([2-9]\d{2}[2-9]\d{6});ndpi=(*.);rn=([2-9]\d{2}[2-9]\d{6})$
> That will get dialed digits in $1, ndpi value in $2, then LRN in $3,
>
> Just a quick FYI... be careful when you use .* because it will try to
match EVERYTHING. Also, Ken accidentally typed (*.) which I'm sure wasn't
what he was aiming for. ;)

Maybe this would be more effective:
^(?:+1|1)?([2-9]\d{2}[2-9]\d{6});ndpi=(.*?);rn=([2-9]\d{2}[2-9]\d{6})$

-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130107/1649bd26/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list