Hi all, does anyone know if there is any app/webui that can show phones that are currently registered to *. I guess this sort of funcionality counld be grabbed from the CLI with iax2 show peers and sip show peers, but having little programming knowledge wouldn't know where to start. I'm asking because we currently have several sip phones onsite and lots of remote iax2 users who would like to see availability without dialing. Bails
> Hi all, does anyone know if there is any app/webui that can show > phones that are currently registered to *. I guess this sort of > funcionality counld be grabbed from the CLI with iax2 show peers and > sip show peers, but having little programming knowledge wouldn't know > where to start. > > I'm asking because we currently have several sip phones onsite and > lots of remote iax2 users who would like to see availability without > dialing. > > BailsBelow is a simple perl script that might do the trick. save it to [something].cgi and most any distribution's apache web server should be able to run it. If the web server isn't running on the same machine as asterisk then it's a little more difficult. An option might be to configure ssh to allow authentication based on known RSA keys (so there's no password prompt). That is actually pretty easy to do, and you can google for instructions on that. Then the script can use ssh to talk to a shell on the asterisk server which will in turn execute asterisk -rx and give you the output. By the way, I haven't actually tested this except on the command line and my html is lousy. So while I'm sure the script will run, I pretty much guarantee the resulting web page to look like crap. #!/usr/bin/perl # ##get lists of registered peers from asterisk $iaxpeers = `/usr/sbin/asterisk -rx \"iax2 show peers\"`; $sippeers = `/usr/sbin/asterisk -rx \"sip show peers\"`; ##replace newline characters with html break<br> $iaxpeers =~ s/\n/<br>/g; $sippeers =~ s/\n/<br>/g; ##output the webpage print <<EOF; <html> <head> <title>Registered devices</title> </head> <body> <p><h2>CURRENT SIP USERS</h2><br> $sipppeers <p><h2>CURRENT IAX USERS</h2><br> $iaxpeers </body> </html> EOF
> Hi all, does anyone know if there is any app/webui that can show > phones that are currently registered to *. I guess this sort of > funcionality counld be grabbed from the CLI with iax2 show peers and > sip show peers, but having little programming knowledge wouldn't know > where to start. > > I'm asking because we currently have several sip phones onsite and > lots of remote iax2 users who would like to see availability without > dialing. > > BailsP.S.: show peers will show you the devices that are registered. If you're interested in how many active calls there are I think you want iax2 show channels and sip show channels.
> Hi all, does anyone know if there is any app/webui that can show phones > that are currently registered to *. I guess this sort of funcionality > counld be grabbed from the CLI with iax2 show peers and sip show peers, > but having little programming knowledge wouldn't know where to start. > > I'm asking because we currently have several sip phones onsite and lots > of remote iax2 users who would like to see availability without dialing.<plug>You can try with the Flash Operator Panel</plug> http://www.asternic.org , it does all sort of things including sip and iax availability (you have to enable qualify for them). Regards, -- Nicol?s Gudi?o Buenos Aires - Argentina