Summary:ASTERISK-18145: [regression] With IMAP Voicemail MWI not cleared or set for SIP device
Reporter:Edwin horton (edhorton)Labels:
Date Opened:2011-07-17 16:37:59Date Closed:2012-08-27 12:20:10
Versions: Frequency of
Environment:Centos 5.6 32Bit Attachments:
Description:I am fairly sure his problem did not exist in version asterisk-1.8.4.  No changes to configuration when upgrading to Using IMAP voicemail storage, message delivery works fine. however with a SIP phone, in this case a Polycom IP-550, the MWI is never manipulated, either on or off. Debuging SIP messages to the phone, shows no sip message to update the message status.  pollmailboxes=yes and pollfreq=30.  Voicemail configuration is in an MySql table via realtime static and ODBC. Using a skinny device (Cisco 7920) mapped to the same mailbox, the MWI works correctly via the pollmailbox thread, or immediately after a voicemail is received or read.  If I access the mailbox with Outlook, the MWI correctly follows the message status on the skinny device only.  To further test, I used a sip notify message for the specific SIP phone to turn the MWI lamp on or off. That works correctly.  As a backup, I execute a script via the externotify option, This correctly controls the MWI if I access the mailbox via the phone, but of course, not the pollmailbox thread.
Comments:By: Edwin horton (edhorton) 2011-07-21 09:58:51.863-0500

Seems to be more going on than I immediately thought.  After Asterisk runs for a few hours, I get:
WARNING[3044] udptl.c: No UDPTL ports remaining

After that error occurs, if you try to check voicemail via VoiceMailMain, you get the following:
ERROR[19533] app_voicemail.c: IMAP Error: Unable to create selectable TCP socket (1035 >= 1024)
ERROR[19533] app_voicemail.c: Could not initialize mailstream

VoiceMailMain works correctly until the "No UDPTL ports remaining" nessage occurs.  I currently have pollfreq set at 15 seconds and notice that I get the "No UDPTL ports remaining" message at intervals of 15 seconds, so it seems it occurs when the poll thread runs.

I verified 1.8.4 does not have this problem.

In 1.8.5, if I leave a voicemail for an extension, I never get a sip notify to set the MWI indicator as verified by doing a sip debug for that extension.  1.8.4 works correctly.

By: Edwin horton (edhorton) 2011-07-31 08:48:10.786-0500

I verified today that 1.8.5 does not send the message waiting sip notify message when a new message is left in the mailbox. 1.8.4 does work correctly.  My second comment about "udptl.c: No UDPTL ports remaining" happens on 1.8.5 and 1.8.4 and is not related to this problem as I posted in the previous comment.  I have a cron job running to send a sip mwi set or mwi clear as an alternative to the 1.8.5 bug and after a few hours of updates to all of the extensions, I get this error and as a bonus, voicmailmain is unable to retrieve messages.  For now I just slowed the rate and reset the server at 4:00 AM everyday.  But I did not want to muddy up this issue, so forget the last comment.

By: Edwin horton (edhorton) 2011-09-06 10:11:42.573-0500

Found the problem. My Polycom phones did not like sip "friend" and multiple registrations in older firmware releases, so I used an entry for sip "peer" and sip "user" for each registration. This has always worked well before and has existed since version 1.2.  In Asterisk 1.8,5,0,, if I have a sip "user" with the same extension as a sip "peer", the mailbox entry does not show up if I do a sip show peer "extension", even though correctly defined in sip.conf. I noticed this when I forced the Polycoms to subscribe and the system complained about no mailbox.  If I change to "friend" and eliminate the "user", all works OK.  This is different than previous Asterisk releases, but usable since "friend" now works as it should, at least for the Polycoms.  Sorry for the incorrect paths in my earlier attemps to troubleshoot.