[asterisk-bugs] [Asterisk 0015999]: [patch] Strange nasty sound (Because Asterisk tryes to handle new voicemail, but there is no voicemails, voicemail isn't used)

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 12 14:56:00 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15999 
====================================================================== 
Reported By:                KrisV
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15999
Category:                   Channels/chan_dahdi
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     needs license
Asterisk Version:           1.6.1.5 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-10-01 04:47 CDT
Last Modified:              2009-10-12 14:56 CDT
====================================================================== 
Summary:                    [patch] Strange nasty sound (Because Asterisk tryes
to handle new voicemail, but there is no voicemails, voicemail isn't used)
Description: 
chan_dahdi.c: 8369
  res = has_voicemail(last);
  if (last->msgstate != res) {
  /* This channel has a new voicemail state,					*  initiate a thread to
send an MWI message */
  ...
  }
But in comments for msgstate:
/*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
int msgstate;
So, if res=0 and last->msgstate = -1 there is a new message! But it's not
true.


So, more logical to fix like:
  res = has_voicemail(last);
  if (last->msgstate != res && res > 0) {
  /* This channel has a new voicemail state,					* initiate a thread to
send an MWI message */
  ...
  }
In this case the strange sound doesn't appear.


====================================================================== 

---------------------------------------------------------------------- 
 (0112219) alecdavis (reporter) - 2009-10-12 14:56
 https://issues.asterisk.org/view.php?id=15999#c112219 
---------------------------------------------------------------------- 
What hardware are you using?

I know for the wctdm with DAHDI trunk in function wctdm_proslic_check_hook
there is code to avoid the FSK spill if just going offhook, see
below:<pre>
	switch (fxs->lasttxhook) {
	case SLIC_LF_RINGING:
	case SLIC_LF_OHTRAN_FWD:
	case SLIC_LF_OHTRAN_REV:
		/* just detected OffHook, during
		 * Ringing or OnHookTransfer */
		fxs->idletxhookstate = POLARITY_XOR ? SLIC_LF_ACTIVE_REV :
SLIC_LF_ACTIVE_FWD;
		break;
	}
</pre>

You'll find similar in wctdm24xxp/base.c

We don't want to ignore the msgstate of -1, this is used to force a
message check.

I haven't checked the following, but if voicemail is not enabled, why send
the VMWI FSK? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-12 14:56 alecdavis      Note Added: 0112219                          
======================================================================




More information about the asterisk-bugs mailing list