app_voicemail.c:3447 retrieve_file: SQL Get Data error!

Hello community,
Since couple of days when I’m turning to setup the Voicemail into our server running Asterisk 1.8.7.0& A2Billing 1.9.4, under realtime mysql.

I have configured all, or i expect that i did, now all it’s working, calls are being answered using the a2billing scripts, and the answer machine is collecting the voice mails and sending them to mail…

BUT,

  1. There’s no welcome playback in the voicemail. I mean, the voicemail is answering with simple beep voice;
  2. Even, when user is recording own welcome, status message, the recorded message is not being reproduced at all, only the beep message;
  3. I’m having this warning message in the trace, which I reproduce you below:

[quote]Verbosity was 0 and is now 7
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
== Using SIP RTP CoS mark 5
– Executing [5692@a2billing:1] NoOp(“SIP/41387-00000183”, “A2Billing Start”) in new stack
– Executing [5692@a2billing:2] AGI(“SIP/41387-00000183”, “a2billing.php,3”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
– AGI Script Executing Application: (DIAL) Options: (SIP/06604,60,IWXoL(3600000:60000:30000))
> Limit Data for this call:
> timelimit = 3600000 ms (3600.000 s)
> play_warning = 60000 ms (60.000 s)
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000 ms (30.000 s)
> start_sound =
> warning_sound = timeleft
> end_sound =
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
== Everyone is busy/congested at this time (1:0/0/1)
– AGI Script Executing Application: (VoiceMail) Options: (06604,s)
– <SIP/41387-00000183> Playing ‘beep.ulaw’ (language ‘en’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/a2billing/06604/tmp/8WTFS9 format: wav49, 0x7fb874070378
– x=1, open writing: /var/spool/asterisk/voicemail/a2billing/06604/tmp/8WTFS9 format: gsm, 0x7fb87404f488
– x=2, open writing: /var/spool/asterisk/voicemail/a2billing/06604/tmp/8WTFS9 format: wav, 0x7fb874048958
– User hung up
== Parsing ‘/var/spool/asterisk/voicemail/a2billing/06604/INBOX/msg0000.txt’: == Found
[Feb 1 17:37:47] WARNING[14301]: app_voicemail.c:3447 retrieve_file: SQL Get Data error! coltitle=category
[SELECT * FROM cc_voicemessages WHERE dir=? AND msgnum=?]

== Parsing ‘/var/spool/asterisk/voicemail/a2billing/06604/INBOX/msg0000.txt’: == Found
== Parsing ‘/var/spool/asterisk/voicemail/a2billing/06604/INBOX/msg0000.txt’: == Found
– <SIP/41387-00000183>AGI Script a2billing.php completed, returning 4
[/quote]

As you can see, the playback is being only the beep.ulaw message, and this error with the msgnum and the coltitle, what’s this, and why no playback voice??

What I’m missing here?? :cry:

Thanks for advice!

reviewboard.asterisk.org/r/1415/diff/?expand=1

Revision 312212 introduced a regression in app_voicemail where it breaks ODBC voicemail when the backend is MSSQL.
Line 3450 of apps/app_voicemail.c has this line:
snprintf(sql, sizeof(sql), “SELECT msgnum FROM %s WHERE dir=? order by msgnum desc limit 1”, odbc_table);
The ‘limit 1’ is not portable to all SQL backends, and should be removed.

[quote=“rudio”]https://reviewboard.asterisk.org/r/1415/diff/?expand=1

Revision 312212 introduced a regression in app_voicemail where it breaks ODBC voicemail when the backend is MSSQL.
Line 3450 of apps/app_voicemail.c has this line:
snprintf(sql, sizeof(sql), “SELECT msgnum FROM %s WHERE dir=? order by msgnum desc limit 1”, odbc_table);
The ‘limit 1’ is not portable to all SQL backends, and should be removed.[/quote]

Thanks for your prompt Rudio, but in my version 1.8.7.0 I don’t have this line as 3450, I have in 3492, but it’s other:

And I just download v. 1.8.7.1, and i don’t find this function at all… So, I just update to v 1.8.7.1, but I still having the same:

[quote] == Parsing ‘/var/spool/asterisk/voicemail/a2billing/06604/INBOX/msg0000.txt’: == Found
[Feb 2 10:49:50] WARNING[5623]: app_voicemail.c:3447 retrieve_file: SQL Get Data error! coltitle=category
[SELECT * FROM cc_voicemessages WHERE dir=? AND msgnum=?][/quote]

And only the beep playback sound…

And in all the app_voicemail.c file i don’t have another line related to this… regarding to which version is this issue??

Regards,

hi,
try to remove s option from Voicemail cmd

  • s: The letter s, if present, causes the instructions (“Please leave your message after the tone. When done, hang up, or press the pound key.”) TO BE SKIPPED.

Also specify, depend on which message you recorded
* u: The letter u, if present, causes the unavailable message to be played. By default, the message says, “The person at extension … 1234 … is unavailable,” but the mailbox owner may record their own unavailable message with the VoicemailMain command.

  • b: The letter b, if present, causes the busy message to be played. By default, the message says, “The person at extension … 1234 … is busy.”

Hope this will help.

[quote=“eg”]hi,
try to remove s option from Voicemail cmd

  • s: The letter s, if present, causes the instructions (“Please leave your message after the tone. When done, hang up, or press the pound key.”) TO BE SKIPPED.[/quote]

The perfect GOOOLL For both… the sql message, after updating to v.1.8.7.1 it desapeared…
And the playback, i had to edit the a2billing v. 1.9.4. script as below:
Lines 1413 and 1732
Where it’s:

to be

Perfect, hope this help others, now I’m having fully productive Asterisk v 1.7.1.1&A2billing 1.9.4 running realtime…

Thanks for help,