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

Michael Collins msc at freeswitch.org
Tue Jan 8 04:59:37 MSK 2013


In this case the ? modifies the *, so there's .* (greedy) and .*? (not
greedy)

You want your .* to match as little as possible instead of as much as
possible. If you use .* instead of .*? then your $2 would contain both the
ndpi info but also it would have ";rn=18005551212" b/c the .* would grab
all that stuff. The .*? would only grab up to the ";rn".

Just adding that info for posterity's sake. :)

-MC

On Mon, Jan 7, 2013 at 5:05 PM, Ken Rice <krice at freeswitch.org> wrote:

>  Ooops yeah I mean .*... The ? Is pretty useless there... Since there
> should always be something if they send ndpi=
>
>
> On 1/7/13 7:00 PM, "Michael Collins" <msc at freeswitch.org> wrote:
>
>
> 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
>
> ------------------------------
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> --
> Ken
> *http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
> *irc.freenode.net #freeswitch
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130107/99fc0a73/attachment-0001.html 


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