[asterisk-bugs] [JIRA] (ASTERISK-30266) Voicemail aborts when playing caller ID that includes + before digits
Misha Vodsedalek (JIRA)
noreply at issues.asterisk.org
Mon Oct 17 16:50:09 CDT 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-30266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Misha Vodsedalek updated ASTERISK-30266:
----------------------------------------
Description:
>From a SIP trunk provider, we receive caller ID that includes + before digits in the caller ID number. The caller leaves a voicemail message. In the msgXXXX.txt file, the caller ID field looks something like
callerid="Name of the caller" <+16135551234>
The mailbox option saycid for the extension with the mailbox is set to
saycid=yes
When the user attempts to listen to the message, the session is aborted and the following message are logged:
File does not exist in any format
Unable to open (format (ulaw|alaw|g729)): No such file or directory
I tracked the problem to say.c line 339. Here, the assumption is made that the first character must be a valid digit. When it is the plus sign, & is put at the beginning of the string and that causes the empty file name issue logged during this scenario.
The attached patch solves the issue.
was:
>From a SIP trunk provider, we receive caller ID that includes + before digits in the caller ID number. The caller leaves a voicemail message. In the msgXXXX.txt file, the caller ID field looks something like
callerid="Name of the caller" <+16135551234>
The mailbox option saycid for the extension with the mailbox is set to
saycid=yes
When the user attempts to listen to the message, the session is aborted and the following message are logged:
File does not exist in any format
Unable to open (format (ulaw|alaw|g729)): No such file or directory
I tracked the problem to say.c line 339. Here, the assumption is made that the first character must be a valid digit. When it is the plus sign, & is put at the beginning of the string and that causes the empty file name issue logged during this scenario.
The following patch solves the issue:
diff -Nru current/say.c new/say.c
--- current/say.c 2022-08-18 17:18:29.000000000 +0200
+++ new/say.c 2022-10-17 23:34:21.199137160 +0200
@@ -336,7 +336,7 @@
break;
}
if (fn && ast_fileexists(fn, NULL, lang) > 0) {
- ast_str_append(&filenames, 0, (num == 0 ? "%s" : "&%s"), fn);
+ ast_str_append(&filenames, 0, (!ast_str_strlen(filenames) ? "%s" : "&%s"), fn);
}
num++;
}
> Voicemail aborts when playing caller ID that includes + before digits
> ---------------------------------------------------------------------
>
> Key: ASTERISK-30266
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-30266
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_voicemail
> Affects Versions: 18.14.0
> Reporter: Misha Vodsedalek
> Labels: patch
> Attachments: ASTERISK-30266.patch
>
>
> From a SIP trunk provider, we receive caller ID that includes + before digits in the caller ID number. The caller leaves a voicemail message. In the msgXXXX.txt file, the caller ID field looks something like
> callerid="Name of the caller" <+16135551234>
> The mailbox option saycid for the extension with the mailbox is set to
> saycid=yes
> When the user attempts to listen to the message, the session is aborted and the following message are logged:
> File does not exist in any format
> Unable to open (format (ulaw|alaw|g729)): No such file or directory
> I tracked the problem to say.c line 339. Here, the assumption is made that the first character must be a valid digit. When it is the plus sign, & is put at the beginning of the string and that causes the empty file name issue logged during this scenario.
> The attached patch solves the issue.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list