Reputation: 7922
I was wondering if it would be possible to defer the sip accounts normally listed in Asterisk's sip.conf to a sort-of 'AGI' in node.js much the same way you can do for call routing in extensions.conf. The idea is to make use of a Redis data-store and allow some scripting in javascript whenever someone registers or disconnects -- instead of using something like autocreatepeer or a file generated from a MySQL database.
Upvotes: 0
Views: 1199
Reputation: 15259
Yes, you can.
You have 2 options.
1) setup odbc interface to Redis and use asterisk realtime
http://www.voip-info.org/wiki/view/Asterisk+RealTime
2) create fastagi interface using node.js(http://www.voip-info.org/wiki/view/Asterisk+FastAGI) or do include external script as part of config file
---------extensions.conf-------
# here is script which send to STDOUT extensions.conf file
#exec "somescript.sh"
Correct way is first.
Actualy for you task effective way is create some fastagi script which will do curl request to your node-js and ask data(for extensions).
Upvotes: 2