[Home]

Summary:ASTERISK-07394: [patch] 'b' option creates recordings and cdr entries for "ringing" part of the call, when it shouldn't
Reporter:steve mcneill (steve_mcneill)Labels:
Date Opened:2006-07-25 02:04:51Date Closed:2007-01-22 13:24:12.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_mixmonitor.txt
( 1) patch.mixmonitor.nullfile9
Description:when mixmonitor is set to record only when the call is bridged, it also records when it tries to ring an extension (or multiple extensions). this produces lots of 44 byte wav files with pretty much nothing in them (just header info). These rings are also logged as calls to the cdr.

****** ADDITIONAL INFORMATION ******

we have a number of phones (10) in a ring group that "ringall". for every phone that it tries to ring, it adds a cdr entry and a wav file - whether the phone was busy or not.
Comments:By: Serge Vecher (serge-v) 2006-09-01 14:39:55

did you try the latest trunk?

By: Joshua C. Colp (jcolp) 2006-09-05 15:09:09

I think I understand what the issue is. The 'b' option does work, it's just that you believe it should not create a file at all if nothing is recorded - correct?

By: steve mcneill (steve_mcneill) 2006-09-06 19:08:05

@ file yes, that is correct, i have implimented a shell script to clean these up in the mean time. the other issue, though, is that it adds an entry to the cdr - so we end up with lots of entries for the same call, which makes looking for a particular recording tedious.

@serge - no, i have not tried the latest trunk as yet.

By: vortex_0_o (vortex_0_o) 2006-09-06 19:46:55

FWIW I remove files of 0 bytes with a cron job and only query cdr records where billsec >1 when looking for recordings.

By: Peng Yong (ppyy) 2006-09-07 09:53:52

here is my patch to resolve the problem.

By: Serge Vecher (serge-v) 2006-09-07 10:26:33

ppyy: thanks for the patch and a confirmation of your disclaimer status will be apreciated.

Edit: I guess this only addresses the null-size recordings, but not the cdr posting part, right?



By: Peng Yong (ppyy) 2006-09-07 11:56:00

cdr is not an issue. there should be a cdr entry with zero billing time if an extension is called.



By: Peng Yong (ppyy) 2006-09-07 12:03:17

there is a bug in my patch. i am still figure to handle it.

the patch works in normal condision, but if the disk is full or asterisk does not have permission to create file, it will loop to create file.

; asterisk does not have permission to create in /root, and loops
exten => 1025,1,MixMonitor(/root/test.wav49,b)

and i add one line to stop monitor

if (!fs) {
    ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
    # add this line to stop monitor
    mixmonitor->spy.status = CHANSPY_STOP;
    break;
}

then mixmonitor thread stoped, and dead lock:

   -- Executing MixMonitor("SIP/gz.pbx.netease.com-082095b8", "/root/ppyy.wav49|b") in new stack
 == Begin MixMonitor Recording SIP/gz.pbx.netease.com-082095b8
   -- Executing Dial("SIP/gz.pbx.netease.com-082095b8", "SIP/8888|60") in new stack
   -- Called 8888
   -- SIP/8888-0819e2b8 is ringing
   -- SIP/8888-0819e2b8 answered SIP/gz.pbx.netease.com-082095b8
Sep  8 01:02:38 WARNING[14412]: file.c:976 ast_writefile: Unable to open file /root/ppyy.WAV: Permission denied
Sep  8 01:02:38 ERROR[14412]: app_mixmonitor.c:182 mixmonitor_thread: Cannot open /root/ppyy.wav49
 == End MixMonitor Recording SIP/gz.pbx.netease.com-082095b8
Sep  8 01:02:39 ERROR[12880]: chan_sip.c:11366 sipsock_read: We could NOT get the channel lock for SIP/gz.pbx.netease.com-082095b8!
Sep  8 01:02:39 ERROR[12880]: chan_sip.c:11367 sipsock_read: SIP MESSAGE JUST IGNORED: ACK
Sep  8 01:02:39 ERROR[12880]: chan_sip.c:11368 sipsock_read: BAD! BAD! BAD!
Sep  8 01:02:40 ERROR[12880]: chan_sip.c:11366 sipsock_read: We could NOT get the channel lock for SIP/gz.pbx.netease.com-082095b8!
Sep  8 01:02:40 ERROR[12880]: chan_sip.c:11367 sipsock_read: SIP MESSAGE JUST IGNORED: ACK
Sep  8 01:02:40 ERROR[12880]: chan_sip.c:11368 sipsock_read: BAD! BAD! BAD!
Sep  8 01:02:41 ERROR[12880]: chan_sip.c:11366 sipsock_read: We could NOT get the channel lock for SIP/gz.pbx.netease.com-082095b8!
Sep  8 01:02:41 ERROR[12880]: chan_sip.c:11367 sipsock_read: SIP MESSAGE JUST IGNORED: ACK
Sep  8 01:02:41 ERROR[12880]: chan_sip.c:11368 sipsock_read: BAD! BAD! BAD!

By: Peng Yong (ppyy) 2006-09-09 08:33:49

new patch upload.

works when the disk is full or asterisk does not have permission to create file.

By: jmls (jmls) 2006-11-02 12:15:16.000-0600

ppyy: do you have a disclaimer on file ?

By: Peng Yong (ppyy) 2006-12-15 02:33:53.000-0600

disclaimer on file

By: Joshua C. Colp (jcolp) 2007-01-22 13:24:11.000-0600

Fixed in 1.2 as of revision 51406, 1.4 as of revision 51407, and trunk as of revision 51408. Thanks!