0
votes

I have a context in my dialplan which passes control (temporarily) to a bash script. This script does some processing which takes about 5 seconds. During this time, there is total silence on the telephone line. For telephony based applications, such long periods of silence is a strict no-no.

How can I get music (or some other file) to play in the background while the program is executing?

I took a look at Background and that does not seem to be the answer. Any help is most welcome.

1

1 Answers

1
votes

BEFORE you call system(), call MusicOnHold(), so like:

exten => s,n,MusicOnHold()
exten => s,n,System(;-- do something --;)
exten => s,n,StopMusicOnHold()