<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Ken,<br>
      <br>
      Thank you very much for feedback. I'll then follow your regex
      example to parse it.<br>
      <br>
      -Victor<br>
      <pre class="moz-signature" cols="72">
</pre>
      On 13-01-06 12:19 PM, Ken Rice wrote:<br>
    </div>
    <blockquote cite="mid:CD0F0E58.68983%25krice@freeswitch.org"
      type="cite">
      <title>Re: [Freeswitch-users] Channel variables for npdi and rn on
        LRN dipped calls.</title>
      <font face="Monaco, Courier New"><span style="font-size:11pt">You
          have to parse out the NDPI and RN values...<br>
          <br>
          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})$<br>
          That will get dialed digits in $1, ndpi value in $2, then LRN
          in $3,<br>
          <br>
          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<br>
          <br>
          K<br>
          <br>
          On 1/6/13 8:12 AM, "Cal Leeming [Simplicity Media Ltd]" &lt;<a
            moz-do-not-send="true"
            href="cal.leeming@simplicitymedialtd.co.uk">cal.leeming@simplicitymedialtd.co.uk</a>&gt;
          wrote:<br>
          <br>
        </span></font>
      <blockquote><font face="Monaco, Courier New"><span
            style="font-size:11pt">What the..<br>
            <br>
            I thought "Caller-Destination-Number" was always the cleaned
            dialed number (i.e.&nbsp;5551234567) - is this not the case?<br>
            <br>
            Cal<br>
            <br>
            On Fri, Jan 4, 2013 at 5:38 PM, Victor Chukalovskiy &lt;<a
              moz-do-not-send="true"
              href="victor.chukalovskiy@gmail.com">victor.chukalovskiy@gmail.com</a>&gt;
            wrote:<br>
          </span></font>
        <blockquote><font face="Monaco, Courier New"><span
              style="font-size:11pt">Hello and Happy New year!<br>
              <br>
              A SIP call comes in that was previously dipped. I'd like
              to be able to<br>
              have "rn" and "npdi" available as channel variables that I
              can use in<br>
              regex expressions. Is there a way to configure FreeSWITCH
              to put "rn"<br>
              and "npdi" into separate channel variable?<br>
              <br>
              So far, info application shows me the following channel
              variables that<br>
              contain LRN:<br>
              <br>
              Caller-Destination-Number:
              [5551234567;npdi=yes;rn=5555550001]<br>
              variable_sip_req_user: [5551234567;npdi=yes;rn=5555550001]<br>
              variable_sip_req_uri: [5551234567;npdi=yes;<a
                moz-do-not-send="true" href="rn=5555550001@1.2.3.4:5060">rn=5555550001@1.2.3.4:5060</a>
              &lt;<a moz-do-not-send="true"
                href="http://5555550001@1.2.3.4:5060">http://5555550001@1.2.3.4:5060</a>&gt;
              ]<br>
              <br>
              I can probably dissect those and put "rn" and "npdi" into
              separate<br>
              variables. But this means extra steps in dial-plan. In
              case there is a<br>
              built-in way to accomplish the same task, it would be
              great!<br>
              <br>
              Could you please let me know.<br>
              <br>
              Thank you,<br>
              Victor<br>
              <br>
_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a moz-do-not-send="true" href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              <br>
              FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
            </span></font></blockquote>
        <font face="Monaco, Courier New"><span style="font-size:11pt"><br>
            <br>
            <hr size="3" width="95%" align="CENTER"></span></font><font
          size="2"><font face="Consolas, Courier New, Courier"><span
              style="font-size:10pt">_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a moz-do-not-send="true" href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              <br>
              FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
            </span></font></font></blockquote>
      <font size="2"><font face="Consolas, Courier New, Courier"><span
            style="font-size:10pt"><br>
          </span></font></font><font face="Monaco, Courier New"><span
          style="font-size:11pt">-- <br>
          Ken<br>
          <font color="#0000FF"><u><a moz-do-not-send="true"
                href="http://www.FreeSWITCH.org">http://www.FreeSWITCH.org</a><br>
              <a moz-do-not-send="true" href="http://www.ClueCon.com">http://www.ClueCon.com</a><br>
              <a moz-do-not-send="true" href="http://www.OSTAG.org">http://www.OSTAG.org</a><br>
            </u></font>irc.freenode.net #freeswitch<br>
        </span></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>