[asterisk-users] Asterisk AMI - PHP or Node.js?

Shahid H shahidh at gmail.com
Sat Dec 28 06:04:47 CST 2013


Thanks Daniel, that was useful, I will check those links :)

I am pretty good with PHP and jQuery. So I guess learning Node.js shouldn't
be too difficult.

If I decided to use Node.js - what is the best way to communicate with a
browser to AMI process? Send a XML or HTTP command from a browser to AMI
process .. or whatever I execute on the browser - it save the commands to
the database.. a process will listen the commands from a database.

Other options are http requests and do the ipc... or maybe WebSocket?


On Sat, Dec 28, 2013 at 11:41 AM, Daniel Jenkins <dan.jenkins88 at gmail.com>wrote:

>
> On Sat, Dec 28, 2013 at 11:32 AM, Shahid H <shahidh at gmail.com> wrote:
>
> Hi,
>
>
>> I would like to develop a Call Center Dialer (outbound and inbound calls)
>> and it would use AMI method to communicate with Asterisk Server.
>>
>> A daemon would need to run in the background, would you recommend coding
>> in PHP or Node.js? which would be much faster and stable.
>>
>
>
> I've done something very similar, and I've done it with Node.js - it's a
> great fit for it; whereas you're kinda forcing PHP to do something it
> wasn't 100% designed for; in my experience Node is a much better fit for it.
>
> I've spoken at Astricon about doing it and it's fairly easy with modules
> that already exist in the Node.js ecosystem.
>
> The talk I did in 2012 is probably the most relevant:
> http://www.youtube.com/watch?v=FCwzbgR_adQ
>
> The slides can be found here:
> http://www.slideshare.net/danjenkins/asterisk-html5-and-nodejs-a-world-of-endless-possibilities-14881614
>
> And my module for talking to asterisk via the AMI is available on npm
> https://npmjs.org/package/asterisk-ami
>
> On the question of stability/speed, I don't know to be honest but I would
> guess that Node would be faster due to it's async nature; but whether you
> would really see much of that speed gain due to async is entirely dependant
> on your application and how it runs, what it talks to, are any of these
> things potentially blocking.
>
> Node.js is nearing V1 but to be honest, it's the most stable it's ever
> been, with HUGE companies using it in production environments. The system
> that I wrote is still running on Node v 0.6 and has been up and running
> with near 0 downtime for over a year, and the reasons for downtime are
> external, such as server moves, DNS changes etc.
>
>
>>
>> Thanks
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> Let me know if you want to know any more.
>
> Dan
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20131228/0e5086ca/attachment.html>


More information about the asterisk-users mailing list