Execute Dialplan While Playing MusicOnHold or music

i am using asterisk 1.4 and asterisk 1.6. i want to play music/musichonhold while executing the rest of dial plan.

  1. answer call.
  2. get some input.
  3. playmusic
  4. AGI (queuery against input from the database.)
  5. play query result.

when i call AGI-- this connect to remote database and get some results but sometime it take 20 or more seconds and their is complete silent on the call and user think the call drop and he drops the call. i want to play music to the caller so he would not drop the call.

If you don’t answer the call before the MySQL query, you can try with playing music on hold with the help of the Progress() application.

This could help wiki.asterisk.org/wiki/display/ … pplication

i cannot use progress() as i have to answer the call before and get input from user. on which query is performed through AGI and then results are played to caller. problem is that some times query takes long time and due to complete silent caller hangup the call

Well a simple and logical solution until you find how to play the music on hold, is to play a warning to the caller of the estimated time before the query. Too you could increase the bandwidth of your connection with the remote server, that could reduce the delay on the response time.