# Anyone here use nodejs with asterisk?

**URL:** <https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691>\
**Category:** Asterisk APIs\
**Created:** [May 19, 2018, 2:43am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691 "2018-05-19T02:43:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoluck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/anoluck/32/2354_2.png) [@anoluck](https://community.asterisk.org/u/anoluck)\
**Post date:** [May 19, 2018, 2:43am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/1 "2018-05-19T02:43:04Z")

</div>

Centos 7  
Asterisk 13  
Im asking because I need someone opinion regarding AMI API  
Im programming nodejs to make calls out via AMI.  
I have thousands of numbers I call; Do you recommend I place all phone numbers in an memory/array or  
query each number via database query before I call AMI?  
Which would be better and why?

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [May 19, 2018, 3:07am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/2 "2018-05-19T03:07:11Z")

</div>

Any particular reason to use node.js instead of PHP ?

---

<div class="post-metadata">

**Author:** ![anoluck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/anoluck/32/2354_2.png) [@anoluck](https://community.asterisk.org/u/anoluck)\
**Post date:** [May 19, 2018, 3:29am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/3 "2018-05-19T03:29:52Z")

</div>

I feel like I can manipulate more with nodejs in realtime, such as makes calls to linux CLI and asterisk CLI realtime plus I love socket io. I can send notification to users browsers realtime instead of long polling with PHP.

basically nodejs realtime feature \> php; not sure if I been out of php loop as I use to be mainly php developer but push notification to browsers in php is lacking, it can be done but with constant client request to server (long polling) please correct me if im wrong, havnt been keeping up with php for few years now

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [May 19, 2018, 3:33am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/4 "2018-05-19T03:33:36Z")

</div>

I have used node.js but just at basic level to originate calls using AMI, but I didn’t continue, I prefer PHP or Python, but anyway if you feel comfortable using node.js keep going

---

<div class="post-metadata">

**Author:** ![anoluck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/anoluck/32/2354_2.png) [@anoluck](https://community.asterisk.org/u/anoluck)\
**Post date:** [May 19, 2018, 3:36am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/5 "2018-05-19T03:36:35Z")

</div>

tbh I want to make a custom softphone website via nodejs so when agent receive calls, any if not all info regarding the client pops up realtime in the browser plus they dont need hardphone or standalone software instead everything is in the browsers. Only thing they need is a headset.

---

<div class="post-metadata">

**Author:** ![anoluck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/anoluck/32/2354_2.png) [@anoluck](https://community.asterisk.org/u/anoluck)\
**Post date:** [May 19, 2018, 3:37am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/6 "2018-05-19T03:37:40Z")

</div>

lmk if you need something for nodejs, im pretty effient with the code but i wouldnt call myself an expert, since you’ve been helping me alot with asterisk

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [May 19, 2018, 3:40am UTC](https://community.asterisk.org/t/anyone-here-use-nodejs-with-asterisk/74691/7 "2018-05-19T03:40:02Z")

</div>

I will take look later to node.js I prefer at the moment imporve my PHP skills because it is perfect for the things I do with Asterisk and also python as Im working with Raspberry PI GPIO library and Asterisk. Anyway thanks
