3CX to Bitrix24

Status
Not open for further replies.

Axsom

Bronze Partner
Basic Certified
Joined
Feb 5, 2021
Messages
9
Reaction score
3
I am having some difficulty.
When I first set this up as per the instructions ' 3cx.com/docs/bitrix24-crm-integration/ ' every test number I used opened Bitrix as a New 3CX Contact with the number, each test call created another "New 3CX Contact w/ number". SO i ended up having SEVERAL identical "New 3CX Contacts"
Each number was already in Bitrix either as a businesses main number or someone's mobile number. Nothing would open the contact correctly in Bitrix. I thought it might be, and still think it is an issue, that 3CX includes the country code. I added Source pattern: +(1)(.*) Replace Pattern: \2 to the SIP trunk, I could see that just the 10 digits was sent but now it wouldn't open Bitrix and received a 'page does not exist' message. So I reverted all my setting and nothing worked.
Then I started from scratch and just as before everyone is sent to Bitrix as a New 3CX contact. I tried adding the contact to 3CX fist, didn't think it would make a difference and I was right.
Deleted the duplicate New 3CX Contacts, and now again nothing is popping.

The setup instructions are very straight forward. Please let me know what I can provide to help troubleshoot.
 
Bitrix doesn't accept the + symbol as country code prefix, so the template replaces it with 00 in the case you receive the call with that prefix. Bitrix needs an exact match, so the number being searched must be present in Bitrix without dashes, spaces or any other special character.

In order to troubleshoot this, you need to enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings, then make a test call, and check the 3cxSystemService.log. In that log file you will see what 3CX is sending to Bitrix, and what's coming back in their response.

Please do not post the contents of that file here, as it will contain sensitive information. If you need us to take a look, send it in a private message.
 
OK, I have added a new out of state contact into Bitrix. Our default country is US. When I search in Bitrix for that new contact with just their 10digit number it is able to find them, if I put a 1 on their number it does not. How do I remove the +1 from the 3CX CID without messing up anything else in the header.
I thought I tried this already but I may have had it incorrect, here was my attempt:
Source Pattern: +(1)(.*) Replace Pattern: \2

If removing the +1 from number does not work, then I will turn on Verbose Logs, in order to further troubleshoot this.
Thank you for all your assistance.
 
OK, I have added a new out of state contact into Bitrix. Our default country is US. When I search in Bitrix for that new contact with just their 10digit number it is able to find them, if I put a 1 on their number it does not. How do I remove the +1 from the 3CX CID without messing up anything else in the header.
I thought I tried this already but I may have had it incorrect, here was my attempt:
Source Pattern: +(1)(.*) Replace Pattern: \2

If removing the +1 from number does not work, then I will turn on Verbose Logs, in order to further troubleshoot this.
Thank you for all your assistance.
Check this guide:
https://www.3cx.com/docs/cid-reformatting/

So you should use:
Source Pattern: +1(.*)
Replace Pattern: \1
 
Thank you for your reply,
I had reviewed that guide, that's where I got the Patterns I was using, I do see where I messed it up. However, when I used your Patterns - now nothing happens at all.
 
Checking this again, the original pattern you were using should work:
Source Pattern: +(1)(.*) Replace Pattern: \2

You should enable verbose logs, make a test call and then check the 3cxSystemService.log file to see how the number is being sent to the CRM.
 
So now when I change the patterns back to my original. It is doing the same as the one you suggested - nothing. I don't know where the 3cxSystemService.log is for me to look. BTW - this is a hosted solution and as you can tell by my join date my 3CX usage in not extensive...yet...
In the call log the +1 was no longer there but that is by no means as definitive as the log file your suggested to look in. When I do find the log file, in order to tell what is sent to Bitrix, what am I looking for in it?
 
You can find the log in the 3CX Console > Dashboard > Activity Log > Logs button > Instance folder.

In this log you will see the actual REST API invocation from 3CX to Bitrix, and their response. So you will see if Bitrix is returning data or not.
 
I checked the log and the only entry for REST API goes all the way back to the 6th - referring to Office365 Directory with the email accounts that I don't have it requesting data for. there is NO reference to Bitrix CRM - even though it will create a new user pop when the +1 is added to the CID, when the +1 is removed from the CID there still is nothing happening.
 
Can you send me this log file in a private message so I take a look?
 
Thanks for sending the logs. I can see that the number is reaching 3CX with the +1 prefix:
2021/02/11 10:45:11.648|7879|0070|Info|CRM: making request to CRM. Number=+1260226XXXX

And then, during contact lookup the + sign is converted to a 00 prefix:
2021/02/11 10:45:11.648|7879|0070|Verb|Performing GET request 'https://XXXXXX.bitrix24.com/rest/8/kceoXXXXXXXXpu3a//crm.company.list.json?filter[PHONE]=001260226XXXX&select[]=*&select[]=PHONE&select[]=EMAIL'.

Bitrix always returns an empty response, and that's why 3CX ends up creating new contacts every time.

A few things you can try:
1) Configure phone numbers in Bitrix starting with 00.
2) Configure 3CX Console > Advanced > Contacts > Options > Match 10 digits. This way the 10 digits of the right will be sent to Bitrix.
 
thank you for that info. VERY helpful. I have been able to get it to work if I add a 001 to numbers in CRM, changing 3CX to match 10 digits did not. I have tried to get 3CX to remove just the '+' but without success.
If I change the numbers in Bitrix to 13 digits - it works.
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,832
Messages
589,278
Members
164,662
Latest member
DejanMDS