mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
added possibility to deactivate bridging per port
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2404,6 +2404,16 @@ 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) {
|
||||
@@ -2842,6 +2852,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
|
||||
|
@@ -58,6 +58,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 */
|
||||
|
@@ -119,6 +119,7 @@ static const struct misdn_cfg_spec port_spec[] = {
|
||||
{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE },
|
||||
{ "noautorespond_on_setup", MISDN_CFG_NOAUTORESPOND_ON_SETUP, MISDN_CTYPE_BOOL, "0", NONE },
|
||||
{ "nttimeout", MISDN_CFG_NTTIMEOUT, MISDN_CTYPE_BOOL, "no", NONE },
|
||||
{ "bridging", MISDN_CFG_BRIDGING, MISDN_CTYPE_BOOL, "yes", NONE },
|
||||
{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "4000", NONE },
|
||||
{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE },
|
||||
{ "callgroup", MISDN_CFG_CALLGROUP, MISDN_CTYPE_ASTGROUP, NO_DEFAULT, NONE },
|
||||
|
Reference in New Issue
Block a user