<p dir="ltr">Hi, David</p>
<p dir="ltr">I will try to collect trace for normal SIP-I session and e-mail it to you.</p>
<div class="gmail_extra"><br><div class="gmail_quote">8 нояб. 2016 г. 5:55 PM пользователь "david" <<a href="mailto:descartin@bts.io">descartin@bts.io</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>


  
  

<div>
hello Sergey<br>
<br>
yes i was using them with a IAM ISUP part inside the SIP response, so they were doing something, but it's not correct so it must be an ACM, ANM depending on the response.<br>
i made some more tests and i saw the issue is not with append_body_part which seems it's doing ok.<br>
<br>
it's with set_body_multipart when in responses seems cannot detect the body last boundary and close it by -- so the ISUP is malformed<br>
<br>
i could workaround this by parsing the body and adding it <br>
<br>
route[SIPISUP] {<br>
    msg_apply_changes();<br>
    set_body_multipart();<br>
    msg_apply_changes();<br>
    $var(isup) = "\x06\x12\x25\x01\x39\x02\x12\<wbr>x01\x00";<br>
    append_body_part("$var(isup)",<wbr>"application/isup;version=itu-<wbr>t92+","signal;handling=<wbr>optional");<br>
    msg_apply_changes();<br>
    $avp(s:xxxx) = $rb;<br>
    $var(xxxx) = $(avp(s:xxxx){re.subst,/(.*)--<wbr>unique-boundary-1(.*)/\1--<wbr>unique-boundary-1--\2/sg});<br>
    set_body("$var(xxxx)","<wbr>multipart/mixed;boundary=\"<wbr>unique-boundary-1\"");<br>
}<br>
<br>
this way at least we have a base ISUP part for a 1XX response <br>
<br>
best regards<br>
david<br>
<br>
<br>
<br>
<br>
El lun, 07-11-2016 a las 23:08 +0200, Sergey Basov escribió:
<blockquote type="CITE">
<pre>
Hi David,

if you look at source code of the sipt module
<a href="https://github.com/kamailio/kamailio/blob/master/modules/sipt/sipt.c" target="_blank">https://github.com/kamailio/<wbr>kamailio/blob/master/modules/<wbr>sipt/sipt.c</a>

functions sipt_destination & sipt_set_calling works only for ISUP_IAM.

But as I know from my tests ISUP encapsulation must be only in invite,
and is optional for other messages.
--
Best regards,
Sergey Basov                     e-mail: <a href="mailto:sergey.v.basov@gmail.com" target="_blank">sergey.v.basov@gmail.com</a>

tel: <a href="tel:%28%2B38067%29%20403-62-54" value="+380674036254" target="_blank">(+38067) 403-62-54</a>


2016-11-07 19:19 GMT+02:00 david <<a href="mailto:descartin@bts.io" target="_blank">descartin@bts.io</a>>:
<font color="#737373">> hello all</font>
<font color="#737373">></font>
<font color="#737373">> i'm using kam version 4.4.1 and i would like to generate an ISUP part on the</font>
<font color="#737373">> 1xx,2xx responses to a remote carrier since the fsw i send the calls to</font>
<font color="#737373">> cannot handle ISUP SDP.</font>
<font color="#737373">> despite seeing in the doc that those functions cannot be used there and only</font>
<font color="#737373">> in  REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE, i tried and it works....</font>
<font color="#737373">> partially, because it seems it doesnt create the last boundary and it</font>
<font color="#737373">> creates a next boundary with an empty "Encapsulated multipart part: "</font>
<font color="#737373">></font>
<font color="#737373">> this the the route i call from onreply_route</font>
<font color="#737373">></font>
<font color="#737373">> route[SIPISUP] {</font>
<font color="#737373">>     set_body_multipart();</font>
<font color="#737373">>     msg_apply_changes();</font>
<font color="#737373">>     $var(isup) =</font>
<font color="#737373">> "\x01\x12\x49\x01\x0a\x03\x02\<wbr>x0a\x08\x84\x90\x33\x41\x72\<wbr>x17\x01\x06\x0a\x08\x04\x13\<wbr>x93\x70\x21\x73\x23\x10\x08\<wbr>x01\x01\x00";</font>
<font color="#737373">></font>
<font color="#737373">> append_body_part("$var(isup)",<wbr>"application/isup;version=itu-<wbr>t92+","signal;handling=<wbr>optional");</font>
<font color="#737373">>     msg_apply_changes();</font>
<font color="#737373">>     sipt_destination($rU, 31, 4);</font>
<font color="#737373">>     sipt_set_calling($fU, 4, 0, 3);</font>
<font color="#737373">>     msg_apply_changes();</font>
<font color="#737373">> }</font>
<font color="#737373">></font>
<font color="#737373">> am i doing something wrong? how can i set this to end the SDP with last</font>
<font color="#737373">> boundary?</font>
<font color="#737373">></font>
<font color="#737373">> thanks a lot and regards</font>
<font color="#737373">> david</font>
<font color="#737373">></font>
<font color="#737373">></font>
<font color="#737373">> ______________________________<wbr>_________________</font>
<font color="#737373">> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list</font>
<font color="#737373">> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a></font>
<font color="#737373">> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a></font>
<font color="#737373">></font>

______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>
</pre>
</blockquote>
<br>
</div>

</blockquote></div></div>