<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.8.4">
</HEAD>
<BODY>
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\x01\x00";<BR>
    append_body_part("$var(isup)","application/isup;version=itu-t92+","signal;handling=optional");<BR>
    msg_apply_changes();<BR>
    $avp(s:xxxx) = $rb;<BR>
    $var(xxxx) = $(avp(s:xxxx){re.subst,/(.*)--unique-boundary-1(.*)/\1--unique-boundary-1--\2/sg});<BR>
    set_body("$var(xxxx)","multipart/mixed;boundary=\"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">https://github.com/kamailio/kamailio/blob/master/modules/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">sergey.v.basov@gmail.com</A>

tel: (+38067) 403-62-54


2016-11-07 19:19 GMT+02:00 david <<A HREF="mailto:descartin@bts.io">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\x0a\x08\x84\x90\x33\x41\x72\x17\x01\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x01\x00";</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> append_body_part("$var(isup)","application/isup;version=itu-t92+","signal;handling=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">> _______________________________________________</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">sr-users@lists.sip-router.org</A></FONT>
<FONT COLOR="#737373">> <A HREF="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</A></FONT>
<FONT COLOR="#737373">></FONT>

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<A HREF="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A>
<A 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>
</BODY>
</HTML>