Matt Riddell (NZ)
2006-Aug-05 08:26 UTC
[asterisk-users] [Solution] Call Asterisk from GoogleTalk and have it tell you the status of your IAX2 links.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 After following the instructions for getting GoogleTalk to talk with Asterisk using Matt O'Gorman's code and Farruk Ahmed's howTo ( http://www.sineapps.com/news.php?rssid=1407 ) I have been using the Jabber and Jingle additions in the SVN Trunk version of Asterisk and have come up with a cool idea. Basically, you can call your Asterisk server from GoogleTalk, and it can send you the status of a few of your other servers. All you have to do is set up an account in jingle.conf, i.e.: [voipproducts] username=voipproducts@gmail.com disallow=all allow=ulaw context=checkStatus connection=asterisk Where voipproducts@gmail.com is my googleTalk address (the one I will be calling from). Then set up a few simple accounts in iax.conf, i.e.: [fv2fv1] type=friend host=freevoip.gedameurope.com secret=mysecret qualify=yes where freevoip.gedameurope.com is the host I want to monitor. Then add a bit of extensions.conf: [checkStatus] exten => s,1,NoOp(Incoming Call from VoIPProducts@gmail.com) exten => s,2,JABBERSend(asterisk,voipproducts@gmail.com,freevoip.gedameurope.com status is ${IAXPEER(fv2fv1:status)}) Then reload. Assuming you have set up Asterisk to appear as a google talk contact, all you then have to do is call Asterisk (in my case using my VoIPProducts@gmail.com address), it will send the call to checkStatus and then reply with the IAX2 ping time in a message! Cool yeah? Oh yeah, and you could add as many of the s,2 lines as you like, i.e. s,3 might tell you the status of another server (I currently have it giving me a report on 10 servers, just by using GoogleTalk). :) - -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE1Li/S6d5vy0jeVcRAkLxAKCGUhkZxwlTg56GswxOGXGQ3hdNPgCfYcf4 pdtc7b2C1fgE2uwf2k+imi8=A3g2 -----END PGP SIGNATURE-----