[Freeswitch-users] Channel variables for npdi and rn on LRN dipped calls.
Ken Rice
krice at freeswitch.org
Sun Jan 6 20:19:52 MSK 2013
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,
I would warn against trusting the LRN you are sent if you do not explicitly
trust the customer sending you said LRN... Its not like its hard to spoof
the LRN replacnig the LRN from a high cost ratecenter with a low cost
ratecenter
K
On 1/6/13 8:12 AM, "Cal Leeming [Simplicity Media Ltd]"
<cal.leeming at simplicitymedialtd.co.uk> wrote:
> What the..
>
> I thought "Caller-Destination-Number" was always the cleaned dialed number
> (i.e. 5551234567) - is this not the case?
>
> Cal
>
> On Fri, Jan 4, 2013 at 5:38 PM, Victor Chukalovskiy
> <victor.chukalovskiy at gmail.com> wrote:
>> Hello and Happy New year!
>>
>> A SIP call comes in that was previously dipped. I'd like to be able to
>> have "rn" and "npdi" available as channel variables that I can use in
>> regex expressions. Is there a way to configure FreeSWITCH to put "rn"
>> and "npdi" into separate channel variable?
>>
>> So far, info application shows me the following channel variables that
>> contain LRN:
>>
>> Caller-Destination-Number: [5551234567;npdi=yes;rn=5555550001]
>> variable_sip_req_user: [5551234567;npdi=yes;rn=5555550001]
>> variable_sip_req_uri: [5551234567;npdi=yes;rn=5555550001 at 1.2.3.4:5060
>> <http://5555550001@1.2.3.4:5060> ]
>>
>> I can probably dissect those and put "rn" and "npdi" into separate
>> variables. But this means extra steps in dial-plan. In case there is a
>> built-in way to accomplish the same task, it would be great!
>>
>> Could you please let me know.
>>
>> Thank you,
>> Victor
>>
>> _________________________________________________________________________
>> 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
>
>
>
> _________________________________________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130106/1ac87d55/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list