[asterisk-bugs] [Asterisk 0013095]: GMail Support

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jul 17 08:23:30 CDT 2008


The following issue has been CLOSED 
====================================================================== 
http://bugs.digium.com/view.php?id=13095 
====================================================================== 
Reported By:                marcsmith
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13095
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.21 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 129158 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 suspended
Fixed in Version:           
====================================================================== 
Date Submitted:             07-16-2008 20:50 CDT
Last Modified:              07-17-2008 08:23 CDT
====================================================================== 
Summary:                    GMail Support
Description: 
Using imap.gmail.com (GMail / Google Apps) for the IMAP server has a few
problems. I'm pretty sure these issues are more likely with Google's IMAP
implementation, not c-client or asterisk; when I change the IMAP server
setting to a dovecot IMAP server, it works perfectly.

UW IMAP version: imap-2007b

1) Out of the box, voicemail messages are saved correctly through IMAP.
One of the problems arises when attempting to retrieve voicemail messages.
Also, the MWI is never "active" -- asterisk reports no voicemail messages
(old or new).
The problem appears to be that when the mail_search_full function is
called. The SEARCHPGM that contains the header criteria
("X-Asterisk-VM-Extension") is never matched. When that criteria is changed
to something else, say the header "From" and the value being "Asterisk PBX"
then I get some voicemails. Changing this in both the messagecount and
open_mailbox functions will make it so my MWI updates correctly and also
will play the voicemails correctly when I dial the voicemail app. I'm not
sure why Google's IMAP does not return any matches when the search is
performed. When I connect to imap.gmail.com with mtest and retrieve the
message, I see the "X-Asterisk-VM-Extension" exists in the header (along
with all the others). I turned on mail_debug for the mail stream and I see
exactly what it issues to the IMAP server (along with its response):
NOTICE[32142] app_voicemail.c: 00000007 SEARCH UNDELETED UNSEEN HEADER
X-Asterisk-VM-Extension 20001
NOTICE[32142] app_voicemail.c: * SEARCH
NOTICE[32142] app_voicemail.c: 00000007 OK SEARCH completed (Success)

2) Next, I noticed after listening to voicemails (through my phone) the
messages are not marked as "seen" so they still appear as new messages in
the GMail web interface (and I'm sure through IMAP too). I believe when
mail_fetchstructure is called in play_message, that normally sets the
"seen" flag or the IMAP server sets the "seen" flag. This is not happening
with Google Mail, so I used mail_setflag to "manually" set the flag after
mail_fetchstructure is called. This fixed it so the messages are marked as
read after listening to them. 
====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 07-17-08 08:23  
---------------------------------------------------------------------- 
This is not a forum appropriate for discussion.  Please use the
asterisk-dev list for that.  When you have an appropriate candidate patch
for inclusion, you may reopen this issue. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-17-08 08:23  Corydon76      Note Added: 0090381                          
07-17-08 08:23  Corydon76      Status                   new => closed       
07-17-08 08:23  Corydon76      Resolution               open => suspended   
======================================================================




More information about the asterisk-bugs mailing list