[Home]

Summary:ASTERISK-02234: [patch] Empty messages should not result in a voicemail
Reporter:pfn (pfn)Labels:
Date Opened:2004-08-17 22:33:58Date Closed:2009-06-27 05:05:08
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-16981 Voicemail notification - Incorrect VM Duration
Environment:Attachments:( 0) silent-vm-r4.txt
( 1) silent-vm-1.6.2.txt
( 2) silent-vm-1.6.2-fix.txt
( 3) silent-vm-1.6.2-fix2.txt
Description:When a message consists of all silence a message file is still stored on the server and a notice is sent to the user.  This is a very annoying behavior to check voicemail and see that there is no actual message.

Included is a patch that changes the default value for vmminmessage to 1, stores the cumulative silence value and compares the length of the message vs. silence detected.  If the difference is greater than 0, it's a message, otherwise, discard it.

Even with this patch, some silent messages can potentially make it through, due to the 1 second granularity of measuring message length.
Comments:By: Olle Johansson (oej) 2004-08-18 04:02:40

Interesting patch. I got *no* voicemails  after applying it... Removed it and everything worked as normal. Anyone else that can test this and check?

Using CVS head on FreeBSD 4.10.

By: pfn (pfn) 2004-08-18 09:52:18

I seem to have messed something up.  I will look at it and fix this patch.  It *was* working....

By: pfn (pfn) 2004-08-18 10:49:05

Ok, I've fixed this.  Apparently, I somehow lucked out on a border condition where this worked previously.

I have revised the patch, and this appears to work properly for me now.  I have changed the default minmessage = 2 to reliably delete empty messages, minmessage = 1 is hit and miss, about 50% hits, and 0 will not detect any empty messages.

By: Mark Spencer (markster) 2004-08-18 11:01:14

dspsilence *is* the cumulative time.   Your patch will cause it to increase exponentially.

By: Mark Spencer (markster) 2004-08-18 11:03:35

Also, if you're going to change the default, change it in the sample config, NOT in the code.  If people update, behavior shouldn't change for paramters unless they're actually knowingly changing it.  It's okay for "make samples" to change behavior.  Thanks!

By: pfn (pfn) 2004-08-18 11:05:46

I've been playing with dspsilence for this past hour or so, the dspsilence value resets any time there is audio detected, that is why there is olddspsilence vs. dspsilence in the new patch.  This is supposed to be the correct behavior, right?

Speaking of which, that last (olddspsilence == dspsilence) is always true, I guess I'll need to fix that.

By: Mark Spencer (markster) 2004-08-18 14:02:28

It does reset anytime there was audio.  That's the right thing to do though, why would you accumulate the silence across the entire message?

By: pfn (pfn) 2004-08-18 16:15:14

I accumulate silence across the entire message because I want duration to be correct.  I believe gsm doesn't record silence (neither duration nor file size increases), and truncates it.

Say you got a voicemail that a speaker was online for 60 seconds, but spoke for only 30 seconds of that time and the recording codec only recorded 30 seconds worth.  You get notified of a 60 second voicemail, but the message is only 30 seconds long?  I don't know which file formats this applies to, though...

By: sivana (sivana) 2004-08-19 23:16:58

Nice. The lastest revision worked great for me.  I had to add "maxsilence=10" to my voicemail.conf.

By: pfn (pfn) 2004-08-20 11:49:05

One last update to properly set duration.

By: twisted (twisted) 2004-08-27 13:20:41

Just tested this and it works great!   even handles those annoying messages that start of quiet, and someone goes hello?   then hangs up.    Great work pfn :)

By: twisted (twisted) 2004-09-14 18:10:18

Do i have a detrimental effect to bugs I touch now?   Heh.  I would really like to see this in cvs, as it has worked properly for a good 2 weeks now.

By: Mark Spencer (markster) 2004-10-01 23:16:32

I'm still not sure I like this idea...  So if someone doesn't realize that the thing is recording and they're quiet for 15 seconds and then they go "Oh, hey mark, this is so-and-so.  call me back, it's urgent" then asterisk happily records the whole message and then discards it?

By: pfn (pfn) 2004-10-02 03:21:15

The message is still subject to minmessage, so if the recording exceeds the value of minmessage ( = 2 for silent messages to be deleted successfully) then the message won't be deleted.  For the most part, I don't think one can get a meaningful message recorded in under 2 seconds...

In any case, what with the moving of the recording functions to app.c, this patch will have to be forward fitted for the current version of code.

By: Brian West (bkw918) 2004-10-06 09:47:24

Ok but you sure can get "moose penis" in 2 seconds if you try.. and I sure would want that left in the persons box that i'm calling and not discarded....  Just a thought ya know :)  Other than that its all good!

bkw

By: Brian West (bkw918) 2004-10-14 01:12:03

Please update to latest CVS.

bkw

By: twisted (twisted) 2004-10-27 17:13:31

pfn, please update to current cvs and repost the patch.  Also, markster, please take a second look at this.  It's been running great now for a month at a customers site, live in production, and we have yet to hear of a complaint that anyone is missing any voicemail.

By: pfn (pfn) 2004-10-30 10:40:37

I'll make the patch on the latest v1-0, since I won't be testing any patch I'd make on HEAD extensively.  I'll update my diff sometime within the week.

By: Brian West (bkw918) 2004-10-30 22:26:00

FYI you can't do ANY silence chopping when using wav49... otherwise its not playable by WMP.

bkw

By: Mark Spencer (markster) 2004-11-07 01:32:23.000-0600

Looks like this one has kinda been dropped -- i'm not convinced it's a good idea anyway but I'm open to more discussion.

By: pfn (pfn) 2009-06-16 19:09:41

Recently started using voicemail again and am getting those very very annoying silent voicemail messages--they should be deleted.  Including a forward-ported patch against 1.6.2

By: Digium Subversion (svnbot) 2009-06-23 09:54:22

Repository: asterisk
Revision: 202570

U   trunk/CHANGES
U   trunk/main/app.c

------------------------------------------------------------------------
r202570 | russell | 2009-06-23 09:54:22 -0500 (Tue, 23 Jun 2009) | 7 lines

Ignore voicemail messages that are just silence.

(closes issue ASTERISK-2234)
Reported by: pfn
Patches:
     silent-vm-1.6.2.txt uploaded by pfn (license 810)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=202570

By: Digium Subversion (svnbot) 2009-06-23 09:54:49

Repository: asterisk
Revision: 202571

_U  branches/1.6.2/

------------------------------------------------------------------------
r202571 | russell | 2009-06-23 09:54:49 -0500 (Tue, 23 Jun 2009) | 13 lines

Blocked revisions 202570 via svnmerge

........
 r202570 | russell | 2009-06-23 09:54:21 -0500 (Tue, 23 Jun 2009) | 7 lines
 
 Ignore voicemail messages that are just silence.
 
 (closes issue ASTERISK-2234)
 Reported by: pfn
 Patches:
       silent-vm-1.6.2.txt uploaded by pfn (license 810)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=202571

By: pfn (pfn) 2009-06-26 21:40:17

Sorry, I should have tested more, and looked more carefully at my old patch, I messed up and all voicemails are now considered silent, attaching a fix to be applied on top of the silent-vm-1.6.2.txt
(totalsilence grows geometrically due to the way the dspsilence counter works, add an olddspsilence variable to handle it properly)

By: pfn (pfn) 2009-06-26 21:50:21

please disregard silent-vm-1.6.2-fix.txt and apply silent-vm-1.6.2-fix2.txt instead.  the former will pass messages that end in silence and maxsilence will be ignored

By: Digium Subversion (svnbot) 2009-06-27 05:04:52

Repository: asterisk
Revision: 203962

U   trunk/main/app.c

------------------------------------------------------------------------
r203962 | russell | 2009-06-27 05:04:52 -0500 (Sat, 27 Jun 2009) | 8 lines

Only update total silence counter after a counter reset.

(closes issue ASTERISK-2234)
Reported by: pfn
Patches:
     silent-vm-1.6.2-fix2.txt uploaded by pfn (license 810)
Tested by: pfn

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=203962

By: Digium Subversion (svnbot) 2009-06-27 05:05:06

Repository: asterisk
Revision: 203963

_U  branches/1.6.2/

------------------------------------------------------------------------
r203963 | russell | 2009-06-27 05:05:06 -0500 (Sat, 27 Jun 2009) | 14 lines

Blocked revisions 203962 via svnmerge

........
 r203962 | russell | 2009-06-27 05:04:51 -0500 (Sat, 27 Jun 2009) | 8 lines
 
 Only update total silence counter after a counter reset.
 
 (closes issue ASTERISK-2234)
 Reported by: pfn
 Patches:
       silent-vm-1.6.2-fix2.txt uploaded by pfn (license 810)
 Tested by: pfn
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=203963