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@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@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@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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