Module: kamailio
Branch: master
Commit: 675ab2daf819eb1eb1639e90ceba2cc3b29ab202
URL:
https://github.com/kamailio/kamailio/commit/675ab2daf819eb1eb1639e90ceba2cc…
Author: Julien Chavanton <jchavanton(a)gmail.com>
Committer: Julien Chavanton <jchavanton(a)gmail.com>
Date: 2019-07-08T19:45:10Z
rtp_media_server: drop in-dialog messages for
disconnected calls
---
Modified: src/modules/rtp_media_server/rtp_media_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/675ab2daf819eb1eb1639e90ceba2cc…
Patch:
https://github.com/kamailio/kamailio/commit/675ab2daf819eb1eb1639e90ceba2cc…
---
diff --git a/src/modules/rtp_media_server/rtp_media_server.c
b/src/modules/rtp_media_server/rtp_media_server.c
index 47d5ffdc07..37ddb1b998 100644
--- a/src/modules/rtp_media_server/rtp_media_server.c
+++ b/src/modules/rtp_media_server/rtp_media_server.c
@@ -1072,7 +1072,15 @@ static int rms_sip_request_f(struct sip_msg *msg)
LM_NOTICE("initial INVITE\n");
return 1;
} else {
- LM_NOTICE("in dialog message\n");
+ LM_NOTICE("in dialog message, state [%d]\n", di->state);
+ if (di->state == RMS_ST_DISCONNECTING) {
+ return -1; // ignore in dialog message in this state
+ } else if (di->state == RMS_ST_DISCONNECTED) {
+ rms_create_trans(msg);
+ if (!tmb.t_reply(msg, 481, "Call/Transaction Does Not Exist"))
+ return -1;
+ return 1;
+ }
}
rms_sip_forward(di, msg, method);