[Home]

Summary:ASTERISK-14663: [patch] Message Waiting Indication(MWI) is randomly generated when FXO is set to DTMF Caller ID
Reporter:Josef Seger (doda)Labels:
Date Opened:2009-08-16 09:21:57Date Closed:2009-08-17 10:52:23
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dahdi_changes.patch
Description:When using DTMF Caller ID on FXO port(s) on analog Digium card, random MWI indications are generated at a incoming call. On the command line interface you can see that the message:
[Aug 16 15:50:52] NOTICE[10613]: chan_dahdi.c:7750 ss_thread: MWI: Channel 4 message waiting!
is generated.

The patch provided solves the random generation of Message Waiting Indications (MWI).



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

These faulty MWI indications are generated due to the fact that the flags variable in the function static void *ss_thread(void *data) is not set when entering the function. Later when entering the code section:
---cut
/* If the CID had Message waiting payload, assume that this for MWI only and hangup the call */
if (flags & CID_MSGWAITING) {
ast_log(LOG_NOTICE, "MWI: Channel %d message waiting!\n", p->channel);
notify_message(p->mailbox, 1);
/* If generated using Ring Pulse Alert, then ring has been answered as a call and needs to be hungup */
if (p->mwimonitor_rpas) {
ast_hangup(chan);
return NULL;
}
} else if (flags & CID_NOMSGWAITING) {
ast_log(LOG_NOTICE, "MWI: Channel %d no message waiting!\n", p->channel);
notify_message(p->mailbox, 0);
/* If generated using Ring Pulse Alert, then ring has been answered as a call and needs to be hungup */
if (p->mwimonitor_rpas) {
ast_hangup(chan);
return NULL;
}
---cut
the flags variable is still unset and contains random values and now and then the condition (flags & CID_MSGWAITING)is TRUE and generates message waiting indication.

The flags variable is a bit-mask variable and can represent multiple conditions from incoming caller id. To solve the issue of randomly generated MWI this patch  set the flags variable to 0 when entering the ss_thread function (flags = 0).
Comments:By: Digium Subversion (svnbot) 2009-08-17 10:43:20

Repository: asterisk
Revision: 212431

_U  trunk/
U   trunk/channels/chan_dahdi.c
U   trunk/channels/sig_analog.c

------------------------------------------------------------------------
r212431 | rmudgett | 2009-08-17 10:43:20 -0500 (Mon, 17 Aug 2009) | 16 lines

Merged revisions 212430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

Fix uninitialized variable causing random MWI indications.

(closes issue ASTERISK-14663)
Reported by: doda
Patches:
     dahdi_changes.patch uploaded by doda (license 853)

........
 r212430 | rmudgett | 2009-08-17 10:36:28 -0500 (Mon, 17 Aug 2009) | 1 line
 
 Fix uninitialized variable.
........

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

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

By: Digium Subversion (svnbot) 2009-08-17 10:51:00

Repository: asterisk
Revision: 212433

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_dahdi.c

------------------------------------------------------------------------
r212433 | rmudgett | 2009-08-17 10:51:00 -0500 (Mon, 17 Aug 2009) | 23 lines

Merged revisions 212431 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r212431 | rmudgett | 2009-08-17 10:42:51 -0500 (Mon, 17 Aug 2009) | 16 lines
 
 Merged revisions 212430 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 Fix uninitialized variable causing random MWI indications.
 
 (closes issue ASTERISK-14663)
 Reported by: doda
 Patches:
       dahdi_changes.patch uploaded by doda (license 853)
 
 ........
   r212430 | rmudgett | 2009-08-17 10:36:28 -0500 (Mon, 17 Aug 2009) | 1 line
   
   Fix uninitialized variable.
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-08-17 10:52:22

Repository: asterisk
Revision: 212434

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_dahdi.c

------------------------------------------------------------------------
r212434 | rmudgett | 2009-08-17 10:52:22 -0500 (Mon, 17 Aug 2009) | 23 lines

Merged revisions 212431 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r212431 | rmudgett | 2009-08-17 10:42:51 -0500 (Mon, 17 Aug 2009) | 16 lines
 
 Merged revisions 212430 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 Fix uninitialized variable causing random MWI indications.
 
 (closes issue ASTERISK-14663)
 Reported by: doda
 Patches:
       dahdi_changes.patch uploaded by doda (license 853)
 
 ........
   r212430 | rmudgett | 2009-08-17 10:36:28 -0500 (Mon, 17 Aug 2009) | 1 line
   
   Fix uninitialized variable.
 ........
................

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

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