View Full Version : I want to implement A TIMER FUNCTION in an IVR app on HMP (AOH) on win platform

05-28-13, 03:04 AM
I have an IVR app in C using HMP AoH. We are processing all received events on incoming calls like collecting DTMP digits, playing messages and collecting voice messages. I need to add a timer function to this so that the timer goes off every say 2 minutes and I get a message in the event queue . I use that event to handle out bound functions not initiated by the users calling in. Basically, I need a custom event ( always same event) to be generated every 2 minutes so that I can use that as a cue to initiate actions from the script. The platform is windows. Please HELP

05-28-13, 03:51 AM
use wait on event with a timer value of say 60000 ms. if the waitonevent function returns with no event during this duration, I inject a custom event in the queue. the system again waits for an event for that specified time. now when the custom event arrives, I use it as a cue to do my own house keeping jobs.

05-28-13, 08:26 AM
Yes, the built-in Windows wait on event method will work. Alternatively you could try using the PKH_TIMER APIs if using the low level HMP API ( or PKX_SYSTEM_InjectEvent if using the high level Grandprix API ). These APIs provide timer functionality through the Pika API. They are setup, captured and logged through the same mechanism as other API events.

Hope it helps.