SuiteCRM Integration: Has anybody done?

Status
Not open for further replies.

oguruma1218

Forum User
Joined
May 3, 2019
Messages
89
Reaction score
9
SuiteCRM has a RESTful API using OAuth2. From what I gather, there is no reason why it wouldn't work.

I've tried experimenting with the Template Generator, and I've given up.

I've spent hours basically plugging in every permutation of fields to map them correctly.

Has anybody ever dug up documentation on how to do this for SuiteCRM?

Does 3CX ever plan on adding support for it out of the box (without having to build the template yourself)? I believe it to be a pretty major player in the CRM space, so I am surprised it's not yet alreayd supported....
 
When you use the Test button, contacts are not added to 3CX. These are only added with real calls. Have you tried with real calls from external numbers?

Yes. No difference with real numbers.
 
Yes. No difference with real numbers.
You need to enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings, make a test call and check the 3cxSystemService.log, to understand what's going on.
 
I see nothing at all (even with verbose logging) that would indicate that the PBX is trying to reach out the CRM at all. What would a successfull/unsuccessful log entry look like?
 
Don't you see the contact lookup URL of your template?

Are you making calls from external numbers to test this? Please note that calls between extensions don't trigger the CRM engine.
 
Don't you see the contact lookup URL of your template?

Are you making calls from external numbers to test this? Please note that calls between extensions don't trigger the CRM engine.

I don't see the url, no.

Yes, calls to external numbers, including numbers that are in the CRM and those that aren't.
 
Can you send me the 3cxSystemService.log in a private message after making a test call, so I take a look?
 
From the logs you sent (removing sensitive detaisl):
2021/03/03 17:52:31.572|891|0062|Verb|Performing POST request to 'https://XXXXXXXXXXXX/Api/access_token' with following form values:

And then after exactly 100 seconds:
2021/03/03 17:54:11.577|891|0062|Erro|Exception during number processing: System.Threading.Tasks.TaskCanceledException: The operation was canceled.
---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
---> System.Net.Sockets.SocketException (125): Operation canceled
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStream.<FillBufferAsync>g__InternalFillBufferAsync|215_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStream.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.FillAsync()
at System.Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync(Boolean foldedHeadersAllowed)
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at CrmIntegration.ScenarioProcessorBase.ProcessRequest(ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.ScenarioAuthHttpClientProvider.PerformScenarioIfNeeded(CancellationToken token)
at CrmIntegration.ScenarioAuthHttpClientProvider.Create(CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, Boolean isInboundCall, String destinationEmail, Boolean createIfNotFound, CancellationToken token)


Looks like you're not able to connect to the CRM.
 
Hmmmm... Any idea what's going wrong? It works from the Template Generator with the same Client ID and Secret.
 
Maybe a firewall issue blocking the connection from the 3CX server.

If your CRM server in on-premise on the LAN and the 3CX server is on the cloud, you will not be able to connect...
 
The PBX and CRM are in the same DMZ. 10.1.1.30/24 and 10.1.1.14/24 respectively. The PBX can ping the CRM by both url and IP address.
 
As you know ping uses ICMP, no TCP or UDP. So the firewall might allow ICMP (ping) but not TCP connections on port 443 (HTTPS requests). You should check the firewall. Or check if you can access a CRM HTTPS endpoint from your 3CX server.
 
Alright, I got a new LE cert for the SuiteCRM and the test passes now, and lookups appear to be successful. I have no idea why that fixed it....

This is probably a stupid question, but how are variances in number format handled. For example, what happens if a number is entered into the CRM with a 10-digit format, but calls coming in appear as a E.164 format.
 
3CX will send the number as it arrives, without dashes or special characters, only numbers, eventually the + prefix.

The Number element lets you define how to format this a bit, by replacing the + to 00 for example. This is something that you can configure in your template.

Apart from that, your CRM needs to do the lookup, and it's up the the CRM return the appropriate contact records.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,990
Messages
590,161
Members
164,925
Latest member
batarong