CRM integration with pure PHP

Hello everyone, I have Asterisk 16 with Freepbx, and I have 4 CRM system 1 of them created by pure PHP and 3 on Zoho CRM, now I need to know how can I upload outgoing call activities to our CRM, I just need to a lead because I am new with Asterisk and I am PHP developer, I read a lot in the internet but it’s really hard to find the best solution for my case should I use ARI , AMI or AGI, and why.
and when should I fire the POST API, I am familiar with API, but I don’t know where should I write my code to make a post request and get all parameters “outgoing number, Extention, duration, time, and call recording link” after the call finished.

I guess the simplest, and probably not the worst, method is to get a copy of Master.csv, perhaps with rsync. Then you can mess with the file as much as you want and it would never hurt Asterisk.

Otherwise ARI and AMI are you friends, but Asterisk does not speak PHP.

Hello, there are many alternatives for this integration, you can schedule in crontab the php script to look up calls in the asteriskcdrdb.cdr table.
Or you connect to AMI and monitor the hangup event for the information.
Basically the information you need is in the asteriskcdrdb.cdr table.

1 Like

Hi thanks for your supports, I think the best solution for me is to use AGI , and use [macro-hangupcall]
to send call parameters after hangup, I am now test it out and I will update here if it’s worked…

??? If you use any of the other methods, you don’t need to do anything, except reading the data…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.