by this, the ‘soundfile’ plays to the end of the file before returning the control. how do i playback a sound for, say, 10 seconds and return the control?
Background plays the whole file, so you will need to record the file for the correct length. and use it as below. but to be honest you may as well use playback
Note Its best to point to a context and use the m option and put no options in the context defined so that the caller cant interrupt the message.
another alternative is to have the file as wav musiconhold file and call that using WaitMusicOnHold(5)
thanx ianplain and raffles. the WaitMusicOnHold(10) kind of met my requirements. but i wanted to state the file to be played and time to be played. for example how to play a 60 sec soundfile for a 10 sec duration? … thanx.
But that would need SetMusicOnHold before calling WaitMusicOnHold. because i want to change the musiconhold class used each time.
SetMusicOnHold(myclass)
WaitMusicOnHold(10)