[asterisk-users] Monitor extensions status.

Luis H. Forchesatto luisforchesatto at gmail.com
Tue Jan 8 09:54:19 CST 2013


That's it :D

Now with a simple shell script I can check the extension status an
integrate with nagios to send the notifications.

Thank you for your help.

Have a nice day.

2013/1/8 Leandro Dardini <ldardini at gmail.com>

> Top and bottom post in the same email... don't open again the thread :-)
>
> #!/bin/bash
> res=`sudo /usr/sbin/asterisk -rx 'sip show peer $1' | grep Status | cut
> -d\: -f 2 | cut -d\  -f 2`
> if [ "$res" == "OK" ]
> then
> echo "OK is registered"
> exit 0
> else
> echo "WARNING peer not registered"
> exit 1
>
>
> 2013/1/8 Luis H. Forchesatto <luisforchesatto at gmail.com>
>
>> Hmmm....looks good, but I'm looking for something that I could do.
>>
>> I'm not much of outsorcing.
>>
>> 2013/1/8 Leandro Dardini <ldardini at gmail.com>
>>
>>>
>>>
>>> 2013/1/8 Luis H. Forchesatto <luisforchesatto at gmail.com>
>>>
>>> Greetings.
>>>>
>>>> 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?
>>>>
>>>> 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).
>>>>
>>>> But anyway...I'll be open to opinions.
>>>>
>>>> My environment:
>>>>
>>>> - Asterisk 1.6.2.13
>>>> - Server running Elastix 2.0.0
>>>> - DAHDI v. 2.3.0.1
>>>>
>>>>
>>> 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
>>>
>>> Leandro
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>                http://www.asterisk.org/hello
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>
>>
>>
>> --
>> Att.*
>> ***
>> Luis H. Forchesatto
>> Mail: luis_forchesatto at hotmail.com
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Att.*
***
Luis H. Forchesatto
Mail: luis_forchesatto at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130108/c76c94bd/attachment-0001.htm>


More information about the asterisk-users mailing list