]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 67209 via svnmerge from
authorChristian Richter <christian.richter@beronet.com>
Tue, 5 Jun 2007 10:25:32 +0000 (10:25 +0000)
committerChristian Richter <christian.richter@beronet.com>
Tue, 5 Jun 2007 10:25:32 +0000 (10:25 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r67209 | crichter | 2007-06-05 12:05:45 +0200 (Di, 05 Jun 2007) | 1 line

added possibility to deactivate bridging per port
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67210 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c
channels/misdn/chan_misdn_config.h
channels/misdn_config.c

index 257425640e641ce0d5efe24a46d2f6e32ba78cc4..94d1076054b6197344283508ec38deea138b729f 100644 (file)
@@ -2815,6 +2815,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) {
@@ -3275,6 +3285,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
index 47d767a46eddb05f11ce0678c0bd8f00b1f164e8..17d99b4fb2a2c3f099fce7ed8ee1cf823edf2734 100644 (file)
@@ -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 */
index ee9e68a580772ea3c1da1fa7798f3ff28b47b36f..7185dd6a710a543008b9abb7e68db094464d6970 100644 (file)
@@ -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" 
                "when a timeout happens.\n"},
+       { "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"