How to manage asterisk with php & mysql

i have web site developed with php and mysql, i manage my customers and products in the backend website and i want to integrate my asterisk pbx with the website admin backend because customers call us for product informations and prices ask

1- i want to receive incoming calls in backend with answer, ignore, redirect to another agent and also hold on functions buttons need

2- i want to make call reports page with the agent, phone number and date filtet

3- i want to listen the call records in backend

4- when call answered i want to save the call details to customer details page

do you know or have any php classes to manage asterisk? it can be done by asterisk agi or i muat use vicidial api to manage asterisk?

1 Like

thank you for your answer, which is better and more high speed communication? asterisk ami or asterisk agi ?

They serve different purposes.

1 Like

This can be done using AMI and Originate action to a SIP peer, also more complex using webrtc

Using PHP and MYSQL and AGI can be done, it is probably you will need to write your own CDR for this

After record the call with Mixmonitor, you can play it on the browser using HTML <audio> Tag

Again using PHP MYSQL and AGI can be done

Given you need AMI for other things, Iā€™d suggest AMI is a more appropriate option for number 4.

thank you for answers, and is there any opensource php class or ready script to manage asterisk functions by agi or ami? i checked vicidial, goautodial but is there any more smilar ?

Google says yes with obvious search terms, although both are, I think, fairly shallow, just exposing the API as method.

Vicidial and Goautodial are a totally diffrent products, what you need require custom coding , you can try phpagi class but honestly it works great for AGI, related to AMI it is easier to write your own codes with no classes

can i use asterisk agi for all functions like, make a call, receive call, ignore call or transfer call to other agents, call real time details and also past call logs and reports ? all this functions can be done by agi or i need to use ami also ?

Only for first party control operations, and the AGI will lose control if you try to direct the call to some other part of the dialplan.