<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    use msg_apply_changes() after sdp_remove_line_by_prefix().<br>
    <br>
    <br>
    Also, you should do record_route() after applying changes.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 12/08/14 17:49, Narsay, Deep wrote:<br>
    </div>
    <blockquote
cite="mid:CAN0Hqb8fR-wQUWQgAzLmiuMgpqE28N=J4=GgzYX=xUbUU3+aAw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hello, </div>
        <div><br>
        </div>
        <div>Please let me know if there is any work around for this.</div>
        <div><br>
        </div>
        <div>Details of the issue: <br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>kamailio.cfg has this sequence in kamailio.cfg,<br>
        </div>
        <div><br>
        </div>
        <div>      ......</div>
        <div>      modparam("rtpproxy", "ice_candidate_priority_avp",
          "$avp(ice_priority)" )</div>
        <div>      ........</div>
        <div><br>
        </div>
        <div><span style="color:rgb(0,0,0)">     
            sdp_remove_line_by_prefix("a=candidate");</span><br>
        </div>
        <div><span style="color:rgb(0,0,0)">     
            set_iattr("ice_priority", "1");</span></div>
        <div><span style="color:rgb(0,0,0)">     
            rtpproxy_manage("frwie");</span></div>
        <div><span style="color:rgb(0,0,0)"><br>
          </span></div>
        <div>I'm seeing an issue towards the bottom of the SDP message. <br>
        </div>
        <div><font color="#000000"> </font></div>
        <div>
          <div style="color:rgb(0,0,0)">      ....</div>
        </div>
        <div><font color="#000000">      a=ssrc:738345272
            mslabel:VPELrlXvdfGmtevlYLEeVm6zq4JHvI4g</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=ssrc:738345272
            label:VPELrlXvdfGmtevlYLEeVm6zq4JHvI4ga0</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=ice-ufrag:YJuJWr9clIJHhENw</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=ice-pwd:3v1D1ShCg8xIlDZ9</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=candidate:1297581420
            1 udp 659136 10.1.2.3 17534 typ host generation 0</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=candidate:1297581420
            2 udp 659136 10.1.2.3 17535 typ host generation 0</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=ptime:20</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">\r\n</font></div>
        <div><span style="color:rgb(0,0,0)">     </span><span
            style="color:rgb(0,0,0)"> </span><font color="#000000">a=nortpproxy:yes\r\n </font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000">The call gets rejected by UA due to
            an invalid (empty) line in SDP.</font></div>
        <div><br>
        </div>
        <div>Very old but somewhat similar issue: </div>
        <div><a moz-do-not-send="true"
href="http://lists.sip-router.org/pipermail/users/2008-September/019605.html">http://lists.sip-router.org/pipermail/users/2008-September/019605.html</a><br>
        </div>
        <div><br>
        </div>
        <div>(Module authors, I'll be happy to code/test  or assist in
          any way possible if needed.) <br>
        </div>
        <div><br>
        </div>
        <div>
          <div><font color="#000000">Just to test it, I commented the
              following code snippet and the call worked. </font></div>
          <div><font color="#000000">But that can't be the permanent
              fix.</font></div>
        </div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><span style="color:rgb(0,0,0)">Thank you,</span><br>
        </div>
        <div><span style="color:rgb(0,0,0)">- Deep N</span></div>
        <div><span style="color:rgb(0,0,0)"><br>
          </span></div>
        <div><span style="color:rgb(0,0,0)"><br>
          </span></div>
        <div><span style="color:rgb(0,0,0)">Code snippet:</span><span
            style="color:rgb(0,0,0)">rtp_proxy.c::force_rtp_proxy
            starting from line 2850</span></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000"><i>
              <div>        if (proxied == 0 &&
                nortpproxy_str.len) {</div>
              <div>                cp = pkg_malloc((nortpproxy_str.len +
                CRLF_LEN) * sizeof(char));</div>
              <div>                if (cp == NULL) {</div>
              <div>                        LM_ERR("out of pkg
                memory\n");</div>
              <div>                        return -1;</div>
              <div>                }</div>
              <div>                anchor = anchor_lump(msg, body.s +
                body.len - msg->buf, 0, 0);</div>
              <div>                if (anchor == NULL) {</div>
              <div>                        LM_ERR("anchor_lump
                failed\n");</div>
              <div>                        pkg_free(cp);</div>
              <div>                        return -1;</div>
              <div>
                                }</div>
              <div>                memcpy(cp, CRLF, CRLF_LEN);</div>
              <div>                memcpy(cp + CRLF_LEN,
                nortpproxy_str.s, nortpproxy_str.len);</div>
              <div>                if (insert_new_lump_after(anchor, cp,
                nortpproxy_str.len + CRLF_LEN, 0) == NULL) {</div>
              <div>                        LM_ERR("insert_new_lump_after
                failed\n");</div>
              <div>                        pkg_free(cp);</div>
              <div>                        return -1;</div>
              <div>                }</div>
              <div>        }</div>
            </i></font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><br>
        </div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000"><br>
          </font></div>
        <div><font color="#000000"><br>
          </font></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
  </body>
</html>