[Asterisk-cvs] asterisk/channels chan_vpb.c,1.87,1.88

bkramer at lists.digium.com bkramer at lists.digium.com
Wed Jun 22 19:54:08 CDT 2005


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

Modified Files:
	chan_vpb.c 
Log Message:
/ fix for bug 4550
/ cleaned up most of the warning messages


Index: chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- chan_vpb.c	10 Jun 2005 03:18:24 -0000	1.87
+++ chan_vpb.c	22 Jun 2005 23:54:47 -0000	1.88
@@ -170,6 +170,7 @@
 #define TIMER_PERIOD_RINGBACK 2000
 #define TIMER_PERIOD_BUSY 700
 #define TIMER_PERIOD_RING 4000
+static int timer_period_ring = TIMER_PERIOD_RING;
 	  
 #define VPB_EVENTS_ALL (VPB_MRING|VPB_MDIGIT|VPB_MDTMF|VPB_MTONEDETECT|VPB_MTIMEREXP|VPB_MPLAY_UNDERFLOW \
 			|VPB_MRECORD_OVERFLOW|VPB_MSTATION_OFFHOOK|VPB_MSTATION_ONHOOK \
@@ -604,14 +605,17 @@
 	double cid_record_time;
 	int rc;
 	struct ast_channel *owner = p->owner;
+/*
 	void * ws;
+	char callerid[AST_MAX_EXTENSION] = ""; 
+*/
+#ifdef ANALYSE_CID
 	char * file="cidsams.wav";
+#endif
 
 
 	if( ast_mutex_trylock(&p->record_lock) == 0 ) {
 
-		char callerid[AST_MAX_EXTENSION] = ""; 
-
 		cid_record_time = get_time_in_ms();
 		if (option_verbose>3) 
 			ast_verbose(VERBOSE_PREFIX_4 "CID record - start\n");
@@ -692,10 +696,14 @@
 	int rc=0,vrc;
 	int sam_count=0;
 	struct ast_channel *owner = p->owner;
-	float old_gain;
 	int which_cid;
+/*
+	float old_gain;
+*/
+#ifdef ANALYSE_CID
 	void * ws;
 	char * file="cidsams.wav";
+#endif
 
 	if(p->callerid_type == 1) {
 	if (option_verbose>3) ast_verbose(VERBOSE_PREFIX_4 "Collected caller ID already\n");
@@ -1070,7 +1078,9 @@
 	struct ast_channel *owner = p->owner;
 	char cid_num[256];
 	char cid_name[256];
+/*
 	struct ast_channel *c;
+*/
 
 	if (option_verbose > 3) {
 		char str[VPB_MAX_STR];
@@ -1601,7 +1611,7 @@
 	vpb_timer_open(&tmp->ringback_timer, tmp->handle, tmp->ringback_timer_id, TIMER_PERIOD_RINGBACK);
 
 	tmp->ring_timer_id = vpb_timer_get_unique_timer_id();
-	vpb_timer_open(&tmp->ring_timer, tmp->handle, tmp->ring_timer_id, TIMER_PERIOD_RING);
+	vpb_timer_open(&tmp->ring_timer, tmp->handle, tmp->ring_timer_id, timer_period_ring);
 	      
 	tmp->dtmfidd_timer_id = vpb_timer_get_unique_timer_id();
 	vpb_timer_open(&tmp->dtmfidd_timer, tmp->handle, tmp->dtmfidd_timer_id, dtmf_idd);
@@ -2033,10 +2043,10 @@
 static int vpb_answer(struct ast_channel *ast)
 {
 	struct vpb_pvt *p = (struct vpb_pvt *)ast->tech_pvt;
-	VPB_EVENT je;
-	int ret;
 	int res = 0;
 /*
+	VPB_EVENT je;
+	int ret;
 	if (option_verbose > 3) ast_verbose("%s: LOCKING in answer \n", p->dev);
 	if (option_verbose > 3) ast_verbose("%s: LOCKING count[%d] owner[%d] \n", p->dev, p->lock.__m_count,p->lock.__m_owner);
 */
@@ -2751,6 +2761,9 @@
 				relaxdtmf = 1;
 				ast_log(LOG_NOTICE,"VPB driver using Relaxed DTMF with Asterisk DTMF detections functions!\n");
 			}
+			else if (strcasecmp(v->name, "timer_period_ring") ==0) {
+				timer_period_ring = atoi(v->value);
+			}
 			else if (strcasecmp(v->name, "ecsuppthres") ==0) {
 				ec_supp_threshold = atoi(v->value);
 			}




More information about the svn-commits mailing list