[asterisk-users] Asterisk AMI - PHP or Node.js?
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. 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
Re: [asterisk-users] Asterisk AMI - PHP or Node.js?
On Sat, Dec 28, 2013 at 11:32 AM, Shahid H shah...@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
Re: [asterisk-users] Asterisk AMI - PHP or Node.js?
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.jenkin...@gmail.comwrote: On Sat, Dec 28, 2013 at 11:32 AM, Shahid H shah...@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 -- _ -- 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
Re: [asterisk-users] Asterisk AMI - PHP or Node.js?
On 12/28/2013 7:04 AM, Shahid H wrote: 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? My code will probably end up on Thedailywtf.com for it, but I have a PHP-based system that uses PAMI to talk to the AMI interface. There's a daemon process that listens for commands via a FIFO buffer. Several other processes web scripts just send commands to the controller process via that FIFO. Seems to work well for me. -- _ -- 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