Hi everybody, I'm trying to develop a web application for controlling if SIP users are registered in * or not, and show it in a web. My problem is that I don't now if it's possible to do a Shell Script to control this: 1. Connect to console. 2. Execute command. 3. Obtain users registered. 4. Update a BdD. This is possible? There are any best way to implement this? Thanks a lot.
Hi, XISCOAIR wrote:> Hi everybody, > > I'm trying to develop a web application for controlling if SIP users > are registered in * or not, and show it in a web. > > My problem is that I don't now if it's possible to do a Shell Script to > control this: > 1. Connect to console. > 2. Execute command. > 3. Obtain users registered. > 4. Update a BdD. > > This is possible? There are any best way to implement this? > > Thanks a lot.It can be done, in fact it's already done. Look here: http://www.voip-info.org/tiki-index.php?page=Asterisk%20GUI Monastery does exactly what you describe and a bit more. -- Nicolas Gudino House Internet S.R.L. Buenos Aires - Argentina
Olle E. Johansson
2004-Jun-02 06:30 UTC
[Asterisk-Users] Controlling SIP mobile extensions.
XISCOAIR wrote:> Hi everybody, > > I'm trying to develop a web application for controlling if SIP users > are registered in * or not, and show it in a web. > > My problem is that I don't now if it's possible to do a Shell Script to > control this: > 1. Connect to console. > 2. Execute command. > 3. Obtain users registered. > 4. Update a BdD. > > This is possible? There are any best way to implement this?The registration is stored in the Asterisk database. It's a db1 database you can read from a perl script directly, without using the manager API. /O
Philipp von Klitzing
2004-Jun-02 07:14 UTC
[Asterisk-Users] Controlling SIP mobile extensions.
Hi!> This is possible? There are any best way to implement this?Yes, look at "asterisk -rx <command>" That command then can be "sip show peers" or "database show sip". Here is an example of a related CRON job that I use for restart: # Restart Asterisk PBX once a day to prevent any problems from piling up 10 7 * * * root /usr/sbin/asterisk -rx "restart now" >/dev/null 2>&1 Cheers, Philipp