[sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)
Sergey Basov
notifications at github.com
Tue Nov 13 15:32:59 CET 2018
> This may be related to log
>
> ```
> 16(27) ERROR: {1 21 INVITE 1851253425} <core> [core/msg_translator.c:3290]: sip_msg_apply_changes(): cannot apply msg changes after adding record-route header - it breaks conditional 2nd header
> ```
>
> Think in this case must be send original INVITE.
Hi.
You need to do record_route() after convert body to multipart.
I have this case in production.
```
if( is_method("INVITE") && has_body("application/sdp"))
{
if (msg_apply_changes())
{
xlog("L_INFO", "ISUP 0 Changes Applied Succesfully");
}
set_body_multipart(,"2123894789_1257887457");
if (msg_apply_changes())
{
xlog("L_INFO", "ISUP 1 Changes Applied Succesfully");
}
append_body_part_hex("01 10 48 00 0a 00 02 09 07 03 90 90 13 71 32 20 0a 04 02 13 73 12 00","application/isup;version=itu-t92+","signal;handling=optional");
if(msg_apply_changes())
{
xlog("L_INFO", "ISUP 2 Changes Applied Succesfully $rU \n");
}
record_route();
}
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1719#issuecomment-438286608
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181113/59440c10/attachment.html>
More information about the sr-dev
mailing list