Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv2987/channels

Modified Files:
        chan_zap.c 
Log Message:
Merge steve's busy detect stuff (bug #4830)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.483
retrieving revision 1.484
diff -u -d -r1.483 -r1.484
--- chan_zap.c  7 Aug 2005 04:56:39 -0000       1.483
+++ chan_zap.c  8 Aug 2005 00:08:48 -0000       1.484
@@ -234,6 +234,8 @@
 static int busydetect = 0;
 
 static int busycount = 3;
+static int busy_tonelength = 0;
+static int busy_quietlength = 0;
 
 static int callprogress = 0;
 
@@ -611,6 +613,8 @@
        int echotraining;
        char echorest[20];
        int busycount;
+       int busy_tonelength;
+       int busy_quietlength;
        int callprogress;
        struct timeval flashtime;                       /* Last flash-hook time 
*/
        struct ast_dsp *dsp;
@@ -4824,6 +4828,7 @@
                                                
ast_dsp_set_call_progress_zone(i->dsp, progzone);
                                        if (i->busydetect && CANBUSYDETECT(i)) {
                                                ast_dsp_set_busy_count(i->dsp, 
i->busycount);
+                                               
ast_dsp_set_busy_pattern(i->dsp, i->busy_tonelength, i->busy_quietlength);
                                        }
                                }
                        }
@@ -6871,6 +6876,8 @@
                tmp->echocanbridged = echocanbridged;
                tmp->busydetect = busydetect;
                tmp->busycount = busycount;
+               tmp->busy_tonelength = busy_tonelength;
+               tmp->busy_quietlength = busy_quietlength;
                tmp->callprogress = callprogress;
                tmp->cancallforward = cancallforward;
                tmp->dtmfrelax = relaxdtmf;
@@ -10054,6 +10061,10 @@
                        busydetect = ast_true(v->value);
                } else if (!strcasecmp(v->name, "busycount")) {
                        busycount = atoi(v->value);
+               } else if (!strcasecmp(v->name, "busypattern")) {
+                       if (sscanf(v->value, "%d,%d", &busy_tonelength, 
&busy_quietlength) != 2) {
+                               ast_log(LOG_ERROR, "busypattern= expects 
busypattern=tonelength,quietlength\n");
+                       }
                } else if (!strcasecmp(v->name, "callprogress")) {
                        if (ast_true(v->value))
                                callprogress |= 1;

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to