aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--channels/chan_misdn.c11
-rw-r--r--channels/misdn/chan_misdn_config.h1
-rw-r--r--channels/misdn_config.c7
3 files changed, 19 insertions, 0 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 14c241f70..4d936be66 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2808,6 +2808,16 @@ static enum ast_bridge_result misdn_bridge (struct ast_channel *c0,
else
return -1;
+ int p1_b, p2_b;
+
+ misdn_cfg_get(ch1->bc->port, MISDN_CFG_BRIDGING, &p1_b, sizeof(int));
+ misdn_cfg_get(ch2->bc->port, MISDN_CFG_BRIDGING, &p2_b, sizeof(int));
+
+ if ( ! p1_b || ! p2_b) {
+ ast_log(LOG_NOTICE, "Falling back to Asterisk bridging\n");
+ return AST_BRIDGE_FAILED;
+ }
+
int bridging;
misdn_cfg_get( 0, MISDN_GEN_BRIDGING, &bridging, sizeof(int));
if (bridging) {
@@ -3268,6 +3278,7 @@ static struct ast_channel *misdn_new(struct chan_list *chlist, int state, char
int bridging;
misdn_cfg_get( 0, MISDN_GEN_BRIDGING, &bridging, sizeof(int));
+
if (bridging)
tmp->tech = &misdn_tech;
else
diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h
index 47d767a46..17d99b4fb 100644
--- a/channels/misdn/chan_misdn_config.h
+++ b/channels/misdn/chan_misdn_config.h
@@ -67,6 +67,7 @@ enum misdn_cfg_elements {
MISDN_CFG_NEED_MORE_INFOS, /* bool */
MISDN_CFG_NOAUTORESPOND_ON_SETUP, /* bool */
MISDN_CFG_NTTIMEOUT, /* bool */
+ MISDN_CFG_BRIDGING, /* int */
MISDN_CFG_JITTERBUFFER, /* int */
MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, /* int */
MISDN_CFG_CALLGROUP, /* ast_group_t */
diff --git a/channels/misdn_config.c b/channels/misdn_config.c
index f9450c07b..69b35ccbf 100644
--- a/channels/misdn_config.c
+++ b/channels/misdn_config.c
@@ -314,6 +314,13 @@ static const struct misdn_cfg_spec port_spec[] = {
{ "nttimeout", MISDN_CFG_NTTIMEOUT, MISDN_CTYPE_BOOL, "no", NONE ,
"Set this to yes if you want calls disconnected in overlap mode\n"
"\twhen a timeout happens." },
+ { "bridging", MISDN_CFG_BRIDGING, MISDN_CTYPE_BOOL, "yes", NONE,
+ "Set this to yes/no, default is yes.\n"
+ "This can be used to have bridging enabled in general and to\n"
+ "disable it for specific ports. It makes sense to disable\n"
+ "bridging on NT Port where you plan to use the HOLD/RETRIEVE\n"
+ "features with ISDN phones.\n"
+ },
{ "msns", MISDN_CFG_MSNS, MISDN_CTYPE_MSNLIST, "*", NONE,
"MSN's for TE ports, listen on those numbers on the above ports, and\n"
"\tindicate the incoming calls to Asterisk.\n"