DeadAGI and music on hold


I am having trouble getting musiconhold to work on my agi script when calling it through DeadAGI. I know it is not the ideal way to load an AGI script, but here is my scenario, perhaps someone can help me think of a better way to do it.

User A calls in and starts an AGI script. This script then initiates a call through a .call file to user B, while playing musiconhold to A. If user B accepts the call, they both then join a random MeetMe conference. When user B hangs up, I want to kick user A out of the conference and have him continue executing his AGI commands. This works fine when using DeadAGI, as I can run a meet_me_admin command from B even after he hangs up, but the music on hold feature doesnt work in that case.

The dialplan does not know which conference number to boot as it is a local AGI variable taken from the db.

Any ideas?

I am running asterisk 1.4.1.





Why are you using AGI when the dialplan can do all this for you?

Do you have some ‘wierd and wonderful’ plans :wink:?

Thanks for the reply… AGI was the fastest development time and the easiest way for us to set this up. We have webservices, database access, and somewhat complex calculations all being handled through AGI. Writing this code in dialplan is too much work.

Any other suggestions?