[sr-dev] [kamailio/kamailio] coredump when used append_body_part (#1631)

sergey-safarov notifications at github.com
Mon Nov 19 12:19:45 CET 2018


I have tested two cases on reference config with loaded `textopsx.so` enabled roles.
```
+#!define WITH_DEBUG
+#!define WITH_MYSQL
+#!define WITH_AUTH
+#!define WITH_USRLOCDB
```
First case works as expected
```
/* Main SIP request routing logic
 * - processing of any incoming SIP request starts with this route
 * - note: this is the same as route { ... } */                     
request_route {                                                                
        if (is_method("INVITE") && has_body("application/sdp")) {
                set_body_multipart("delimiter");
                if (msg_apply_changes()) {
                    $var(b) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c";
                    append_body_part("$var(b)", "application/vnd.cirpack.isdn-ext", "signal;handling=required");
                    if(msg_apply_changes()) {
                        xlog("L_INFO", "Body converted Succesfully $rU \n");
                    }   
                }
        }
```

Second is generated core dump
```
/* Main SIP request routing logic
 * - processing of any incoming SIP request starts with this route
 * - note: this is the same as route { ... } */                     
request_route {                                                                
        if (is_method("INVITE") && has_body("application/sdp")) {
                set_body_multipart("delimiter");
                if (msg_apply_changes()) {
                    $var(b) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c";
                    append_body_part("$var(b)", "application/vnd.cirpack.isdn-ext", "signal;handling=required");
#                    if(msg_apply_changes()) {
#                        xlog("L_INFO", "Body converted Succesfully $rU \n");
#                    }   
                }
        }
```

Looks as kamailio generate core dump when added multipart and not called ` msg_apply_changes()` in call processing.

-- 
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/1631#issuecomment-439859312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181119/06c928bf/attachment.html>


More information about the sr-dev mailing list