Problem with number outgoing call reporting

Status
Not open for further replies.

greychain

Gold Partner
Advanced Certified
Joined
Jul 13, 2018
Messages
779
Reaction score
122
I am having an issue with outgoing call reporting, the scenarios work in the template generator but in the system it does not.

I think the issue is with the MSISDN number format. I have set incoming and outgoing call reformatting to remove the 00 and replace it with +
00(.*) +\1

In the systemlog it's still showing the number as being 0049xxxxxxxxxx . The number stored in the CRM is formatted as +49xxxxxxxxxx, sometime it finds a match and sometimes it doesn't.

2022/03/16 14:29:12.890|17919|0027|Trac|CHR: [CDR] file writer: open/create file '/var/lib/3cxpbx/Instance1/Data/Logs/CDRLogs/cdr.log'
2022/03/16 14:29:12.890|17919|0042|Info|CRM: about to report 1 calls at maxConcurrency 1
2022/03/16 14:29:12.890|17919|0042|Verb|CRM: Call Journaling event received, searching for number '0049xxxxxxxxxx' in 3CX Contacts.
2022/03/16 14:29:12.890|17919|0042|Verb|Processing scenario 'ReportCall'.
2022/03/16 14:29:12.890|17919|0042|Verb|Creating new HttpClient with no authentication
2022/03/16 14:29:12.891|17919|0042|Verb|Skipping request...
2022/03/16 14:29:12.891|17919|0042|Verb|Continue with empty matching.
2022/03/16 14:29:12.891|17919|0042|Verb|Processing scenario 'ReportCall-Outbound'.
2022/03/16 14:29:12.891|17919|0042|Verb|Creating new HttpClient with no authentication
2022/03/16 14:29:12.891|17919|0042|Verb|Skipping request...
2022/03/16 14:29:12.891|17919|0042|Verb|Continue with empty matching.
2022/03/16 14:29:12.891|17919|0042|Verb|Processing scenario 'ReportCall-Missed'.
2022/03/16 14:29:12.891|17919|0042|Verb|Creating new HttpClient with no authentication
2022/03/16 14:29:12.891|17919|0042|Verb|Skipping request...
2022/03/16 14:29:12.891|17919|0042|Verb|Continue with empty matching.
2022/03/16 14:29:12.891|17919|0042|Verb|Processing scenario 'ReportCall-Notanswered'.
2022/03/16 14:29:12.891|17919|0042|Verb|Creating new HttpClient with no authentication
2022/03/16 14:29:12.891|17919|0042|Verb|Performing POST request to 'https://systemname.weclapp.com/webapp/api/v1/_app_crmCallLog/' with message '{"customerId":"6173456","inOut":"Outgoing","description":"[DateTime]: Unanswered outgoing call from [Agent] to [Number] [Name]","logType":"LOG_CALL","subject":"16.03.2022 14:29: Unanswered outgoing call from 431 to 0049xxxxxxxxxx Bastian Schrötter","customerNumber":"6173456"}'.
2022/03/16 14:29:12.964|17919|0042|Verb|The response is: '{


2022/03/16 14:53:50.762|17919|0044|Info|Transcribe is disabled
2022/03/16 14:53:50.763|17919|0044|Trac|CHR: [CDR] file writer: open/create file '/var/lib/3cxpbx/Instance1/Data/Logs/CDRLogs/cdr.log'
2022/03/16 14:53:50.763|17919|0044|Info|CRM: about to report 1 calls at maxConcurrency 1
2022/03/16 14:53:50.764|17919|0044|Verb|CRM: Call Journaling event received, searching for number '0049xxxxxxxxxx' in 3CX Contacts.
2022/03/16 14:53:50.764|17919|0044|Verb|Processing scenario 'ReportCall'.
2022/03/16 14:53:50.764|17919|0044|Verb|Creating new HttpClient with no authentication
2022/03/16 14:53:50.764|17919|0044|Verb|Skipping request...
2022/03/16 14:53:50.765|17919|0044|Verb|Continue with empty matching.
2022/03/16 14:53:50.765|17919|0044|Verb|Processing scenario 'ReportCall-Outbound'.
2022/03/16 14:53:50.765|17919|0044|Verb|Creating new HttpClient with no authentication
2022/03/16 14:53:50.765|17919|0044|Verb|Performing POST request to 'https://systemname.weclapp.com/webapp/api/v1/_app_crmCallLog/' with message '{"customerId":"","inOut":"Outgoing","description":"[DateTime]: Answered outgoing call from [Agent] to [EntityType] [Name] ([Duration])","logType":"LOG_CALL","subject":"3CX Outbound:","customerNumber":""}'.
2022/03/16 14:53:50.825|17919|0044|Erro|Exception during call reporting: System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason=Bad Request - Content={
"error": "one of customer, lead and supplier is required"
 
First, make sure you run U3 as there was a bug with that. For that, you would want to use something like "match 9 or 10 digits" and not "match exactly" which will indeed cause that kind of annoyance.
 
Does it match from the beginning or the end? I've set it for 11, I'll try 9 and 10 to see what happens
Have tried with 9 an d10 and still not matching. Found this, not sure what the last part means though.1647508477645.png

I'd also like to know , in the first scenario it can match the number but in the second it can not and they are both the same number
 
Last edited:
This looks to me like an issue in your custom template. I'm saying this because in the second case when you have the issue, no variable is being replaced. The JSON data sent to the web server is:
{"customerId":"","inOut":"Outgoing","description":"[DateTime]: Answered outgoing call from [Agent] to [EntityType] [Name] ([Duration])","logType":"LOG_CALL","subject":"3CX Outbound:","customerNumber":""}

That's weird, but you can see that there are no replacements.

The difference between the first and second case is the call type (answered / not answered), so 2 different scenarios are being executed here. I would say that the scenario handling the answered call has some issues.... But I would have to see the template to understand what's going on.
 
Call Journaling event received, searching for number '+49xxxxxxxx' in 3CX Contacts.

Does this mean the system does a lookup in the 3CX contacts, not using the CRM integration?
 
When the call starts, 3CX does the lookup in the CRM, and the matched contact is added to 3CX Contacts. When the call ends, the number is searched in 3CX Contacts (the contact should be there if there was a match), and then it reports the call using the contact details taken from there.
 
  • Like
Reactions: Evolute IT
What would stop it adding the contact details to the 3CX contacts DB?
 
What would stop it adding the contact details to the 3CX contacts DB?
In order to add the contact to 3CX, the template must return the following outputs:
- The ContactUrl having a unique value.
- The FirstName, LastName or CompanyName having a value.
- A phone field having the number being searched.
 
  • Like
Reactions: Evolute IT
Hello Edossantos I've PM'd you a systemlog, could you check to see if it meets these requirements. An example of a successful system log contact creation would be be helpful
 
The contact is added to the phonebook for the call you pointed out in your message. But the issue you have is something else, it seems that your template is not replacing the values for the variables. Most probably you're missing the Passes="2" attribute during the call journaling scenario for answered outgoing calls.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,473
Latest member
NathanMitchell