[asterisk-users] 'Bookmarking' a place in a sound file

Steve Edwards asterisk.org at sedwards.com
Tue Dec 7 15:32:50 UTC 2010


On Tue, 7 Dec 2010, David Cunningham wrote:

> Is it possible to somehow 'bookmark' a place in a sound file? That is, 
> the user presses a key while a sound file is playing and that point is 
> saved, and some time in the future we can play the same sound file and 
> tell it to start playing from that point.
> 
> This would be done within a perl AGI program.

The AGI command 'stream file' will return 'endpos' when interrupted with a 
keypress. You could then save that in a channel variable or a database.

A subsequent call to 'stream file' would include 'endpos' as the 'sample 
offset.'

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list