Gather Call and Device Info

Mar 12, 2013 at 1:58 PM
I want to know which Tapi Device is taking a call when no project is running.

We have one Tapi Line on which all devices are listening. If a device is recieving a call and no project to the device is running i dont know who took the call.

One device with a running tapi project which is allways on can see when a call is incoming. In an XML file I have entrys like:
<entry>
<DATA ID ="1" NAME="Tom" />
<DATA ID ="2" NAME="Paul" />
<DATA ID ="3" NAME="Angie" />
<entry>

Every User has a Telephone Device with a permanent TapiAdress ID
If the reciever take a call I can look up my TapiAddress (eg. ID = 1) if the project is running and know who took the call.
But if someone else took the call I want to know who took it.
Is there a solution to find out which device id took the call?

I tried the following:

private void OnCallStateChanged(object sender, CallStateEventArgs e)

if (e.OldCallState == CallState.Offering && e.CallState == CallState.Idle)
{
//So i know when we miss the call but someone else could have taking the call 
// with e.Call.Id  i know which Call ID the call has but i cant get a a device
...
}

Any solutions?
Coordinator
Mar 12, 2013 at 2:24 PM
What do you mean "no project is running". Does that mean no TAPI app is running? If so, TAPI itself won't get the information and so it won't be available to you. You would need some monitoring application running 24x7 in order to know inbound calls and their final destinations.

mark

On Tuesday, March 12, 2013 at 8:58 AM, lucasmalo wrote:

From: lucasmalo

I want to know which Tapi Device is taking a call when no project is running.

We have one Tapi Line on which all devices are listening. If a device is recieving a call and no project to the device is running i dont know who took the call.

One device with a running tapi project which is allways on can see when a call is incoming. In an XML file I have entrys like:
<entry>
<DATA ID ="1" NAME="Tom" />
<DATA ID ="2" NAME="Paul" />
<DATA ID ="3" NAME="Angie" />
<entry>

Every User has a Telephone Device with a permanent TapiAdress ID
If the reciever take a call I can look up my TapiAddress (eg. ID = 1) if the project is running and know who took the call.
But if someone else took the call I want to know who took it.
Is there a solution to find out which device id took the call?

I tried the following:

private void OnCallStateChanged(object sender, CallStateEventArgs e)

if (e.OldCallState == CallState.Offering && e.CallState == CallState.Idle)
{
//So i know when we miss the call but someone else could have taking the call  
// with e.Call.Id  i know which Call ID the call has but i cant get a a device
...
}

Any solutions?

Read the full discussion online.

To add a post to this discussion, reply to this email (atapi@discussions.codeplex.com)

To start a new discussion for this project, email atapi@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 12, 2013 at 3:47 PM
markjulmar wrote:
What do you mean "no project is running". Does that mean no TAPI app is running? If so, TAPI itself won't get the information and so it won't be available to you. You would need some monitoring application running 24x7 in order to know inbound calls and their final destinations.
Thanks for the fast answer.

Yeah with no project is running I mean there is no TAPI App running. One Tapi App is always running on the server to get all the incoming calls if someone isnt here.
The Problem is that the TAPI App on the server dont know wich device took the call. Thats what I want to know.
Sometimes in the morning the first Person in our office rushing in and take the call with no TAPI App running atm at thier computer because the computer is shut down.
After the person pick up the call the server dont know where the destination device is.

Is it possible to see that?

Another idea i had was a workaround to call all devices and see which device CallState is on "Busy"
But that didn't work well.

Regards Lucas
Coordinator
Mar 15, 2013 at 12:37 PM
It depends on the hardware vendor and how complete their TSP implementation is I think. If it is really transferring the call to a station then you should see some change in the CallInfo - i.e. caller, called, redirecting, redirection info. The data structure is there and intended to be used for this exact purpose. But it's very possible that the TSP doesn't report it in which case I don't see any way to get that.

See if it's being reported there..

mark

On Tuesday, March 12, 2013 at 10:47 AM, lucasmalo wrote:

From: lucasmalo

markjulmar wrote:
What do you mean "no project is running". Does that mean no TAPI app is running? If so, TAPI itself won't get the information and so it won't be available to you. You would need some monitoring application running 24x7 in order to know inbound calls and their final destinations.
Thanks for the fast answer.

Yeah with no project is running I mean there is no TAPI App running. One Tapi App is always running on the server to get all the incoming calls if someone isnt here.
The Problem is that the TAPI App on the server dont know wich device took the call. Thats what I want to know.
Sometimes in the morning the first Person in our office rushing in and take the call with no TAPI App running atm at thier computer because the computer is shut down.
After the person pick up the call the server dont know where the destination device is.

Is it possible to see that?

Another idea i had was a workaround to call all devices and see which device CallState is on "Busy"
But that didn't work well.

Regards Lucas

Read the full discussion online.

To add a post to this discussion, reply to this email (atapi@discussions.codeplex.com)

To start a new discussion for this project, email atapi@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 15, 2013 at 1:03 PM
markjulmar wrote:
It depends on the hardware vendor and how complete their TSP implementation is I think. If it is really transferring the call to a station then you should see some change in the CallInfo - i.e. caller, called, redirecting, redirection info. The data structure is there and intended to be used for this exact purpose. But it's very possible that the TSP doesn't report it in which case I don't see any way to get that. See if it's being reported there..
With the actual driver its not possible I think. CallInfo ect. are not changing. I already tried to get the redirectingID but without success.
I will try a new driver for the devices and post my result here later.

Regards Lucas
Mar 18, 2013 at 8:55 AM
I tried a new driver now.
A Hipath 2000 driver from Estos. With this driver I can watch every Lines.

// to initialize the lines i want to check. another function is in use to have a Line to do calls
    public void setChecklines(List<string> lines)
    {
        if (lines == null)
            return;
        foreach (TapiLine line in tapiManager.Lines)
        {
            try
            {
                if (lines.Contains(line.Name))
                {
                    line.Monitor();
                    this.checklines.Add(line);
                }
            }
            catch (TapiException ex)
            {
                Trace.TraceError(ex.ToString());
            }
        }
    }
After I initialized them i can see when a call is incoming and someone else took the call with
 private void OnCallStateChanged(object sender, CallStateEventArgs e)
 {
  if (e.OldCallState == CallState.Offering && e.CallState == CallState.Idle)
        {
            foreach (TapiLine tl in checklines)
            {
                TapiCall[] tc = tl.GetCalls();
                foreach (TapiCall t in tc)
                {
                    if (t.CallState == CallState.Connected)
                    {
                        // Code
                    }
                }
            }
   }
Works fine for me.
Coordinator
Mar 18, 2013 at 3:42 PM
That's great - thanks for the report!

mark