Answering a call


I want to answer a call after receiving an ADL_CALL_EVENT_RING_DATA event. If I call adl_callAnswer() in the callback routine, can the OS generate another event, the ADL_CALL_EVENT_ANSWER_OK event? How will the OS process the recursive events? Will another callback be called, beeing the stack in the callback routine?
If this is not the write way of doing it, how should it be?




The events aren’t recursive - they are sequential:

You call adl_callAnswer(), then exit your handler.
The handler will then be called again in due course when the ANSWER_OK happens.

There can be a significant delay between calling adl_callAnswer() and the ANSWER_OK event - over 10s!