[asterisk-bugs] [JIRA] (ASTERISK-29026) app_voicemail: When a voicemail is marked as "Urgent", it is not sent by email/processed by the mailcmd command

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Tue Aug 18 15:09:43 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251692#comment-251692 ] 

Kevin Harwell commented on ASTERISK-29026:
------------------------------------------

If I'm reading the code correctly in the ODBC case {{notify_new_message}} (which eventually calls the configured "mailcmd") never gets called.

>From the debug file:
{noformat}
[2017-09-21 13:03:41] DEBUG[11212][C-00000089] app_voicemail.c: Created an Urgent message, moving file from /var/spool/asterisk/voicemail/DEVEL/104/INBOX/msg0035 to /var/spool/asterisk/voicemail/DEVEL/104/Urgent/msg0007.
{noformat}
This is easily located in _app_voicemail.c_ in the {{leave_voicemail}} function:
{noformat}
...
ast_debug(5, "Created an Urgent message, moving file from %s to %s.\n", sfn, dfn);
RENAME(dir, msgnum, vmu->mailbox, vmu->context, urgdir, x, sfn, dfn);
/* Notification must happen for this new message in Urgent folder, not INBOX */
ast_copy_string(fn, dfn, sizeof(fn));
...
{noformat}
Soon after it checks to see if the file exists:
{noformat}
...
if (ast_fileexists(fn, NULL, NULL)) {
    notify_new_message(chan, vmu, NULL, msgnum, duration, fmt, ...
{noformat}
And if it does exist on the drive then {{notify_new_message}} is called. However, in the ODBC case voicemails are stored in the database so there is no file, the check fails, and {{notify_new_message}} is _not_ called. Subsequently the configured "mailcmd" is never called.



> app_voicemail: When a voicemail is marked as "Urgent", it is not sent by email/processed by the mailcmd command
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-29026
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29026
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_voicemail
>    Affects Versions: 16.11.1
>         Environment: Asterisk compiled from sources on CentOS 6.9 64 bit. Voicemail is stored on MySQL using ODBC
>            Reporter: ben kolodny
>            Severity: Minor
>              Labels: voicemail
>         Attachments: asterisk_log.txt, debug_log_27273.txt, voicemail.conf, voicemail.conf, voicemail.sql
>
>
> A mailbox is configured to allow review. Once the voicemail message is recorded, # is pressed to access the voicemail menu. Entry 4 is selected to mark the message as "Urgent" and then confirmed with 1. The message is not being sent by email nor processed by the mailcmd configuration parameter. The voicemail is however correctly stored in the ODBC database.
> No weird messages are shown in the asterisk console, just the standard ones: (see asterisk_log.txt)



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



More information about the asterisk-bugs mailing list