<div dir="auto">Hi. <div dir="auto"><br></div><div dir="auto">As from textopsx module doc: "This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE." </div><div dir="auto"><br></div><div dir="auto">And you have error in your log: "<span style="font-family:sans-serif">Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textopsx [textopsx.c:159]: msg_apply_changes_f(): invalid usage - not in request route" </span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><font face="sans-serif">--</font></div><div dir="auto"><font face="sans-serif">Sergey Basov</font></div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">26 дек. 2016 г. 5:05 PM пользователь "Diego Nadares" <<a href="mailto:dnadares@gmail.com">dnadares@gmail.com</a>> написал:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry, I forgot to paste two log lines.<div><br></div><div>.....</div><div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textopsx [textopsx.c:159]: msg_apply_changes_f(): invalid usage - not in request route</div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textops [textops.c:1879]: append_multibody_helper(): Cannot get boundary. Is body multipart?</div></div><div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: INFO: <script>: NATMANAGE 172.16.213.38 172.16.208.11  <null></div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: INFO: <script>: NATMANAGE 172.16.208.11 Priv</div><div class="quoted-text"><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: INFO: <core> [msg_translator.c:1693]: get_boundary(): Content-Type hdr has no params <application/sdp></div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: WARNING: <core> [msg_translator.c:1959]: build_req_buf_from_sip_req(): check_boundaries error</div></div></div><div>....</div><div><br></div><div>For what I can see, it's not applying the changes.</div><div><br></div><div>I tested again with just set_body_multipart. The GTD content is set OK but SDP content IS NOT and there is no boundary at the end of the body.</div><div><br></div><div><div style="font-size:13px">if ($avp(ch)){</div><div class="quoted-text"><div style="font-size:13px">                     $var(gtd) ="IAM,\r\nGCI,asdafsdfasd\r\n\<wbr>r\n";       </div></div><div style="font-size:13px"><span style="font-size:small">                     set_body_multipart("$var(gtd)<wbr>", "application/gtd", "uniqueBoundary-1");</span><br></div></div><div><span style="font-size:13px">}</span><br></div><div><div><br></div><div>Dec 26 11:55:19 dwrfsd01 ./kamailio[8916]: INFO: <core> [msg_translator.c:1693]: get_boundary(): Content-Type hdr has no params <application/sdp></div><div>Dec 26 11:55:19 dwrfsd01 ./kamailio[8916]: WARNING: <core> [msg_translator.c:1959]: build_req_buf_from_sip_req(): check_boundaries error</div></div><div><br></div><div>body result:</div><div><br></div><div><div>Content-Length:   501.</div><div>Content-Type: multipart/mixed;boundary="<wbr>uniqueBoundary-1".</div><div>Mime-Version: 1.0. </div></div><div><br></div><div><div>--uniqueBoundary-1.</div><div>Content-Type: application/gtd.</div><div>.</div><div>IAM,.</div><div>CPC,.</div><div>GCI,sdfasdf.</div><div>.</div><div>--uniqueBoundary-1.</div><div class="quoted-text"><div>v=0.</div><div>o=user1 53655765 2353687637 IN IP4 172.16.213.38.</div><div>s=-.</div><div>c=IN IP4 172.16.213.38.</div><div>t=0 0.</div></div><div>m=audio 58778 RTP/AVP 8.</div><div>a=rtpmap:8 PCMA/8000.</div><div>a=sendrecv.</div><div>a=rtcp:58779.</div><div>a=ice-ufrag:2NRZkfr2.</div><div>a=ice-pwd:<wbr>rzffP1tp831WzYH0PTIOSMoVye.</div><div>a=candidate:fw7LZeIomEu5faq4 1 UDP 2130706431 172.16.213.38 58778 typ host.</div><div>a=candidate:fw7LZeIomEu5faq4 2 UDP 2130706430 172.16.213.38 58779 typ host.</div><div><br></div></div><div>Thanks!</div><font color="#888888"><div><br></div><div>Diego</div><div><br></div></font></div><div class="elided-text"><div class="gmail_extra"><br><div class="gmail_quote">2016-12-26 11:46 GMT-03:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>I'm trying to append a content type to a message that has only one content type. I tried using just set_body_multipart and now I'm using set_body multipart and append_body_part with no success too. </div><div><br></div><div>The result is a message with multipart but has "two" sdp and no gtd. It has the old sdp with no ip changed for rtpproxy and the new sdp with ip changed BUT with no content type.  And the message has not the end boundary (--unique-boundary-1.)</div><div><br></div><div>Kamailio log has an info and a warning</div><div><br></div><div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: INFO: <core> [msg_translator.c:1693]: get_boundary(): Content-Type hdr has no params <application/sdp></div><div>Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: WARNING: <core> [msg_translator.c:1959]: build_req_buf_from_sip_req(): check_boundaries error</div></div><div><br></div><div><br></div><div>kamailio.cfg</div><div><br></div><div>......</div><div><br></div><div>route[RELAY]{</div><div>$avp(ch) = 1</div><div>....</div><div><div>if ($avp(ch)){</div><div>                     set_body_multipart();</div><div>                     msg_apply_changes();</div><div>                     $var(gtd) ="IAM,\r\nGCI,asdafsdfasd\r\n\<wbr>r\n";       </div><div>                     append_body_part("$var(gtd)", "application/gtd", "signal;handling=optional");</div><div>}</div></div><div>....</div><div>}</div><div><br></div><div>Ngrep</div><div><br></div><div>U 2016/12/26 11:36:22.496634 <a href="http://172.16.213.21:5060" target="_blank">172.16.213.21:5060</a> -> <a href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a></div><div>...</div><div>Content-Type: application/sdp.<br></div><div><div>Content-Length:   137.</div><div>.</div><div>v=0.</div><div>o=user1 53655765 <a href="tel:02353%2068-7637" value="+542353687637" target="_blank">2353687637</a> IN IP4 172.16.213.21.</div><div>s=-.</div><div>c=IN IP4 172.16.213.21.</div><div>t=0 0.</div><div>m=audio 6000 RTP/AVP 8.</div><div>a=rtpmap:8 PCMA/8000.</div></div><div><br></div><div>U 2016/12/26 11:36:22.688458 <a href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a> -> <a href="http://172.16.208.11:5060" target="_blank">172.16.208.11:5060</a><br></div><div>....</div><div><div>Content-Type: multipart/mixed;boundary="uniq<wbr>ue-boundary-1".</div><div>Mime-Version: 1.0.</div><div>Remote-Party-ID: <<a href="http://sip:1152565064@172.16.213.38:5060" target="_blank">sip:1152565064@172.16.213.38:<wbr>5060</a>>;party=calling;privacy=of<wbr>f;screen=no.</div><div>.</div><div>--unique-boundary-1.</div><div>Content-Type: application/sdp.</div><div>.</div><div>v=0.</div><div>o=user1 53655765 <a href="tel:02353%2068-7637" value="+542353687637" target="_blank">2353687637</a> IN IP4 172.16.213.21.</div><div>s=-.</div><div>c=IN IP4 172.16.213.21.</div><div>t=0 0.</div><div>m=audio 6000 RTP/AVP 8.</div><div>a=rtpmap:8 PCMA/8000.</div><div>.</div><div>--unique-boundary-1.</div><div>v=0.</div><div>o=user1 53655765 <a href="tel:02353%2068-7637" value="+542353687637" target="_blank">2353687637</a> IN IP4 172.16.213.38.</div><div>s=-.</div><div>c=IN IP4 172.16.213.38.</div><div>t=0 0.</div><div>m=audio 58724 RTP/AVP 8.</div><div>a=rtpmap:8 PCMA/8000.</div><div>a=sendrecv.</div><div>a=rtcp:58725.</div><div>a=ice-ufrag:hhXDwrco.</div><div>a=ice-pwd:5temIXP8veOGuD8Dsllm<wbr>5HXkWU.</div></div><div><br></div><div>Any help will be very very appreciated!<br></div><div><br></div><div>Thanks in advance.</div><span class="m_-4754616845764088603HOEnZb"><font color="#888888"><div><br></div><div>Diego</div></font></span></div>
</blockquote></div><br></div>
</div><br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div></div>