Ami & php

Hello everyone,

How can I in php script get informations from AMI for the current call? For examle callerid, dnid, extensions…etc.
I configure manager. conf and include all stuffs that I need, but I cannot find command or functions just to get informations about the current call…

HelP:)

thanks, Anya

AMI gives third party control so has no concept of current call.

The get variable operation will also retrieve the value of functions.

Yes, I read about get variable but I dont know how I use it…is there some array from which I can get it?

Thank you for reply, I’m new with this and little confused

Here is explanation voip-info.org/wiki/view/Aste … ion+GetVar
but how I use GetVar in php to get callerid,dnid or extension from AMI?

You can use the phpagi library, here is an example to retrieve the data from given extension:

phpagi.sourceforge.net/phpagi2/d … 77011.html

In thix example I must send a command using AMI…but I need in real time, to connect with channel and to get infomration about it…then I can parse them and use them. How can I get all informations about channel?

Yes you can adapt the example to do it “in live” is just a way to start, you can use core show channels to retrive the info