[asterisk-dev] Tracking Hold events

marcotasto at libero.it marcotasto at libero.it
Mon Jan 23 10:21:29 CST 2012


Hello List.

I need to track when an agent in a call center presses the Hold button to 
place current caller on MOH (and revert back to a normal conversation).
To do that I've found a solution I would like to share and discuss with all of 
you in the list.

The idea is to write a specific function that uses audiohooks to read channel 
frames, and triggers a specific gosub in dialplan when MOH events are found.
Audiohooks did not receive control frames; for that reason I've modified the 
channel.c in order to pass them to audiohook. 
I did something similar to what's done for the DTMF events and, in my test 
bench, all functions should now register to audiohook to listen control frames 
through a specific flag.
I've tested on asterisk 10.0.1 and I'm able to write something on CLI logs 
when an agent presses the HOLD button on the phone (I've not yet implemented 
the part that triggers a gosub).

I would like to have a feedback on that because I think that this is a feature 
could be usefull for other people. I can imagine to implement a more general 
function listening to specific events and perform actions as defined on the 
dialplan.

I don't know if I've to send patches to this list or somewere... please, tell 
me what's the best solution.

I'm waiting for your feedbacks.
Thank you and best regards,

Marco Signorini.





More information about the asterisk-dev mailing list