I want to create an application in php which get the details of live calls from the freepbx server and show the geo location of the connected call on google map.
Is that possible and if yes how can I do that using ami.
You’ll need access to a geocoding database that includes phone numbers for Land Lines. For cell calls, you’ll need access to the companies’ proprietary databases and APIs, assuming the phone allows location pinpointing. If the phone’s location is not turned on, you’ll end up having to look up the phone’s city from the geocoding database.
Most of this information is available at $0.05 per lookup from several sources.
Guys can you please guide me how do I write the code for it means how to interact with the asterisk from outside like php-agi, pami, or asmanager etc
but I am having trouble to connect from the outer world and is there any documentation where I can know about the dialplan of freepbx that how it’s working and how my code will interact with it.
it’s for that in case I will not be messing with the Freepbx with my code and mess the complete dialplan and flow of the freepbx.
So, now you want us to help you write the application too?
PHP-AGI is probably a good choice, that will require you to use a PHP script on the server, which then will have to access the geocoding databases through the Internet.
Almost all of the program you are writing is outside the scope of Asterisk - the only thing that will happen on the Asterisk/FreePBX side is the instantiation of the PHP program. After that, you’re on your own as far as how you want the pop-up to work.
Any of the methods you described will work. I’d start from the programming language of choice and go with the “API” that is most appropriate. I’m a PHP guy so the PHP-AGI makes sense to me, but once you get into it, you’ll see they all provide (more or less) the same level of control. Almost all of them let you interface through the AMI interface, which can give you all the active call information you could want.
Sure - it’s almost the same as all the rest. If you’re comfortable with PAMI, then swing away. Language choice is the least challenging problem you will have to solve.