B
Bob
Hi,
I have an app that has a 3rd party phone answering control (4 of )
(interfacing with dialogic 4 line card) attached to the main form.
each control raises an event when its Dialogic line detects ring tone.
I use the ring detect event handler to create a new thread which is given a
reference to the control that is being rung. The called method then
interacts with the control until the call finishes.
My problem is that I believe I am getting thread blocking between the
threads that are dealing with the calls.
There doesn't appear to be any consistent pattern to the blocking and I was
wondering what techniques I can use to further investigate this. I have run
the app under a commercial profiler but there is nothing definitive showing.
Each of the phone call threads seem to get roughly the same time.
The blocking occurs when the phone handling objects are getting input from
phone users. (DTMF tones) but varies at which point it occurs.
Initiating Code from one of the four ring detect event handlers follows:
telecall te = new telecall();//Class that contains state engine to handle
call
te.TraceMessage += new telecall.TraceMessageEventHandler(te_TraceMessage);//
info back from state engine
te.LineStateChange += new
telecall.LineStateChangeEventHandler(this.SetLineStatus); // Phone line
status back from state engine
te.MyForm = this;//Ref to stop orphans
te.Vbocx = ((AxVbocxLibrary.AxVBocx)(sender));//Assigning ref to the line
handling object.
ThreadStart ts = new ThreadStart(te.HandleCall);// State engine
Thread t = new Thread(ts);
t.Name = "PH1";
t.SetApartmentState(ApartmentState.STA);//desperation
t.Start();
I have an app that has a 3rd party phone answering control (4 of )
(interfacing with dialogic 4 line card) attached to the main form.
each control raises an event when its Dialogic line detects ring tone.
I use the ring detect event handler to create a new thread which is given a
reference to the control that is being rung. The called method then
interacts with the control until the call finishes.
My problem is that I believe I am getting thread blocking between the
threads that are dealing with the calls.
There doesn't appear to be any consistent pattern to the blocking and I was
wondering what techniques I can use to further investigate this. I have run
the app under a commercial profiler but there is nothing definitive showing.
Each of the phone call threads seem to get roughly the same time.
The blocking occurs when the phone handling objects are getting input from
phone users. (DTMF tones) but varies at which point it occurs.
Initiating Code from one of the four ring detect event handlers follows:
telecall te = new telecall();//Class that contains state engine to handle
call
te.TraceMessage += new telecall.TraceMessageEventHandler(te_TraceMessage);//
info back from state engine
te.LineStateChange += new
telecall.LineStateChangeEventHandler(this.SetLineStatus); // Phone line
status back from state engine
te.MyForm = this;//Ref to stop orphans
te.Vbocx = ((AxVbocxLibrary.AxVBocx)(sender));//Assigning ref to the line
handling object.
ThreadStart ts = new ThreadStart(te.HandleCall);// State engine
Thread t = new Thread(ts);
t.Name = "PH1";
t.SetApartmentState(ApartmentState.STA);//desperation
t.Start();