Module: kamailio
Branch: 5.4
Commit: a5ee9476c8f403c42a6bc80d2228b49a39a0ca5b
URL:
https://github.com/kamailio/kamailio/commit/a5ee9476c8f403c42a6bc80d2228b49…
Author: Julien Chavanton <jchavanton(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-26T10:58:57+01:00
rtp_media_server: fix issue 2524
- fix completion without failure route
- rms_bridge automaticaly append missing ';' is not present
(cherry picked from commit 2ea4f685ea8b7dbca13b4fd521441088f8318d1f)
---
Modified: src/modules/rtp_media_server/docker/rtp_media_server.sh
Modified: src/modules/rtp_media_server/rtp_media_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a5ee9476c8f403c42a6bc80d2228b49…
Patch:
https://github.com/kamailio/kamailio/commit/a5ee9476c8f403c42a6bc80d2228b49…
---
diff --git a/src/modules/rtp_media_server/docker/rtp_media_server.sh
b/src/modules/rtp_media_server/docker/rtp_media_server.sh
index 02b842ad25..8f31f20623 100755
--- a/src/modules/rtp_media_server/docker/rtp_media_server.sh
+++ b/src/modules/rtp_media_server/docker/rtp_media_server.sh
@@ -4,7 +4,7 @@ CONTAINER=rtp_media_server
IMAGE=rtp_media_server:latest
docker stop ${CONTAINER}
docker rm ${CONTAINER}
-docker run -d --net=host --name=${CONTAINER} ${IMAGE} /bin/sh -c "tail -f
/dev/null"
+docker run -d --net=host --privileged --name=${CONTAINER} ${IMAGE} /bin/sh -c "tail
-f /dev/null"
echo ""
echo "manual steps required to start Kamailio in the container:"
@@ -13,3 +13,8 @@ echo " set the listen IP in /etc/kamailio.cfg"
echo " docker exec -it rtp_media_server bash"
echo " kamailio -m 64 -D -dd -f /etc/kamailio.cfg"
echo ""
+
+# ulimit -c unlimited
+# echo "/tmp/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
+# sysctl -w kernel.core_pattern=core
+# apt-get update && apt-get install -i gdb
diff --git a/src/modules/rtp_media_server/rtp_media_server.c
b/src/modules/rtp_media_server/rtp_media_server.c
index 99eca96484..5913921752 100644
--- a/src/modules/rtp_media_server/rtp_media_server.c
+++ b/src/modules/rtp_media_server/rtp_media_server.c
@@ -489,6 +489,8 @@ static void bridge_cb(struct cell *ptrans, int ntype, struct
tmcb_params *pcbp)
return;
} else if(ntype == TMCB_LOCAL_COMPLETED) {
LM_NOTICE("COMPLETED [%d]\n", pcbp->code);
+ if (pcbp->code >= 300)
+ return;
} else if(ntype == TMCB_LOCAL_RESPONSE_IN){
LM_NOTICE("RESPONSE [%d]\n", pcbp->code);
if (pcbp->code != 180 && pcbp->code != 183)
@@ -892,7 +894,13 @@ static int rms_bridge_f(struct sip_msg *msg, char *_target, char
*_route)
if(!rms_str_dup(&a->param, &target, 1)) {
goto error;
}
-
+ if (a->param.s[a->param.len-1] != ';') {
+ a->param.s = shm_realloc(a->param.s, a->param.len + 2);
+ a->param.s[a->param.len]=';';
+ a->param.len++;
+ a->param.s[a->param.len]= '\0';
+ LM_NOTICE("remote >>> target[%.*s]\n", a->param.len,
a->param.s);
+ }
a->route.len = route.len;
a->route.s = route.s;