]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 46176 via svnmerge from
authorChristian Richter <christian.richter@beronet.com>
Fri, 27 Oct 2006 09:49:20 +0000 (09:49 +0000)
committerChristian Richter <christian.richter@beronet.com>
Fri, 27 Oct 2006 09:49:20 +0000 (09:49 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r46176 | crichter | 2006-10-25 10:41:59 +0200 (Mi, 25 Okt 2006) | 1 line

added nttimeout option to configure wether we disconnect calls on NT timeouts or not during an overlapdial session
........

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

channels/chan_misdn.c
channels/misdn/chan_misdn_config.h
channels/misdn_config.c
configs/misdn.conf.sample

index d9f10f86bcc6a1ce31fbda4120e0252773079dd3..5261342ffe303416e33256e41e419ee7d582caab 100644 (file)
@@ -199,6 +199,9 @@ struct chan_list {
        int dropped_frame_cnt;
 
        int far_alerting;
+
+       int nttimeout;
+
        int other_pid;
        struct chan_list *other_ch;
 
@@ -1651,6 +1654,7 @@ static int read_config(struct chan_list *ch, int orig) {
        misdn_cfg_get( port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(int));
 
        misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
+       misdn_cfg_get( port, MISDN_CFG_NTTIMEOUT, &ch->nttimeout, sizeof(int));
        
        misdn_cfg_get( port, MISDN_CFG_FAR_ALERTING, &ch->far_alerting, sizeof(int));
 
@@ -2735,11 +2739,14 @@ static enum ast_bridge_result  misdn_bridge (struct ast_channel *c0,
                        *rc=who;
                        break;
                }
-               
+       
+#if 0
                if (f->frametype == AST_FRAME_VOICE) {
-                       chan_misdn_log(1,0,"Got Voice frame in Bridged state..\n");
+                       chan_misdn_log(1, ch1->bc->port, "I SEND: Splitting conference with Number:%d\n", ch1->bc->pid +1);
+       
                        continue;
                }
+#endif
 
                if (who == c0) {
                        ast_write(c1,f);
@@ -4369,9 +4376,11 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data)
                        chan_misdn_log(1,bc->port,"--> state: %s\n",misdn_get_ch_state(ch));
 
                switch (ch->state) {
-                       case MISDN_CALLING:
                        case MISDN_DIALING:
                        case MISDN_PROGRESS:
+                               if (bc->nt && !ch->nttimeout) break;
+                       
+                       case MISDN_CALLING:
                        case MISDN_ALERTING:
                        case MISDN_PROCEEDING:
                        case MISDN_CALLING_ACKNOWLEDGE:
index f43f3447cee3e11cc1a4ddc862f0e09bb41c4bfd..8869ead5063d29407607607e6f4f7155e72e62b1 100644 (file)
@@ -66,6 +66,7 @@ enum misdn_cfg_elements {
        MISDN_CFG_BNEC_ADAPT,
 #endif
        MISDN_CFG_NEED_MORE_INFOS,     /* bool */
+       MISDN_CFG_NTTIMEOUT,     /* bool */
        MISDN_CFG_JITTERBUFFER,              /* int */
        MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD,              /* int */
        MISDN_CFG_CALLGROUP,           /* ast_group_t */
index c7131b0e4d8c54eaf2bfa7938a6b6b445e7cec9d..c725d371622f5e338061ccc193c326f69eba26c6 100644 (file)
@@ -301,6 +301,9 @@ static const struct misdn_cfg_spec port_spec[] = {
                "\tPossible values are positive integers or:\n"
                "\t   yes (= 4 seconds)\n"
                "\t   no  (= 0 seconds = disabled)" },
+       { "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"},
        { "msns", MISDN_CFG_MSNS, MISDN_CTYPE_MSNLIST, NO_DEFAULT, NONE,
                "MSN's for TE ports, listen on those numbers on the above ports, and\n"
                "\tindicate the incoming calls to Asterisk.\n"
index d2fbfa64f5be7664caa64ef06c4d12dc0d9ad975..7afff223b6b4aecbbf806176aefea53c91112e3d 100644 (file)
@@ -223,6 +223,13 @@ reject_cause=16
 ;
 need_more_infos=no
 
+
+;
+; set this to yes if you want to disconnect calls when a timeout occurs
+; for example during the overlapdial phase
+;
+nttimeout=no
+
 ; set the method to use for channel selection:
 ;   standard    - always choose the first free channel with the lowest number
 ;   round_robin - use the round robin algorithm to select a channel. use this