[Asterisk-cvs] asterisk/channels chan_vpb.c,1.64,1.65

bkramer at lists.digium.com bkramer at lists.digium.com
Wed Jan 26 22:29:33 CST 2005


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

Modified Files:
	chan_vpb.c 
Log Message:
/ put in ifdef wrapper around routines to save caller ID packet recording


Index: chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- chan_vpb.c	25 Jan 2005 06:10:20 -0000	1.64
+++ chan_vpb.c	27 Jan 2005 04:31:38 -0000	1.65
@@ -520,11 +520,11 @@
 		vpb_record_buf_start(p->handle, VPB_LINEAR);
 		rc = vpb_record_buf_sync(p->handle, (char*)buf, sizeof(buf));
 		vpb_record_buf_finish(p->handle);
-/*
+#ifdef ANALYSE_CID
 		vpb_wave_open_write(&ws, file, VPB_LINEAR);
 		vpb_wave_write(ws,(char*)buf,sizeof(buf));
 		vpb_wave_close_write(ws);
-*/
+#endif
 
 		if (option_verbose>3) 
 			ast_verbose(VERBOSE_PREFIX_4 "CID record - recorded %fms between rings\n", 
@@ -610,27 +610,27 @@
 /*	vpb_record_get_gain(p->handle, &old_gain); */
 	cs = callerid_new(which_cid);
 	if (cs){
-/*
+#ifdef ANALYSE_CID
 		vpb_wave_open_write(&ws, file, VPB_MULAW); 
 		vpb_record_set_gain(p->handle, 3.0); 
 		vpb_record_set_hw_gain(p->handle,12.0); 
-*/
+#endif
 		vpb_record_buf_start(p->handle, VPB_MULAW);
 		while((rc == 0)&&(sam_count<8000*3)){
 			vrc = vpb_record_buf_sync(p->handle, (char*)buf, sizeof(buf));
 			if (vrc != VPB_OK)
 				ast_log(LOG_ERROR, "%s: Caller ID couldnt read audio buffer!\n",p->dev);
 			rc = callerid_feed(cs,(unsigned char *)buf,sizeof(buf),AST_FORMAT_ULAW);
-/*
+#ifdef ANALYSE_CID
 			vpb_wave_write(ws,(char*)buf,sizeof(buf)); 
-*/
+#endif
 			sam_count+=sizeof(buf);
 			if (option_verbose>3) ast_verbose(VERBOSE_PREFIX_4 "Collecting Caller ID samples [%d][%d]...\n",sam_count,rc);
 		}
 		vpb_record_buf_finish(p->handle);
-/*
+#ifdef ANALYSE_CID
 		vpb_wave_close_write(ws); 
-*/
+#endif
 		if (rc == 1){
 			callerid_get(cs, &name, &number, &flags);
 			if (option_verbose>0) 




More information about the svn-commits mailing list