[asterisk-bugs] [Asterisk 0013821]: [patch] segfault checking messages using mwi events

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Jan 18 05:26:27 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13821 
====================================================================== 
Reported By:                DEA
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   13821
Category:                   Channels/chan_skinny
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0.1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-10-31 23:01 CDT
Last Modified:              2009-01-18 05:26 CST
====================================================================== 
Summary:                    [patch] segfault checking messages using mwi events
Description: 
I have been chasing a regular crash involves chan_skinny and IMAP enable
voicemail.

I'm following the bugs related to the c-client related crashes, which may
help, but the more I looked at the code that I ported from chan_zap to 
chan_skinny to enable mwi events, the more convinced I became that it was
just
not right.

So I dove into chan_sip to get a handle on how mwi event callbacks should
be
used and developed the attached patch.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
parent of           0013182 [patch] Missed Calls is cleared from ph...
====================================================================== 

---------------------------------------------------------------------- 
 (0098098) mvanbaak (manager) - 2009-01-18 05:26
 http://bugs.digium.com/view.php?id=13821#c98098 
---------------------------------------------------------------------- 
+		if (new_msgs) {
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, l->instance,
l->mwiblink?SKINNY_LAMP_BLINK:SKINNY_LAMP_ON);
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, 0, SKINNY_LAMP_ON);
+	+		if (new_msgs) {
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, l->instance,
l->mwiblink?SKINNY_LAMP_BLINK:SKINNY_LAMP_ON);
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, 0, SKINNY_LAMP_ON);
+		} else {
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, l->instance,
SKINNY_LAMP_OFF);
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, 0, SKINNY_LAMP_OFF);
+		}
	} else {
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, l->instance,
SKINNY_LAMP_OFF);
+			transmit_lamp_indication(d, STIMULUS_VOICEMAIL, 0, SKINNY_LAMP_OFF);
+		}


That's how I think it should be.

Besides that wedhord brought up a good issue:
If a device has more then one line, the device MWI indicator will be
wrong. We have to set the WMI for the line here, and then walk the lines
attached to the same device to see if they have voicemail. That way the
device mwi will be on when there's one or more lines on the device with
voicemail, and off if no line attached to it has vm. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-18 05:26 mvanbaak       Note Added: 0098098                          
======================================================================




More information about the asterisk-bugs mailing list