[Home]

Summary:ASTERISK-23656: Playbak afte recording fails,but file is there
Reporter:Private Name (falves11)Labels:
Date Opened:2014-04-23 01:00:06Date Closed:2014-04-23 15:33:53
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_playback
Versions:11.8.1 Frequency of
Occurrence
Related
Issues:
Environment:fedora 20Attachments:( 0) trace-1.txt
Description:my code is two lines, in the first I record, in the next I Playback for confirmation
{noformat}
exten =>_X.,n(b_e_c_b-1),Record(${CALLERID(num)}-industry:sln,10,60,k)
exten =>_X.,n,Playback(you-entered&${CALLERID(num)}-industry})
{noformat}

Please look at the uploaded trace and you will see that playback fails, but the file is there. I can playback a few seconds later. It does not matter the format I record it with. The immediate playback fails.
Comments:By: Private Name (falves11) 2014-04-23 13:16:14.717-0500

I added this after the record line
exten =>_X.,n,Set(foo=${SHELL(sync)})
but it did not change the outcome. So the Record application has not notified the OS about the new file, and it already returns. It should not return until the file is flushed off to the OS. The file gets written later, I can see the file in the directory.
Does anybody have an idea for a workaround? I am stuck trying to deliver an app that requires playback and confirmation, a survey.

By: Michael L. Young (elguero) 2014-04-23 15:33:40.994-0500

Falves, please check this syntax since there is an error with it:
{noformat} exten =>_X.,n,Playback(you-entered&${CALLERID(num)}-industry}){noformat}

That is why you are getting this:
{noformat}[Apr 23 01:49:10] WARNING[7504][C-00000011]: file.c:701 ast_openstream_full: File 18000000000-industry} does not exist in any format{noformat}
The answer is in that warning message as to what is wrong.

Also, you should follow the syntax for setting the format that you find by running "core show application Record" or here https://wiki.asterisk.org/wiki/display/AST/Application_Record.
{noformat}exten =>_X.,n(b_e_c_b-1),Record(${CALLERID(num)}-industry:sln,10,60,k){noformat}

You should go to the mailing list or IRC channel first before submitting a bug report.  That should always be your first step when you are not sure if you have a bug or not.  I see that you posted the bug report and then went to the mailing list which is the wrong order.