That's it :D<div><br></div><div>Now with a simple shell script I can check the extension status an integrate with nagios to send the notifications. </div><div><br></div><div>Thank you for your help.</div><div><br></div>
<div>Have a nice day. <br><br><div class="gmail_quote">2013/1/8 Leandro Dardini <span dir="ltr"><<a href="mailto:ldardini@gmail.com" target="_blank">ldardini@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Top and bottom post in the same email... don't open again the thread :-)<div><br></div><div>#!/bin/bash</div><div>res=`sudo /usr/sbin/asterisk -rx 'sip show peer $1' | grep Status | cut -d\: -f 2 | cut -d\ -f 2` </div>
<div>if [ "$res" == "OK" ]</div><div>then</div><div>echo "OK is registered"</div><div>exit 0</div><div>else</div><div>echo "WARNING peer not registered"</div><div>exit 1</div><div>
<div><div><br>
<br><div class="gmail_quote">2013/1/8 Luis H. Forchesatto <span dir="ltr"><<a href="mailto:luisforchesatto@gmail.com" target="_blank">luisforchesatto@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hmmm....looks good, but I'm looking for something that I could do.<div><br></div><div>I'm not much of outsorcing. <br>
<br><div class="gmail_quote">2013/1/8 Leandro Dardini <span dir="ltr"><<a href="mailto:ldardini@gmail.com" target="_blank">ldardini@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br><br><div class="gmail_quote">2013/1/8 Luis H. Forchesatto <span dir="ltr"><<a href="mailto:luisforchesatto@gmail.com" target="_blank">luisforchesatto@gmail.com</a>></span><div>
<div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings.<div><br></div><div>I got two extensions on my asterisk that autenticates from outside our network, via internet. Is there a way to monitor, in certain time periods, if they are available (online) and send some sort of notification if they don't?</div>
<div><br></div><div>There are two extensions to monitor, they belong to the same queue. Both must be available to receive calls at the same time and if one or both are offline I must be notified. They stand behind NAT so making Nagios monitor will either report wrong extension status (monitoring the NATing server/router) or simply useless (unless there's a plugin to monitor asterisk extensions). </div>
<div><br></div><div>But anyway...I'll be open to opinions. </div><div><br></div><div>My environment:</div><div><br></div><div>- Asterisk 1.6.2.13</div><div>- Server running Elastix 2.0.0</div><div>- DAHDI v. 2.3.0.1<span><font color="#888888"><br clear="all">
<div><br></div></font></span></div></blockquote><div><br></div></div></div><div>Doing a nagios probe to check for extension status is a matter of just few lines... I think you can have it done by a developer for less than $30</div>
<span><font color="#888888"><div>
<br></div><div>Leandro</div></font></span></div>
<br></div></div><span><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><div><br><br clear="all"><div>
<br></div>-- <br>Att.<b><br>
</b><b></b><div>Luis H. Forchesatto</div><div>Mail: <a href="mailto:luis_forchesatto@hotmail.com" target="_blank">luis_forchesatto@hotmail.com</a></div>
</div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Att.<b><br>
</b><b></b><div>Luis H. Forchesatto</div><div>Mail: <a href="mailto:luis_forchesatto@hotmail.com" target="_blank">luis_forchesatto@hotmail.com</a></div>
</div>