CallStateChanged Event not occured

May 23, 2013 at 3:05 PM
Hello,
I wrote this code for getting the Incoming call number, but the CallStatteChanged event has not occured. Someone have an idea?
private TapiManager tapiManager = new TapiManager("InCommingCall");
tapiManager.Initialize();

 foreach (TapiLine line in tapiManager.Lines)
            {

                line.Monitor();
                line.CallStateChanged += new EventHandler<CallStateEventArgs>(line_CallStateChanged);

            }

private void line_CallStateChanged(object sender, CallStateEventArgs e)
    {

        this.txtInfo.Text = this.txtInfo.Text + "Line Incomming Call number: " + e.Call.CallerId;

    }

When I call my Cisco IP Phone, no event occured.



Thanks
Coordinator
May 23, 2013 at 7:40 PM
Add in a handler for NewCall so you see new calls. My guess is nobody took ownership so TAPI deallocates the call. You have to have an owner for TAPI to keep track of the call itself. NewCall will let you see new inbound calls, then you can decide whether you want to own the call or not and THEN you will see future call state changes.

mark

Mark Smith

[email removed] | @marksm | 214-774-4749 | www.julmar.com/blog/mark



May 24, 2013 at 9:51 AM
I just added the event NewCall but no effect also.

line.NewCall += new EventHandler<NewCallEventArgs>(line_NewCall);

My hardware configuration is like that:

Network RJ 45 cable comes to my IP Phone Cisco and from my IP Phone Cisco another cable comes to my PC.

Todisoa
Coordinator
May 24, 2013 at 4:40 PM
Try opening in Owner mode. If there's no owning application TAPI won't even take the call.

Mark Smith

[email removed] | @marksm | 214-774-4749 | www.julmar.com/blog/mark