Quantcast

Monitoring Mediaproxy

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Monitoring Mediaproxy

Daniel Zanutti
Hi

What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

Thanks

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Johan De Clercq
Send options.

On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
Hi

What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

Thanks

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Daniel Zanutti
How can this be done?

Or do you mean SIP options?

On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
Send options.

On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
Hi

What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

Thanks

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

robert

SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly.  Hopefully mediaproxy will not respond to the “SIP ping” if frozen.

 

Robert

 

From: Users [mailto:[hidden email]] On Behalf Of Daniel Zanutti
Sent: Wednesday, March 15, 2017 4:55 PM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy

 

How can this be done?

 

Or do you mean SIP options?

 

On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:

Send options.

 

On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:

Hi

 

What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

 

Thanks

 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 



This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Dan Pascu
In reply to this post by Daniel Zanutti

On 15 Mar 2017, at 22:18, Daniel Zanutti wrote:

> Hi
>
> What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

You can connect to the dispatcher on the control port and issue a statistics command that will fetch statistics from all the connected relays. The sample media sessions web application included with mediaproxy does that to show the active sessions. You can use that or use it as an example of how to do it from a monitoring script.

--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Dan Pascu
In reply to this post by robert
Lol, what?!?

On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote:

> SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly.  Hopefully mediaproxy will not respond to the “SIP ping” if frozen.
>  
> Robert
>  
> From: Users [mailto:[hidden email]] On Behalf Of Daniel Zanutti
> Sent: Wednesday, March 15, 2017 4:55 PM
> To: OpenSIPS users mailling list <[hidden email]>
> Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy
>  
> How can this be done?
>  
> Or do you mean SIP options?
>  
> On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
> Send options.
>  
> On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
> Hi
>  
> What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?
>  
> Thanks
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  
>
> This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Alex Balashov
If MediaProxy is a SIP endpoint, that would be news to me.

-- Alex

--
Principal, Evariste Systems LLC (www.evaristesys.com)

Sent from my Google Nexus.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Daniel Zanutti
In reply to this post by Dan Pascu
Hi Dan

This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way.

Thanks

---

"Lol, what?!?"

I preferred to drop this =)

On Thu, Mar 16, 2017 at 10:41 AM, Dan Pascu <[hidden email]> wrote:
Lol, what?!?

On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote:

> SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly.  Hopefully mediaproxy will not respond to the “SIP ping” if frozen.
>
> Robert
>
> From: Users [mailto:[hidden email]] On Behalf Of Daniel Zanutti
> Sent: Wednesday, March 15, 2017 4:55 PM
> To: OpenSIPS users mailling list <[hidden email]>
> Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy
>
> How can this be done?
>
> Or do you mean SIP options?
>
> On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
> Send options.
>
> On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
> Hi
>
> What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?
>
> Thanks
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

robert
In reply to this post by Dan Pascu
Sorry, I don't know much about telephony.

Curious what I had wrong?

Is it that only media is sent to Mediaproxy without SIP?

Robert


-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Dan Pascu
Sent: Thursday, March 16, 2017 9:41 AM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy

Lol, what?!?

On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote:

> SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly.  Hopefully mediaproxy will not respond to the “SIP ping” if frozen.
>
> Robert
>
> From: Users [mailto:[hidden email]] On Behalf Of Daniel Zanutti
> Sent: Wednesday, March 15, 2017 4:55 PM
> To: OpenSIPS users mailling list <[hidden email]>
> Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy
>
> How can this be done?
>
> Or do you mean SIP options?
>
> On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
> Send options.
>
> On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
> Hi
>
> What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?
>
> Thanks
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

________________________________

This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.

________________________________
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Daniel Zanutti
Hi Robert

Acording to mediaproxy website:

MediaProxy is a media relay for RTP/RTCP and UDP streams that works in tandem with OpenSIPS to provide NAT traversal capability for media streams from SIP user agents located behind NAT. MediaProxy supports ICE negotiation by behaving like a TURN relay candidate and the policy can be controlled from OpenSIPS configuration.

Take a look at its website: http://mediaproxy.ag-projects.com/

Regards

On Thu, Mar 16, 2017 at 11:22 AM, Mundkowsky, Robert <[hidden email]> wrote:
Sorry, I don't know much about telephony.

Curious what I had wrong?

Is it that only media is sent to Mediaproxy without SIP?

Robert


-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Dan Pascu
Sent: Thursday, March 16, 2017 9:41 AM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy

Lol, what?!?

On 15 Mar 2017, at 23:03, Mundkowsky, Robert wrote:

> SIP Options is used as a “SIP ping”. You likely can have an time event trigger route that can send one and then based on that disable/enable accordingly.  Hopefully mediaproxy will not respond to the “SIP ping” if frozen.
>
> Robert
>
> From: Users [mailto:[hidden email]] On Behalf Of Daniel Zanutti
> Sent: Wednesday, March 15, 2017 4:55 PM
> To: OpenSIPS users mailling list <[hidden email]>
> Subject: Re: [OpenSIPS-Users] Monitoring Mediaproxy
>
> How can this be done?
>
> Or do you mean SIP options?
>
> On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
> Send options.
>
> On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
> Hi
>
> What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?
>
> Thanks
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

________________________________

This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.

________________________________
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Johan De Clercq
In reply to this post by Daniel Zanutti
Use sip option messages

On 16 Mar 2017 12:25 AM, "Daniel Zanutti" <[hidden email]> wrote:
How can this be done?

Or do you mean SIP options?

On Wed, Mar 15, 2017 at 5:45 PM, Johan De Clercq <[hidden email]> wrote:
Send options.

On 15 Mar 2017 11:48 PM, "Daniel Zanutti" <[hidden email]> wrote:
Hi

What's the best way to check if a mediaproxy is running fine? Monit is monitoring PID but how can I check the process has is not frozen?

Thanks

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Dan Pascu
In reply to this post by Daniel Zanutti

On 16 Mar 2017, at 15:58, Daniel Zanutti wrote:

> Hi Dan
>
> This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way.

The relay doesn't listen for network connections, you cannot connect directly to a relay. A relay will only connect to all configured dispatchers. The dispatcher on the other hand has a control port where you can connect and give commands, including fetching statistics from relays over the connections the relay already established with the dispatcher.

--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Daniel Zanutti
Understood.

Thanks for explanation.

Regards

On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu <[hidden email]> wrote:

On 16 Mar 2017, at 15:58, Daniel Zanutti wrote:

> Hi Dan
>
> This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way.

The relay doesn't listen for network connections, you cannot connect directly to a relay. A relay will only connect to all configured dispatchers. The dispatcher on the other hand has a control port where you can connect and give commands, including fetching statistics from relays over the connections the relay already established with the dispatcher.

--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Carlos Oliva
Hi Daniel!

I made a little php script for Nagios some years ago that may help you.

It is intented to use on opensips machine (where media dispatcher is running)

You pass as argument the number of mediaproxy relay machines you expected to have and it returnks Ok and the list of your relays or error if the number of relays is not what you expect.

It's very simple but works well, we've been using it for years. This is the script:


#!/usr/bin/php
<?php
$errno="";
$errstr="";
$fp=fsockopen('127.0.0.1','25061',$errno,$errstr,'2');
fputs($fp, "summary\r\n");
$line  = fgets($fp);
fclose($fp);
$decoded=json_decode($line);
$num_relays=0;
$str_salida="";
foreach($decoded as $relay)
{
        if($relay->status=="active")
        {
                $num_relays++;
                $str_salida.=" ".$relay->ip;
        }
}
if($num_relays==$argv[1])
{
        echo "OK IPs de Relays RTP: ".$str_salida."\n";
        exit(0);
}
else
{
        echo "ERROR faltan Relays. IPs de Relays RTP: ".$str_salida."\n";
        exit(2);
}

?>

Best regards,

Carlos Oliva


    
 




2017-03-17 18:57 GMT+01:00 Daniel Zanutti <[hidden email]>:
Understood.

Thanks for explanation.

Regards

On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu <[hidden email]> wrote:

On 16 Mar 2017, at 15:58, Daniel Zanutti wrote:

> Hi Dan
>
> This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way.

The relay doesn't listen for network connections, you cannot connect directly to a relay. A relay will only connect to all configured dispatchers. The dispatcher on the other hand has a control port where you can connect and give commands, including fetching statistics from relays over the connections the relay already established with the dispatcher.

--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Monitoring Mediaproxy

Daniel Zanutti
Just counting how many is probably a good solution and very very simple.

Thanks =)

On Mon, Mar 20, 2017 at 7:00 AM, Carlos Oliva <[hidden email]> wrote:
Hi Daniel!

I made a little php script for Nagios some years ago that may help you.

It is intented to use on opensips machine (where media dispatcher is running)

You pass as argument the number of mediaproxy relay machines you expected to have and it returnks Ok and the list of your relays or error if the number of relays is not what you expect.

It's very simple but works well, we've been using it for years. This is the script:


#!/usr/bin/php
<?php
$errno="";
$errstr="";
$fp=fsockopen('127.0.0.1','25061',$errno,$errstr,'2');
fputs($fp, "summary\r\n");
$line  = fgets($fp);
fclose($fp);
$decoded=json_decode($line);
$num_relays=0;
$str_salida="";
foreach($decoded as $relay)
{
        if($relay->status=="active")
        {
                $num_relays++;
                $str_salida.=" ".$relay->ip;
        }
}
if($num_relays==$argv[1])
{
        echo "OK IPs de Relays RTP: ".$str_salida."\n";
        exit(0);
}
else
{
        echo "ERROR faltan Relays. IPs de Relays RTP: ".$str_salida."\n";
        exit(2);
}

?>

Best regards,

Carlos Oliva



    
 




2017-03-17 18:57 GMT+01:00 Daniel Zanutti <[hidden email]>:
Understood.

Thanks for explanation.

Regards

On Fri, Mar 17, 2017 at 2:47 PM, Dan Pascu <[hidden email]> wrote:

On 16 Mar 2017, at 15:58, Daniel Zanutti wrote:

> Hi Dan
>
> This is exactly how I'm monitoring but looking to the dispatcher it's kind hard on a Nagios like system, because I'm monitoring Relay A, B and C, but the status will be on dispatcher machine D. But ok, if it's the only way.

The relay doesn't listen for network connections, you cannot connect directly to a relay. A relay will only connect to all configured dispatchers. The dispatcher on the other hand has a control port where you can connect and give commands, including fetching statistics from relays over the connections the relay already established with the dispatcher.

--
Dan





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Loading...