[Asterisk-Dev] fast-forward & rewind

Jim Gottlieb jimmy-ml at nccom.com
Tue Apr 8 16:20:59 MST 2003


Hi.  As part of porting a voicemail application from Dialogic to
Asterisk, we need to give people the ability to rewind or fast-forward
the message they are listening to.

We allow them to press * or # to rewind or fast-forward five seconds,
respectively.  However, we could use some hints on how to do this under
asterisk.

We use ast_streamfile() ast_waitstream() to play the messages, and can
allow the * or # to interrupt.  We can also use lseek() to seek to a
certain position in the file, but how do we know where in the file the
playing was when the user interrupted?

If we can know that, then we can lseek() back or forward from there.

One possibility is to note the time we start playing the file and
compare it to the time the DTMF interrupt happens, thus giving us a
good idea of where in the file they were.

Can anyone think of a better way, or is there some ast_ function we're
not aware of that would help?

Thanks...



More information about the asterisk-dev mailing list