How to get DID Call Control Websocket

JKTDev

SOHO User
Joined
Dec 10, 2022
Messages
2
Reaction score
0
Hello,

I’m listening to real-time call events over WebSocket and then calling the Call Control API endpoint that matches:
/callcontrol\/([^/]+)\/participants\/([^/]+)$/

and the result is

{
id: 907,
status: 'Connected',
dn: '361',
party_caller_name: '',
party_dn: '10001',
party_caller_id: '88888',
party_did: '',
device_id: 'sip:[email protected]:5483',
party_dn_type: 'Wexternalline',
direct_control: false,
originated_by_dn: '',
originated_by_type: 'None',
referred_by_dn: '',
referred_by_type: 'None',
on_behalf_of_dn: '',
on_behalf_of_type: 'None',
callid: 251,
legid: 3
}

For inbound calls, dn and party_dn don’t reflect the actual DID that was called (they show the trunk internal routing/DN like 10001).
Question: What is the correct way to retrieve the real DID (the called number) for the called party?
  • Is it exposed in a different field or endpoint (e.g., /callcontrol/{callId} or a call history record)?
  • Do I need to map trunk DN → DID via another API?
Environment: 3CX v20.


Thank you.
 
Did you ever get an answer on this ... am going through the same thing here too

"party_dn":"10002" ... but there is no extension 10002 .. and party_did comes in as empty ...

I also have ""callid":29" ... but can't find anything to do with that either ..

latest version of v20 ( within last week or so )
 
I'd like to have the same feature, it would be very helpful to get the DID that was called.

I think if I put all the incoming DIDs on their own Trunk, then I can differentiate, I *think* that's what that party_dn number is?
But that would be giant pain from a server maintenance perspective.
 
We are seeing the 'party_did' field empty in the 3CX Call Control API using Websockets access call records for version 20, even though calls route correctly. This worked fine on previous versions co-hosted on the same machine as the 3CX phone system but we had to use Call Control API "GetActiveConnectionsByCallID" and retrieve DNIS. Is this expected behavior or a bug? We need a reliable way to get the DNIS for customer CRM integration.
 
Hello alternate,

Please mention the exact 3CX Server version you are using, just V20 is not enough as lot's has changed recently.
I do thing you should be at: 20.0.8.1121

When you mention you ''party_did' field empty in the 3CX Call Control API', do you see this in any other part, like call reports ?
So it is alway missing information, or only in the all Control API ?
Please let us know.

Paulo
 
  • Like
Reactions: KyriacosS_3CX

Members Online Now

No members online now.

Forum statistics

Threads
111,843
Messages
589,327
Members
164,679
Latest member
SamadMYK