[Home]

Summary:ASTERISK-05832: [patch] Append option to record not working
Reporter:Steve Hanselman (shanselman)Labels:
Date Opened:2005-12-13 10:11:19.000-0600Date Closed:2005-12-19 12:10:15.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_record
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20051219__bug5988.diff.txt
Description:I have the following in my dialplan, examining the /tmp directory I can see that the filename remains constant, but that a new file is created each time (the file sizegoes down as well as up).



****** STEPS TO REPRODUCE ******

1. playback(direct-book-step-1&direct-speak)  [pbx_config]
2. record(/tmp/${UNIQUEID}.gsm)               [pbx_config]
3. playback(direct-book-step-2&direct-press-hash) [pbx_config]
4. record(/tmp/${UNIQUEID}.gsm|5|0|a)

(This is from a show dialplan direct


****** ADDITIONAL INFORMATION ******

--copied from Steps to Reproduce--

1. playback(direct-book-step-1&direct-speak) [pbx_config]
2. record(/tmp/${UNIQUEID}.gsm) [pbx_config]
3. playback(direct-book-step-2&direct-press-hash) [pbx_config]
4. record(/tmp/${UNIQUEID}.gsm|5|0|a)

(This is from a show dialplan direct
Comments:By: Kevin P. Fleming (kpfleming) 2005-12-13 10:15:43.000-0600

You did not include _any_ useful information in this bug report.

By: Steve Hanselman (shanselman) 2005-12-13 11:08:39.000-0600

Whereas you did of course?

Ok, I'm trying to read your mind, you're looking for...........??????

No, it's passing me by, what would you like to know?

This is the latest SVN, built about an hour ago, you can see the relevant lines from the duialplan above.

It states where the file is being created, you can see the options being passed to record, it states that the file is not being appended to as per the output of show application record, I'm at a loss as to what you need unless you tell me?

By: Kevin P. Fleming (kpfleming) 2005-12-13 11:17:48.000-0600

Please show me where in this bug report the dialplan shows up. I don't see it. There are no attached files, and the description has nothing that you've just referred to present in it that I can see...

By: Joshua C. Colp (jcolp) 2005-12-13 11:19:45.000-0600

Yeah, please give us the dialplan that you're trying to make reference to, and as well exactly what is happening that you think shouldn't happen. Your description is very confusing.

By: Steve Hanselman (shanselman) 2005-12-13 11:28:56.000-0600

In the "Steps to reproduce"?

By: Steve Hanselman (shanselman) 2005-12-13 11:31:45.000-0600

The thing that is not working is that the append isn't appending to a file, it's creating a new one each time.

I'll take a look tomorrow morning and add some debug into the code, but if you've an idea why it's not working then 'twould be appreciated!

By: Kevin P. Fleming (kpfleming) 2005-12-13 11:35:51.000-0600

In the future, please don't use 'advanced report'... none of us ever look in those fields :-)

By: Russell Bryant (russell) 2005-12-13 11:36:20.000-0600

You need to post EXACTLY what you have in your dialplan that is not working correctly.  Furthermore, we need to see the console log output when the problem is reproduced.  We need as much information from you as possible so that we can reproduce the problem.

By: Russell Bryant (russell) 2005-12-13 11:38:07.000-0600

Ah, we seem to have discovered the problem that has caused all of this confusion.  The "steps to reproduce" field is not shown unless you click "view advanced."  I appologize.

By: Steve Hanselman (shanselman) 2005-12-13 12:41:28.000-0600

ok, I'll test in a moment and paste the console output, what debug/verbose levels would you like?

By: Steve Hanselman (shanselman) 2005-12-14 05:08:13.000-0600

Not sure what you're looking for from the console, but I've added a print of the flags being used for open, I'll see whether it is being opened for append, if it is then it's probably a permissions issue, in which case I'll document it and close this.

If not then I'll see why the a isn't setting the append bit.

By: Steve Hanselman (shanselman) 2005-12-14 05:39:34.000-0600

Ok, looks as though the option is being seen correctly as the open of the first file uses 1101 and the second 2101?

Permissions?

By: Steve Hanselman (shanselman) 2005-12-14 08:52:50.000-0600

I reckon this is a stupid user issue, but I can't see why?

I changed the permissions on the .gsm file created to 777 and it was still replaced rather than appended, is there anything you can do on directory permissions that would stop an O_APPEND from working?



By: Steve Hanselman (shanselman) 2005-12-19 03:05:16.000-0600

Any ideas on this, I assume that's it's me now, as the code would look to be fine?

By: Tilghman Lesher (tilghman) 2005-12-19 10:53:26.000-0600

Try this patch.  See if it makes Asterisk do what you want.

By: Steve Hanselman (shanselman) 2005-12-19 11:14:08.000-0600

Just trying this now, on a seperate note, is there a way of injecting the resultant file into the voicemail system?

By: Steve Hanselman (shanselman) 2005-12-19 11:47:14.000-0600

Works perfectly, thanks for that.

Any ideas on a way to inject the file?

By: Tilghman Lesher (tilghman) 2005-12-19 12:10:00.000-0600

Patch added to 1.2, merged to trunk.