[asterisk-bugs] [JIRA] (ASTERISK-24786) Asterisk terminates when playing a voicemail stored in LDAP

Graham Barnett (JIRA) noreply at issues.asterisk.org
Fri Feb 13 13:31:35 CST 2015


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Graham Barnett updated ASTERISK-24786:
--------------------------------------

    Status: Triage  (was: Waiting for Feedback)

> Asterisk terminates when playing a voicemail stored in LDAP
> -----------------------------------------------------------
>
>                 Key: ASTERISK-24786
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24786
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_voicemail/IMAP
>    Affects Versions: 13.1.0, 13.2.0
>            Reporter: Graham Barnett
>            Assignee: Graham Barnett
>            Severity: Critical
>         Attachments: app_voicemail.c.patch_terminate
>
>
> Symptom
> # If user has no greetings and user opens mailbox (*97) and tries to play a message, asterisk terminates
> # If user has at least one greeting, playing back a message gives:
> {noformat}
> [14626][C-0000002c]: app_voicemail.c:8677 play_message: No origtime?!
> {noformat}
> Why?
> {code}
> vms_x = get_vm_state_by_imapuser(user, x)
> {code}
> caches existing states by user.
> The states are looked up my imap version, user name, interactive=2 || interactive matches.
> Why does this matter?
> {code}
> int fold = 0;
> vms_p = get_vm_state_by_imapuser(vmu->imapuser, 0);
> if (!vms_p) {
> 		vms_p = get_vm_state_by_mailbox(mailbox, context, 1);
> 	}
> ret = init_mailstream(vms_p, fold);
> {code}
> vs
> {code}
> if (!(vmu = find_user(NULL, context, mailbox))) {
>     RETRIEVE(tempfile, -1, vmu->mailbox, vmu->context);
>     res = imap_retrieve_greeting(dir, msgnum, vmu);
>     if (!(vms_p = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 1)) && 
>     if (init_mailstream(vms_p, GREETINGS_FOLDER) || !vms_p->mailstream) {
> {code}
> i.e. the mailstream can be left pointed at the GREETINGS and not the Inbox
> And why does that matter?
> {code}
> imap_retrieve_file
> if (!(vms = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 1)) && !(vms = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 0))) {
> {code}
> *CAN BE WRONG MAILSTREAM !!!!!*
> {code}
> header_content = mail_fetchheader (vms->mailstream, vms->msgArray[msgnum]);
> {code}
> What is the fix?
> We need to init the mailstream in imap_retrieve_file after getting the vm_state_by_mailbox
> \[Edit: inline patch removed\]
> Will post patch file later.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list