|
From: Zaheer M. <za...@gr...> - 2001-11-02 13:53:27
|
Sorry, I cannot wait for the rest of 0.5.0 to be complete (capi cleanup + test of failed calls). So I have started working on some of the 0.5.1 functionality. 0.5.1 is bringing an optional asynchronous driver interface into the driver functions. It's also allowing services to receive events. The current threading model is that the synchronous command runs on the thread that calls it. For asynchronous commands, however this cannot happen. Therefore I propose that worker threads are created on driver's initialisation, one thread for each channel. These threads would then be given "tasks" by the calling of the call control and dsp commands asynchronously. On start of tasks, a "doing" event would be sent to the PreViking layer, and on completion a "done" event would be sent. The extra events I have considered are: // Events due to async behaviour #define PV_TELEPHONY_PLACINGCALL 40 #define PV_TELEPHONY_ANSWERINGCALL 41 #define PV_TELEPHONY_REJECTINGCALL 42 #define PV_TELEPHONY_PLAYINGVOICE 45 #define PV_TELEPHONY_PLAYINGVOICE_DONE 46 #define PV_TELEPHONY_RECORDINGVOICE 47 #define PV_TELEPHONY_RECORDINGVOICE_DONE 48 #define PV_TELEPHONY_VOICESTREAMS_CONNECTED 49 #define PV_TELEPHONY_VOICESTREAMS_DISCONNECTED 50 #define PV_TELEPHONY_PLAYINGDTMF 51 #define PV_TELEPHONY_PLAYINGDTMF_DONE 52 #define PV_TELEPHONY_RECODINGDTMF 53 #define PV_TELEPHONY_RECORDINGDTMF_DONE 54 The call control and dsp commands would have a flag specifying whether the command is asynchronous or synchronous. The doubtful thing is, whether synchronous and asynchronous commands could be run on the same channel in the same session without causing problems. Regards Zaheer |