Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-27 Thread Daniel-Constantin Mierla
Closed #1719. -- 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#event-1990169233___ Kamailio (SER) - Development Mailing List

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-27 Thread Daniel-Constantin Mierla
I added notes in docs that msg_apply_changes() may be required for each of multi-part manipulation functions. You can make pull requests if you want to add more there or other content. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread sergey-safarov
Is "append_body_part" usage mandatory here? Can we use next example if required "SDP + one additional content" ``` set_body_multipart("test", "text/plain", "delimiter"); msg_apply_changes(); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread Daniel-Constantin Mierla
Trying to figure out what solution worked and has to be given in the docs -- is it the next one? ``` set_body_multipart("test", "text/plain", "delimiter"); msg_apply_changes(); append_body_part(...); msg_apply_changes(); ``` -- You are receiving this because you are subscribed to this thread.

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread sergey-safarov
Daniel @miconda please look this [textops](https://www.kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.set_body_multipart) doc page Here is present usage example: ``` set_body_multipart("test", "text/plain", "delimiter"); msg_apply_changes(); append_body_part(...); ``` first two

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread Daniel-Constantin Mierla
In your 2nd comment above, I think you wrote same function name: ``` ... use msg_apply_changes after msg_apply_changes ... ``` probably you wanted to say a different function name there, right? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread sergey-safarov
Also questions Is need fix packet modifications when called "set_body_multipart" with 3 arguments? Please look original description. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread sergey-safarov
Think requirement of use msg_apply_changes after `msg_apply_changes` is need to add. Is required add protections to prevent crash when admin not applied changes? May be set flag that need to call `msg_apply_changes` and when call processing is finished check flag. If flag is set, then log error

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-21 Thread Daniel-Constantin Mierla
Is this a lack of mention in the docs that msg_apply_changes() has to be used? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-19 Thread sergey-safarov
Thanks @sergey-vb I have tested your suggestions. In this case message is converted to multipart properly. Looks as issue when added new body part. Related to https://github.com/kamailio/kamailio/issues/1631 -- You are receiving this because you are subscribed to this thread. Reply to this

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-18 Thread Sergey Basov
Sorry for delay. But according to doc for textops module: Set multipart body to a SIP message. If called with **no parameters, will convert present body** to multipart. So if you have look at my part of CFG: 1. I use **set_body_multipart(,"2123894789_1257887457");** to convert Corrent current

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-13 Thread sergey-safarov
Thanks @sergey-vb I have done this and tested. Please looks messages 1) [config change](https://github.com/kamailio/kamailio/issues/1719#issuecomment-437619001); 2) [logs](https://github.com/kamailio/kamailio/issues/1719#issuecomment-437619183). -- You are receiving this because you are

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-13 Thread Sergey Basov
> This may be related to log > > ``` > 16(27) ERROR: {1 21 INVITE 1851253425} [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.

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-10 Thread sergey-safarov
``` 26(174) DEBUG: tm [h_table.c:133]: free_cell_helper(): freeing transaction 0x7f289269dd08 from timer.c:654 16(164) DEBUG: [core/udp_server.c:514]: udp_rcv_loop(): probing packet received from 192.168.100.28 50195 13(161) DEBUG: [core/udp_server.c:491]: udp_rcv_loop(): received on udp

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-10 Thread sergey-safarov
Same results when used UDP transport on caller and callee legs. And when `set_body_multipart` is applied at start of `request_route` block ``` /* Main SIP request routing logic * - processing of any incoming SIP request starts with this route * - note: this is the same as route { ... } */

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-10 Thread sergey-safarov
This may be related to log ``` 16(27) ERROR: {1 21 INVITE 1851253425} [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. -- You are receiving

Re: [sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-10 Thread sergey-safarov
INVITE after modification is present in packet 16 of pcap file -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[sr-dev] [kamailio/kamailio] set_body_multipart produce broken body (#1719)

2018-11-10 Thread sergey-safarov
### Description I want convert INVITE message with SDP body to multypart body. To do this is used patch for reference kamailio.cfg ``` [root@safarov-dell kamailio]# diff -u kamailio.cfg kamailio2.cfg --- kamailio.cfg2018-11-09 18:28:36.0 +0300 +++ kamailio2.cfg 2018-11-10