- Joined
- Jun 10, 2014
- Messages
- 4
- Reaction score
- 0
Hi hoping someone can help me figure this out -- I sure haven't yet.
We have about 50 toll free number placeholders registered in our 3CX system. Each as their own inbound rule forwarding to an IVR. I'm trying to get the system to tell me what number was dialed on the inbound calls so we can manage a proper response.
The built-in emails about a missed call do not have the number, they only show the IVR extension / name. So, I tried to make my own DLL from the Call Control API. Unfortunately the dialed number is not exposed
. I'm able to pull all of the ActiveConnection properties, and there IS a DialedNumber property (but it is always blank), however none show the proper dialed number that the person / robot called in as. Quite frustrating.
The verbose Server Activity Logs do have the number in the SIP header... so I know 3CX keeps track of it somewhere!
Has anyone come up with a solution for this?
We have about 50 toll free number placeholders registered in our 3CX system. Each as their own inbound rule forwarding to an IVR. I'm trying to get the system to tell me what number was dialed on the inbound calls so we can manage a proper response.
The built-in emails about a missed call do not have the number, they only show the IVR extension / name. So, I tried to make my own DLL from the Call Control API. Unfortunately the dialed number is not exposed
The verbose Server Activity Logs do have the number in the SIP header... so I know 3CX keeps track of it somewhere!
Has anyone come up with a solution for this?
Code:
try
{
Tenant[] tenantArr = PhoneSystem.Root.GetTenants();
DN[] dnArr = tenantArr[0].GetDN();
File.AppendAllText(path, "Successfully tied into PhoneSystem. \n");
foreach (DN dn in dnArr)
{
ActiveConnection[] connections = dn.GetActiveConnections();
foreach (ActiveConnection activeConnection in connections)
{
File.AppendAllText(path, String.Format("DialedNumber: {0} \n", activeConnection.DialedNumber)); //always empty
File.AppendAllText(path, String.Format("CallID: {0} \n", activeConnection.CallID));
File.AppendAllText(path, String.Format("InternalParty: {0} \n", activeConnection.InternalParty)); //just gives 861 the IVR extension #
File.AppendAllText(path, String.Format("Referred By: {0} \n", activeConnection.ReferredBy));
File.AppendAllText(path, String.Format("ExternalParty: {0} \n", activeConnection.ExternalParty));
File.AppendAllText(path, String.Format("CallConnectionID: {0} \n", activeConnection.CallConnectionID));
if (activeConnection.ExternalParty == callerID)
{
File.AppendAllText(path, String.Format("Match found for {0} \n", callerID));
return activeConnection.DialedNumber;
}
}
}
File.AppendAllText(path, String.Format("Match not for {0} \n", callerID));
return "Not Found.";
}