Module: kamailio
Branch: master
Commit: da70040e8f782e90ab8378f54f210e8752b085bc
URL:
https://github.com/kamailio/kamailio/commit/da70040e8f782e90ab8378f54f210e8…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: 2015-10-15T18:10:22+02:00
modules/ims_qos: new mod param terminate_dialog_on_rx_failure
terminate_dialog_on_rx_failure this parameter determines if a dialog is torn down if a
media Rx session is terminated
---
Modified: modules/ims_qos/cdpeventprocessor.c
Modified: modules/ims_qos/mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/da70040e8f782e90ab8378f54f210e8…
Patch:
https://github.com/kamailio/kamailio/commit/da70040e8f782e90ab8378f54f210e8…
---
diff --git a/modules/ims_qos/cdpeventprocessor.c b/modules/ims_qos/cdpeventprocessor.c
index 360cff1..94f03f9 100644
--- a/modules/ims_qos/cdpeventprocessor.c
+++ b/modules/ims_qos/cdpeventprocessor.c
@@ -63,6 +63,8 @@ extern int cdp_event_list_size_threshold;
extern struct ims_qos_counters_h ims_qos_cnts_h;
+extern int terminate_dialog_on_rx_failure;
+
int init_cdp_cb_event_list() {
cdp_event_list = shm_malloc(sizeof (cdp_cb_event_list_t));
if (!cdp_event_list) {
@@ -226,7 +228,10 @@ void cdp_cb_event_process() {
LM_DBG("This is a media bearer session session");
//this is a media bearer session that was terminated from the
transport plane - we need to terminate the associated dialog
//so we set p_session_data->must_terminate_dialog to 1 and when we
receive AUTH_EV_SERVICE_TERMINATED event we will terminate the dialog
- p_session_data->must_terminate_dialog = 1;
+ //we only terminate the dialog if terminate_dialog_on_rx_failure is
set
+ if(terminate_dialog_on_rx_failure) {
+ p_session_data->must_terminate_dialog = 1;
+ }
}
break;
diff --git a/modules/ims_qos/mod.c b/modules/ims_qos/mod.c
index 56be1d8..fc9be1a 100644
--- a/modules/ims_qos/mod.c
+++ b/modules/ims_qos/mod.c
@@ -121,6 +121,8 @@ static int fixup_aar(void** param, int param_no);
int * callback_singleton; /*< Callback singleton */
+int terminate_dialog_on_rx_failure = 1; //this specifies whether a dialog is torn down
when a media rx session fails - in some cases you might not want the dialog torn down
+
str early_qosrelease_reason = {"QoS released", 12};
str confirmed_qosrelease_headers = {NULL, 0};
@@ -152,6 +154,7 @@ static param_export_t params[] = {
{ "video_default_bandwidth", INT_PARAM, &video_default_bandwidth},
{ "early_qosrelease_reason", PARAM_STR, &early_qosrelease_reason},
{ "confirmed_qosrelease_headers", PARAM_STR,
&confirmed_qosrelease_headers},
+ { "terminate_dialog_on_rx_failure", INT_PARAM,
&terminate_dialog_on_rx_failure},
{ 0, 0, 0}
};