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

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri Feb 13 09:25:34 CST 2015


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

Matt Jordan updated ASTERISK-24786:
-----------------------------------

    Assignee: Graham Barnett
      Status: Waiting for Feedback  (was: Triage)

> 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
>
> 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