Asterisk : external Web Application (php) need to get info of incoming call numbers

StackOverflow https://stackoverflow.com/questions/18834806

  •  28-06-2022
  •  | 
  •  

Вопрос

We are running small service business and for customers we set up small call center ( to attend customers calls ) using Asterisk server & ( x-lite app) and that is working very well.

And Now we want ot offer our our customer managers ( who receive calls) option of extracting our product information from our backend PHP Web application ( local server in different machine where asterisk server is running . We developed one web app and from there they get all the information of our products .

according to our policy we send that information to the called customer through SMS , now we are using our local wep php app to send information as SMS by CoPyING / TYPING the Mobile no of the incoming calls from x-lite (dialer) number display to my web application input form.

Now , I want to know is there any asterisk-api available to use in php web application to get the information of calling number ( while , call is still alive ) and then we can use that phone number to get more information about that caller which are stored in our separte database ??? I header about AGI and AMI but i am not sure what exactly i need in this case

Это было полезно?

Решение

There's a number of ways you could approach this.

If you're looking for rich interaction of the call as it's routed, and as the call interacts with the dialplan -- you'll want AGI to alter it's routing and make intelligent decisions about where the call goes, and to store and retrieve more granular and customized information about the call.

But, if you're just looking for information on a call that's in progress, without changing the dialplan -- you might want to approach it from AMI, just to get a list of calls in progress. This is what I would recommend for this task from how you described it.

AMI is something you use over a TCP socket, and is rather straight forward. You can always find an example API, however, for what you need -- directly accessing AMI might be the best choice. It's a simple protocol and the official documentation is from the canonical source @ The Asterisk Wiki

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top