iThirst
iThirst

Reputation: 153

Aterisk/Freeswitch SIP user generation through web application

I am very much new to Asterisk/freeswitch integration to web apps running on PHP,Node.js or any other server side languages.What i would like to achieve is to create a new SIP user in Asterisk/Freeswitch conf files or database files from within a web application. How can i modify/write the config files or SIP database on these Asterisk/Freeswitch PBX software hosted in the same server ?

Upvotes: 1

Views: 1120

Answers (2)

asdf
asdf

Reputation: 698

You can achieve your purpose in multiple way. Maybe the simplest and the direct is to add in sip.conf (asterisk) a few lines that describe the new user, like described in here. Then you just need to restart asterisk (or better to call a reload config through Asterisk cli. Here is a maybe useful link: Asterisk php cli. For freeswitch is the same, but you have to enter the new user in xml format, as specified in this page. Maybe if you use asterisk or freeswitch over a db it will be even simpler: just add a line in the db!

Be sure to verify user input to create only valid user (block xml tags, hashes, ; and other dangerous symbol)

Upvotes: 2

arheops
arheops

Reputation: 15259

Asterisk and freeswitch is compleatly different.

For asterisk you can use Asterisk Realtime Architecture(ARI), it just describe tables in database.

http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip

Unfortanly you can't "just add users", you need understand voip basic.

Also you can write text config files, for example of how to do that see Freepbx.org project.

Upvotes: 1

Related Questions