<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>you can do it only using some regexp over the body (see the
      textops module, the search_body() function) :<br>
      &nbsp;&nbsp;&nbsp;
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id249149">http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id249149</a><br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 12/13/2012 05:00 PM, Dragomir Haralambiev wrote:
    <blockquote
cite="mid:CADzurOJa9gETuexFJ2SBAKm0S_CFVVn5mZ2iXq42HvFwxpQhKg@mail.gmail.com"
      type="cite">
      <p dir="ltr">How to test "a=" in SDP?<br>
      </p>
      <div class="gmail_quote">On Dec 13, 2012 4:54 PM, "Bogdan-Andrei
        Iancu" &lt;<a moz-do-not-send="true"
          href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt;
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> <tt>Hi,<br>
              <br>
              That test is checking the "c=" only in SDP.<br>
              <br>
              Regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
            <br>
            On 12/13/2012 04:13 PM, Dragomir Haralambiev wrote:
            <blockquote type="cite">
              <div>Hi Bogdan,</div>
              <div>Here is part ot script for test.</div>
              <div>The nat_uac_test("8")&nbsp; must to check SDP for RFC1918
                addresses. </div>
              <div>The follow line contens&nbsp; RFC1918 address:</div>
              <div>a=rtcp:4001 IN IP4 <strong>10.58.21.91</strong></div>
              <div>&nbsp;</div>
              <div><br>
                if ( nat_uac_test("1") ) { setflag(6);&nbsp; }<br>
                if ( nat_uac_test("2") ) { setflag(6);&nbsp; }<br>
                if ( nat_uac_test("4") ) { setflag(6);&nbsp; }<br>
                if (has_body("")) {<br>
                &nbsp;&nbsp;&nbsp;&nbsp; if ( nat_uac_test("8") ) { setflag(6);&nbsp;}<br>
                }<br>
                if ( nat_uac_test("16") ) { setflag(6);&nbsp;} <br>
                if ( nat_uac_test("32") ) { setflag(6);&nbsp;} <br>
                &nbsp;if (isflagset(6)) {<br>
                &nbsp;&nbsp;xlog("L_ERR",&nbsp;"NAT.");<br>
                &nbsp;&nbsp; ................</div>
              <div>}<br>
              </div>
              <div class="gmail_quote">2012/12/13 Bogdan-Andrei Iancu <span
                  dir="ltr">&lt;<a moz-do-not-send="true"
                    href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br>
                <blockquote style="margin: 0px 0px 0px 0.8ex;
                  padding-left: 1ex; border-left: 1px solid rgb(204,
                  204, 204);" class="gmail_quote">
                  <div text="#000000" bgcolor="#ffffff"> <tt>Hi,<br>
                      <br>
                      What flags you pass to the nat_uac_test() ?<br>
                      <br>
                      Regards,<br>
                    </tt>
                    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                    <div>
                      <div> <br>
                        On 12/13/2012 01:24 PM, Dragomir Haralambiev
                        wrote: </div>
                    </div>
                    <blockquote type="cite">
                      <div>
                        <div>
                          <div>Hello,</div>
                          <div>&nbsp;</div>
                          <div>I try to use nat_uac_test() . </div>
                          <div>When receive follow INVITE from NAT the
                            test not detected it.</div>
                          <div>Opensips v 1.8.2 revision 9513.</div>
                          <div>&nbsp;</div>
                          <div>Where is problem?</div>
                          <div>&nbsp;</div>
                          <div>INVITE <a moz-do-not-send="true"
                              href="mailto:sip%3A555999@88.88.0.14"
                              target="_blank">sip:555999@88.88.0.14</a>
                            SIP/2.0<br>
                            Via: SIP/2.0/UDP
212.5.131.212:39341;rport;branch=z9hG4bKPjFmHm4jnyGald.hObqHkEIS7i4y4.0dR3<br>
                            Max-Forwards: 70<br>
                            From: &lt;<a moz-do-not-send="true"
                              href="mailto:sip%3A333444@88.88.0.14"
                              target="_blank">sip:333444@88.88.0.14</a>&gt;;tag=Sfzzdvhpt.7UiJXb9b5mGkw5QWhgtjNp<br>
                            To: &lt;<a moz-do-not-send="true"
                              href="mailto:sip%3A555999@88.88.0.14"
                              target="_blank">sip:555999@88.88.0.14</a>&gt;<br>
                            Contact: <a moz-do-not-send="true">&lt;sip:333444@212.5.131.212:39341;ob&gt;</a><br>
                            Call-ID: z3ssVT-EYYzXYLauvoVlFzbyyB0MyHKy<br>
                            CSeq: 18523 INVITE<br>
                            Route: <a moz-do-not-send="true">&lt;sip:88.88.0.14;transport=udp;lr&gt;</a><br>
                            Allow: PRACK, INVITE, ACK, BYE, CANCEL,
                            UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE,
                            OPTIONS<br>
                            Supported: replaces, 100rel, timer,
                            norefersub<br>
                            Session-Expires: 1800<br>
                            Min-SE: 90<br>
                            User-Agent: CSipSimple_m0-16/r2044<br>
                            Content-Type: application/sdp<br>
                            Content-Length:&nbsp;&nbsp; 359</div>
                          <div>v=0<br>
                            o=- 3564378184 3564378184 IN IP4
                            212.5.131.212<br>
                            s=pjmedia<br>
                            c=IN IP4 212.5.131.212<br>
                            t=0 0<br>
                            m=audio 4000 RTP/AVP 18 3 0 8 101<br>
                            c=IN IP4 212.5.131.212<br>
                            a=rtcp:4001 IN IP4 10.58.21.91<br>
                            a=sendrecv<br>
                            a=rtpmap:18 G729/8000<br>
                            a=fmtp:18 annexb=no<br>
                            a=rtpmap:3 GSM/8000<br>
                            a=rtpmap:0 PCMU/8000<br>
                            a=rtpmap:8 PCMA/8000<br>
                            a=rtpmap:101 telephone-event/8000<br>
                            a=fmtp:101 0-15<br>
                          </div>
                        </div>
                      </div>
                      <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                    </blockquote>
                  </div>
                </blockquote>
              </div>
              <br>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>