3cx integration with php based application

Status
Not open for further replies.

AhmedStephan

Forum User
Joined
Oct 25, 2019
Messages
5
Reaction score
0
Hi,
I have to integrate php/mysql based application with 3cx.

Following are my requirements:
  1. Calls (Inbound/Outbound/Missed/Answered) should be saved to web application.
  2. Recordings url should be available in the web application against every call so anytime user can access, we cannot save it to our internal storage so a url should be available to access recording anytime
Please let me know what is the simplest and easy way to do this job?
 
Calls (Inbound/Outbound/Missed/Answered) should be saved to web application.
If you use the integration with MySQL databases, you can use the Call Journaling feature to automatically log calls to your database. However, please note that the lookup statement needs to return a valid contact, otherwise calls will not be logged, because calls are logged against contacts.

Other possible approach is parsing the CDRs generated by 3CX, and import them into your database using some job.

Recordings url should be available in the web application against every call so anytime user can access, we cannot save it to our internal storage so a url should be available to access recording anytime
Call recording links are not available through any API. You would need to check the folder in the 3CX containing these recordings, and manually create the links in your database.
 
Thanks for the reply.
1- can you please share some more technical details, what should be response from the CRM which will return the contact for look up ?

2- any example how to generate recording links? We don't want to store at our CRM and wanted to access via url.

With respect to your both replies it seems that we should have to access the 3cx server? Correct? Because as per my knowledge we can't access server via ssh. Please confirm and share some more technical details.

Unfortunately there is no examples and more specific explanation on the documentation.
 
Please note that we do not want to match with contacts, our requirement is as follows:

Fetch all calls and recording links with following information:
  1. From number
  2. To number
  3. Caller id / Caller name
  4. Direction of call = Inbound or outbound
  5. Status of call = Answered or Missed
  6. Extension
We do not want to match with contact as mentioned above, we just simply wants to sync calls with this information in any case.

I have also seen that people are suggestion to use CDR and a import job to parse csv files.
But can you please share step by step guide for it?

Do i need 3cx server access?
Where to create a job?
A cron job has to be created?
What are the next steps?

Please share some technical points with step by step guide as we are new to this system.

Thanks.
 
1- can you please share some more technical details, what should be response from the CRM which will return the contact for look up ?
Check this:
https://www.3cx.com/docs/sql-database-pbx-integration/#h.4xf3snf20461

There we explain how you should configure the Lookup SQL Statement to return the contact details to 3CX.

2- any example how to generate recording links? We don't want to store at our CRM and wanted to access via url.
Recordings are stored in the 3CX server. The links are only available through the Call Logs Reports. However, something you can do is what a user describes in the forum, creating a web page to retrieve the WAV files from the 3CX server.

With respect to your both replies it seems that we should have to access the 3cx server? Correct? Because as per my knowledge we can't access server via ssh. Please confirm and share some more technical details.
This depends on your installation. If you host 3CX on your own server, you can access it.

Please note that we do not want to match with contacts, our requirement is as follows:

Fetch all calls and recording links with following information:
  1. From number
  2. To number
  3. Caller id / Caller name
  4. Direction of call = Inbound or outbound
  5. Status of call = Answered or Missed
  6. Extension
We do not want to match with contact as mentioned above, we just simply wants to sync calls with this information in any case.
In that case, it's probably preferrable to read the information from the CDRs generated by 3CX. However, please note that the call recording link is not available there.

I have also seen that people are suggestion to use CDR and a import job to parse csv files.
But can you please share step by step guide for it?
3CX generates a CSV file in the 3CX server. Then you need to check your database server documentation to check how to create a job and import that in your database. That's not something that we can help with. You should ask this question in a database forum.

Do i need 3cx server access?
You can configure CDRs to be generated locally as CSV files, or to send them via TCP socket to another server. In the first case, you need to have server access, because you need to read files from the server. In the second case, you need to create a TCP server to receive the information from a different machine, which will save it locally, and you connect to this server from 3CX via TCP socket. You need to be a programmer to do this job...

Where to create a job?
A cron job has to be created?
What are the next steps?
As I mentioned, this is somethig to check with your database documentation / support / forums...
 
Other than CDR,
is any option to create call in crm Without contact creation?
 
ok thanks. it really helps.

So i am thinking to use Mysql integration or template generation wizard.

As you mentioned that If contact is not found, call will not go into CRM. so if i enable contact creation then will call go to CRM?

And can we get extension as well with a call?
 
Last edited:
As you mentioned that If contact is not found, call will not go into CRM. so if i enable contact creation then will call go to CRM?
If you enable contact creation, a new contact will be added to your CRM / database when the lookup doesn't find a match. The contact creation then needs to return the details of the created contact. If you don't return this information, then call journaling is skipped. Call Jornaling needs a matched contact.

And can we get extension as well with a call?
Sorry, I don't understand what you mean here, can you please elaborate?
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,475
Latest member
lastshadow