Hi, I need a hack to query current calls coming in and going out an Asterisk 1.6.1 system and send this list back as a custom UserEvent to other listening endpoints. For various reasons, I might need to write this hack in PHP though I'm more experienced with Asterisk Java. What is your opinion regarding PHP AMI API and Asterisk 1.6.1 ? I'm referring here to http://code.google.com/p/asterisk-php-api/. Hopefully, I would like to avoid parsing replies to "Action: Status" requests. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090518/ccdc54e5/attachment.htm
Olivier wrote:> I need a hack to query current calls coming in and going out an Asterisk > 1.6.1 system and send this list back as a custom UserEvent to other > listening endpoints. > For various reasons, I might need to write this hack in PHP though I'm > more experienced with Asterisk Java.Would it help if you could use Asterisk-Java's implementation of the Manager API for your script? Similar to what we already did for FastAGI at http://blogs.reucon.com/asterisk-java/2009/05/13/scripting_support_for_fastagi.html If you could use that approach let me know and I'll see if we can extend scripting support to cover the Manager API and AJ's live package. =Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090518/cdb33362/attachment.pgp
Olivier <oza-4h07 at myamail.com> writes: [...]> What is your opinion regarding PHP AMI API and Asterisk 1.6.1 ? > I'm referring here to http://code.google.com/p/asterisk-php-api/.In my experience, asterisk-php-api works OK, but it's a bit slow. It determines when Asterisk has finished sending its responses by waiting until it doesn't send anything for a few seconds, which means you wait those few seconds fairly often. It also doesn't do much to filter out AMI messages that are unrelated to your query. We modified it slightly to avoid the pause, and we filter out the AMI messages we don't care about in our code. But in the end, AMI is a very simple protocol, and you might find it easier to just speak it directly over the socket. Hope this is helpful, ----Scott.