RingEventArgs not firing up

Feb 9, 2012 at 2:44 AM

Hi guys,

I'm trying to some stuff when the line is ringing, but the RingEventArgs is not firing up...I'd already initialize all required component(TapiManager,TapiLine,TapiPhone), but still not work...Other event like NewCallEventArgs can be use,I already try it...Below is my code for RingEventArgs...

 

private TapiLine TLine;

TLine = TManager.Lines[CHOOSENLINE];
TLine.Ringing += new EventHandler<RingEventArgs>(TLine_Ringing);

public void TLine_Ringing(object sender, RingEventArgs e)       

{

//I would like to do my stuff here...

}

 

*Noted that TManager already initiate, I just want to show the important code only...

 

Thanks...

Coordinator
Feb 9, 2012 at 3:31 PM
Hi,

You didn't mention what type of device you are controlling; when I was working in TAPI I found that most drivers do not report ringing events. Modems are the exception since they do report a signal for that. I've also seen some drivers report ringing through a device extension. Please check with the hardware manufacturer or TSP developer to see if they exposed this functionality for your device. You can also use a tool like TAPI browser, or the phone app to see if it's seeing the ringing to determine if it's a problem with your code.

Best of luck!
mark
Feb 17, 2012 at 8:18 AM

Hi Mark,

 

Thanks for quick reply. I'm using NEC SV8100(PBX), NEC Infrontia 3rd party driver(Driver). I already email NEC support person,but still no reply. I'm new to TAPI, telephony, and call center development. I dont know to whom may I consult with. Really appreciate if you can direct me or give me a link that contain example. Anyway,is there any other way I can detect if the line is ringing/incoming call?

 

Thanks,                                                                                                                                                                                                                          

Izat

Coordinator
Feb 20, 2012 at 1:31 PM
Hi,

I'm not familiar with the NEC model, this is the primary issue people have with TAPI -- things aren't quite the same from one piece of hardware to another, it's all dependent on the driver and how they (NEC) implemented it. You might look for some NEC support forums, it's going to be NEC that has to answer your question..

Good luck!
mark


On Feb 17, 2012, at 2:19 AM, ijat wrote:

From: ijat

Hi Mark,


Thanks for quick reply. I'm using NEC SV8100(PBX), NEC Infrontia 3rd party driver(Driver). I already email NEC support person,but still no reply. I'm new to TAPI, telephony, and call center development. I dont know to whom may I consult with. Really appreciate if you can direct me or give me a link that contain example. Anyway,is there any other way I can detect if the line is ringing/incoming call?


Thanks,

Izat


Feb 22, 2012 at 3:04 AM

Hi,

Thanks for the answer, I'm dealing with NEC support now. One more thing, how can I monitor each extension CallState? I want to create a table that contain all extension CallState, which mean what each extension doing on real time. Either they are Idle,Busy,Offering,etc. Is it can be done using ATAPI?

Thanks,

Izat

Coordinator
Feb 22, 2012 at 1:08 PM
Hi,

There are several ways to do it. You could go through each line or address and look at the LineStatus / AddressStatus which give call count, OnHoldCount, etc. Or go through each line and use GetCalls() to retrieve the active calls (more than one per line). Or through each address on each line and use the Calls property to retrieve calls specific to that address.

Tapi organizes things like this:

Line
+----- Address
+------- Call
+------- Call
+------ Address
...

Based on the above retrieval you could then decide what each extension is doing. For example - it might be offering AND active (i.e. a call is active, another is ringing on the same address or different address on the same line). There's not a simple determination within TAPI itself because it supports a variety of setups. Your hardware is what determines the limitations.

mark



On Feb 21, 2012, at 9:04 PM, ijat wrote:

From: ijat

Hi,

Thanks for the answer, I'm dealing with NEC support now. One more thing, how can I monitor each extension CallState? I want to create a table that contain all extension CallState, which mean what each extension doing on real time. Either they are Idle,Busy,Offering,etc. Is it can be done using ATAPI?

Thanks,

Izat


Feb 28, 2012 at 9:31 AM

Hi mark,

Can you guide me how to setup a conference call? I'd tried using TCall.SetupConference(param,param,param), but got an error(safe handle has been closed). Really appreciate if you can teach me step-by-step.

Thanks.

Coordinator
Feb 28, 2012 at 2:40 PM
Conferences are one of the things not dictated by TAPI. You need to refer to your documentation as to how to set them up. It might require an existing call to start, or you might have to create the call specifically for conference, or you might have to always transfer to conference from hold. Any of those are valid options - it's all up to the hardware provider.

m

On Tue, Feb 28, 2012 at 3:31 AM, ijat <notifications@codeplex.com> wrote:

From: ijat

Hi mark,

Can you guide me how to setup a conference call? I'd tried using TCall.SetupConference(param,param,param), but got an error(safe handle has been closed). Really appreciate if you can teach me step-by-step.

Thanks.

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 5, 2012 at 10:04 AM

Hai mark,

I've two questions here:

1. Sometimes when I using Answer() function to answer incoming call, I got this error in BeginAnswer(param,param,param) function that state 'safe handle has been closed'. The error refer to 'int rc = NativeMethods.lineAnswer(Handle, uuInfo, (uuInfo != null) ? uuInfo.Length : 0);' in the BeginAnswer(param,param,param) function. This error just appear sometimes,not each time when use Answer() function.

2. I got an error when using Drop() function for incoming(but not answer yet) call. After drill to the ATAPI library, the error comes from EndDrop(param) function. The error state 'lineDrop failed [0x80000048] The operation failed for unspecified reasons' and point on the end of curly bracket-->}.

Thanks

Coordinator
Mar 5, 2012 at 1:11 PM

1. Sometimes when I using Answer() function to answer incoming call, I got this error in BeginAnswer(param,param,param) function that state 'safe handle has been closed'. The error refer to 'int rc = NativeMethods.lineAnswer(Handle, uuInfo, (uuInfo != null) ? uuInfo.Length : 0);' in the BeginAnswer(param,param,param) function. This error just appear sometimes,not each time when use Answer() function.

I suspect the call has dropped off already when you try to answer it. When that happens, the handle is closed - you are no longer able to answer the call. Hence the error that the "Safe Handle" (which is the .NET wrapper around the call) has been closed. TAPI is an async programming API, expect an error/exception at any time - every method you call MUST have a try/catch around it.

2. I got an error when using Drop() function for incoming(but not answer yet) call. After drill to the ATAPI library, the error comes from EndDrop(param) function. The error state 'lineDrop failed [0x80000048] The operation failed for unspecified reasons' and point on the end of curly bracket-->}.


When the native API fails (errors like 0x8000xxxx), the wrapper library wraps it into a TapiException and throws it back to the caller. In this case, again I'm guessing the call ended on the other side - you cannot drop it anymore since it's already been dropped. If you are in the debugger, and you don't catch the exception, it always points you at the end of the curly brace.

Again, you must always wrap every single call with a try/catch. Everything can and will fail in TAPI because you have two sides the call and cannot predict what the other side will do. If they drop the call, it affects your side - you cannot answer/drop/hold/etc. and the only proactive thing you can do is close the call or release the call handle (let it fall out of scope). Note that the status properties are all ok to access.

mark
Mar 7, 2012 at 8:00 AM

Hi mark,

Is TAPI provide function for user to login the ACD? If yes, can the application detect whether user already login or not? Because user can choose to login using PC application or directly using phone terminal.

Thanks

Coordinator
Mar 7, 2012 at 1:27 PM

Yes, they were added with TAPI 2.2.  See here for the documentation on the methods:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms734837(v=vs.85).aspx

Be aware, some ACD manufacturers did not support them - they were added quite late and by the many had already created device-specific mechanisms to login and change agent state.  This is one of the odd areas of TSP development as well - the user API (lineSetAgentState, etc.) do not correspond to any calls on the device driver side.  Instead, the vendor had to build a proxy agent application which ran on the server to do the work.

This is also not an area that ATAPI was ever expanded into - primarily because I never needed or used agent support.  The current codebase here does not have any of these methods defined.  To use them you will have to add to the source (please contribute it back if you do so others can benefit), particularly the interop.cs file to expose the native methods.

Hope that helps,

mark

Mar 8, 2012 at 3:26 AM

Hi mark,

Thanks a lot mark, I'll try to do it and add the source but it will take so much time. I need to understand how you build the function and I need start from scratch. Surely, it will take much time. I'll tell you if I can do it.

I've two more questions here:

1. Which PABX is most suitable to be use with ATAPI that you create? Because some of the function in ATAPI cannot be implement with my NEC PABX.

2. How can I integrate telephony system into CRM system? Its no problem when I integrate it using intranet, but my CRM is totally using internet. So I wonder how can I communicate the telephony using internet.

Thanks.

Izat