summaryrefslogtreecommitdiff
path: root/channels/chan_vpb.c
diff options
context:
space:
mode:
authorBen Kramer <bkramer@voicetronix.com.au>2005-01-27 04:31:38 +0000
committerBen Kramer <bkramer@voicetronix.com.au>2005-01-27 04:31:38 +0000
commit17f19d921bae2e5fe8e2fd16b32dc0fd870cf438 (patch)
tree41956805b90d5daf50bd3ef74a3fda984be25fcb /channels/chan_vpb.c
parent0444580a77e2549e9fab90ed92ff60e0a75e4854 (diff)
/ put in ifdef wrapper around routines to save caller ID packet recording
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_vpb.c')
-rwxr-xr-xchannels/chan_vpb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_vpb.c b/channels/chan_vpb.c
index 6543ac872..0617b1960 100755
--- a/channels/chan_vpb.c
+++ b/channels/chan_vpb.c
@@ -520,11 +520,11 @@ static void get_callerid(struct vpb_pvt *p)
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 @@ static void get_callerid_ast(struct vpb_pvt *p)
/* 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)