Algo for Event Handling For Digital Lines

From: General Listmanager <General.listmanager@pysdiscussext.py.intel.com>
Date: Sun Apr 25 2004 - 03:48:27 EDT

From: Iftach Silberman

On 4/23/2004 12:47:21 AM, ritesh taksali wrote:
>1)whether above algo is
>correct, what improvment can
>be done on this

It seems to be ok, but it is not full. Make sure your IVR routine combined with your callbacks know how to wait for and process events together.

>2)each channel is handle in
>seperate thread but two types
>of events can come on each
>channel Digital Events and
>Voice Events
>if one thred is handling
>digital events like CC_ANSWER
>, and the same time voice
>EVent come on this channel
>then what happen ?

Both events will be processed since you are using a callback, so each event will have it's own thread created when it arrives.

>3)whether to use
>sr_enablehanlr or use
>sr_waitevtex() function

Using sr_waitevtex seems probable when you have a single thread that handles all events for a specific group of devices and another thread (or other threads) that handle events for other groups of devices of the same type.

>4)this is callback event
>handling what happen if i use
>sr_waitevtex() method for
>polling , then a single
>eventhandler will handle all
>digitalChannel and voicechannl
>events

You can do that, but it would be easier to use a single thread with sr_waitevt (not sr_waitevtex) in it. I work this way for a long time.

>then it is possible like this
>sr_enablrhanlr(V[index].channe
>lId,ALL_EVT,EventHandler)
>sr_enablrhanlr(V[index].channe
>lId,ALL_EVT,EventHandler)
>then in this both (digital +
>voice )events come in single
>call back function

Yes.

-

To reply: mailto:General.28138@pysdiscussext.py.intel.com
To start a new topic: mailto:General@pysdiscussext.py.intel.com
To login: http://members.support.dialogic.com/wbproxy/wbpx.dll/~general
Received on Sun Apr 25 02:56:34 2004

This archive was generated by hypermail 2.1.8 : Sat Jul 16 2005 - 03:48:32 EDT