mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.7 KiB
50 lines
1.7 KiB
From: Victor Seva <vseva@sipwise.com>
|
|
Date: Mon, 24 Oct 2016 11:34:39 +0200
|
|
Subject: sca: use onhold_bflag value only when set
|
|
|
|
Change-Id: Icc6d7edd407299b6de2f85ad8ecc5fe8d9b89339
|
|
---
|
|
modules/sca/doc/sca_admin.xml | 3 ++-
|
|
modules/sca/sca_util.c | 7 +++++--
|
|
2 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/modules/sca/doc/sca_admin.xml b/modules/sca/doc/sca_admin.xml
|
|
index 1108126..b376e41 100644
|
|
--- a/modules/sca/doc/sca_admin.xml
|
|
+++ b/modules/sca/doc/sca_admin.xml
|
|
@@ -268,7 +268,8 @@ modparam( "sca", "db_update_interval", 120 )
|
|
<para>
|
|
<para>
|
|
Which branch flag should be used by the module to identify if the call
|
|
- is on-hold instead of parsing the sdp.
|
|
+ is on-hold instead of parsing the sdp. If the bflag not is set the
|
|
+ sdp will be parsed.
|
|
</para>
|
|
<para>
|
|
<emphasis>
|
|
diff --git a/modules/sca/sca_util.c b/modules/sca/sca_util.c
|
|
index 60c178c..32a20bc 100644
|
|
--- a/modules/sca/sca_util.c
|
|
+++ b/modules/sca/sca_util.c
|
|
@@ -454,8 +454,10 @@ sca_call_is_held( sip_msg_t *msg )
|
|
int rc;
|
|
|
|
if(sca->cfg->onhold_bflag >= 0) {
|
|
- LM_DBG("sca_call_is_held: skip parse_sdp and use onhold_bflag\n");
|
|
- return isbflagset(0, (flag_t)sca->cfg->onhold_bflag);
|
|
+ if(isbflagset(0, (flag_t)sca->cfg->onhold_bflag) == 1) {
|
|
+ LM_DBG("onhold_bflag set, skip parse_sdp and set held\n");
|
|
+ return ( 1 );
|
|
+ }
|
|
}
|
|
rc = parse_sdp( msg );
|
|
if ( rc < 0 ) {
|
|
@@ -475,6 +477,7 @@ sca_call_is_held( sip_msg_t *msg )
|
|
stream != NULL;
|
|
n_str++, stream = get_sdp_stream( msg, n_sess, n_str )) {
|
|
if ( stream->is_on_hold ) {
|
|
+ LM_DBG("sca_call_is_held: parse_sdp detected stream is on hold\n");
|
|
is_held = 1;
|
|
goto done;
|
|
}
|