summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2014-09-16 16:33:53 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2014-09-16 16:33:53 +0000
commit662b687dbe86ad62d1c6bea5a21560857a8a0a63 (patch)
tree6288f39d9d8dcca9258cae554520b0bc1d24f6d2 /include/asterisk
parentceedf44edd2fd8b02f2133ae7fc92405eae3176c (diff)
Voicemail: get correct duration when copying file to vm
Changes made during format improvements resulted in the recording to voicemail option 'm' of the MixMonitor app writing a zero length duration in the msgXXXX.txt file. This change introduces a new function ast_ratestream(), which provides the sample rate of the format associated with the stream, and updates the app_voicemail function for ast_app_copy_recording_to_vm to calculate the right duration. Review: https://reviewboard.asterisk.org/r/3996/ ASTERISK-24328 #close ........ Merged revisions 423192 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/file.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h
index 3d8d2c97c..c71866ead 100644
--- a/include/asterisk/file.h
+++ b/include/asterisk/file.h
@@ -350,6 +350,13 @@ int ast_stream_rewind(struct ast_filestream *fs, off_t ms);
*/
off_t ast_tellstream(struct ast_filestream *fs);
+/*!
+ * \brief Return the sample rate of the stream's format
+ * \param fs fs to act on
+ * \return sample rate in Hz
+ */
+int ast_ratestream(struct ast_filestream *fs);
+
/*!
* \brief Read a frame from a filestream
* \param s ast_filestream to act on