cjewell
Free User
- Joined
- Mar 20, 2018
- Messages
- 6
- Reaction score
- 0
I've been able to use the Call Control API to detect the start and stop of calls on my PBX server, but I've run into a hiccup. On our client's PBX server multiple/duplicate ActiveConnection objects are generated for a single call through to an extension, both starting and stopping. The system will Insert or Delete up to 3-4 ActiveConnections that only seem to differ in their AttachedData, specifically their sip property. Different ip address and ports for the same call through to an extension. Only one connection survives through the call; the rest are cleaned up quickly. However, those duplicates are making it a bit difficult to use the call starts and stops as triggers to our third party program.
Specifically, I am listening to the Insert and Delete events, filtering out all but CONNECTION type Entities, and checking to see if the ActiveConnection's DN is an Extension type and that the call IsInbound=True. So Inserts that meet those criteria are starts, and Deletes are stops.
I figure the problem is that there are other things on the system that are creating CONNECTIONs to the extension when the call goes through, but I don't see anything obvious that might differentiate between types of connections.
Is there a way to detect the start and stop of calls that I'm not aware of?
Is there a more specific type of ActiveConnection (like, CallConnection or something), that I can listen for instead?
Is there some other way to get around or filter duplicate connection Inserts and Deletes?
Very stumped! Any help or nudges in the right direction are greatly appreciated.
Specifically, I am listening to the Insert and Delete events, filtering out all but CONNECTION type Entities, and checking to see if the ActiveConnection's DN is an Extension type and that the call IsInbound=True. So Inserts that meet those criteria are starts, and Deletes are stops.
I figure the problem is that there are other things on the system that are creating CONNECTIONs to the extension when the call goes through, but I don't see anything obvious that might differentiate between types of connections.
Is there a way to detect the start and stop of calls that I'm not aware of?
Is there a more specific type of ActiveConnection (like, CallConnection or something), that I can listen for instead?
Is there some other way to get around or filter duplicate connection Inserts and Deletes?
Very stumped! Any help or nudges in the right direction are greatly appreciated.