Got No suitable relay found from mediaproxy-2.3.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Got No suitable relay found from mediaproxy-2.3.6

Jiang Jinke
[OpenSIPS-Users] Got No suitable relay found from mediaproxy-2.3.6
Dear All,

I got 'No suitable relay found' from media-dispatcher when I'm calling
out from opensips to a Cisco 5300.
I'm using NAT'ed ip and Cisco 5300 is using a public ip.

I notice there is a post
http://lists.opensips.org/pipermail/users/2009-January/002754.html
in this list already talking about the similar problem.
But my problem didn't have the push error. It's it a different problem ?

I also tried to dig into the mediaproxy code in mediaproxy/dispatcher.py,
adding more debug log to see if I can find out what the problem is.
I also tried using the old version mediaproxy-2.0.3, but I still got
exactly the same problem.

firewall is disabled while testing.
Here is my detail message:
System info:
CentOS release 5.3 (Final)
uname -a
Linux p2 2.6.18-128.4.1.el5PAE #1 SMP Tue Aug 4 20:58:34 EDT 2009 i686
i686 i386 GNU/Linux
python -V
Python 2.4.3

[root@p2 mediaproxy]# media-relay --version
media-relay 2.3.6
[root@p2 mediaproxy]# media-dispatcher --version
media-dispatcher 2.3.6
[root@p2 mediaproxy]#
[root@p2 mediaproxy]# cd /usr/local/mediaproxy
[root@p2 mediaproxy]# cat config.ini | grep -e "^[^;]"
[Relay]
dispatchers = 203.193.xx.xxx
relay_ip = 203.193.xx.xxx
port_range = 30000:40000
log_level = DEBUG
[Dispatcher]
socket_path = dispatcher.sock
listen = 203.193.xx.xxx
listen_management = 127.0.0.1
log_level = DEBUG
relay_timeout = 5
[TLS]
[Database]
[Radius]
[OpenSIPS]
socket_path = '/var/run/opensips.sock'
max_connections = 20

[root@p2 mediaproxy]# /usr/local/ngsw/sbin/opensips -V
version: opensips 1.5.3-notls (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST,
SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,

FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: unknown
@(#) $Id: main.c 5887 2009-07-16 11:47:46Z bogdan_iancu $
main.c compiled on 13:33:26 Aug 30 2009 with gcc 4.1.2

This is part of the scripts of the opensips.cfg:

        # NAT'ed, we call it after proxy authorize
        if (((isflagset(17) && isflagset(6)) || isflagset(18))
                && is_method("INVITE|ACK")) {
                xlog("L_INFO", "$Tf\tuse_media_proxy() in beginning\r\n");
                setdebug(7);
                $avp(s:media_relay) = "203.193.xx.xx";
                use_media_proxy();
                setdebug();
        };


OPENSIPS logs:
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      Received from

119.145.xxx.xxx^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      INVITE

sip:[hidden email] SIP/2.0^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      From:

<sip:[hidden email]>;tag=3759547607^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      To:

<sip:[hidden email]>;tag=<null>^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      Call-ID:

50525467@10.10.101.147^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      CSeq: 21^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      Contact:

<sip:8872@10.10.101.147:19001>^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      behind nat^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
rc_avpair_gen: received unknown VSA attribute 101,

vendor 9 of length 8: 0x3438382E3030
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      use_media_proxy() in

beginning^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
DBG:core:parse_headers: flags=ffffffffffffffff
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
DBG:core:parse_headers: flags=8000000
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
ERROR:mediaproxy:use_media_proxy: mediaproxy returned

error
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      lookup aliases^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      NAT'ed flag already set

before lookup location^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      goto static routing^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: removed
#following Mon Aug 31 15:48:58 2009   # in

uri^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: removed
#following Mon Aug 31 15:48:58 2009   # in to

uri^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24027]: Mon Aug 31
15:48:58 2009      onreply_route 1^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24027]: Mon Aug 31
15:48:58 2009      SIP/2.0 100 Trying^M


mediaproxy logs:
Aug 31 15:23:03 p2 media-relay[31683]: Log opened.
Aug 31 15:23:03 p2 media-relay[31683]: Starting MediaProxy Relay 2.3.6
Aug 31 15:23:03 p2 media-relay[31683]: Set resource limit for maximum
open file descriptors to 11000
Aug 31 15:23:06 p2 media-dispatcher[31686]: Log opened.
Aug 31 15:23:06 p2 media-dispatcher[31686]: Starting MediaProxy Dispatcher 2.3.6
Aug 31 15:23:06 p2 media-dispatcher[31686]: Twisted is using selectreactor
Aug 31 15:23:06 p2 media-dispatcher[31686]:
mediaproxy.dispatcher.RelayFactory starting on 25060
Aug 31 15:23:06 p2 media-dispatcher[31686]:
mediaproxy.dispatcher.OpenSIPSControlFactory starting on

"'/var/run/mediaproxy/dispatcher.sock'"
Aug 31 15:23:06 p2 media-dispatcher[31686]:
mediaproxy.dispatcher.ManagementControlFactory starting on 25061
Aug 31 15:48:58 p2 media-dispatcher[31686]: warning: user requested
media_relay 203.193.xx.xx is not available
Aug 31 15:48:58 p2 media-dispatcher[31686]: error: Error processing
request: No suitable relay found
Aug 31 15:48:59 p2 media-dispatcher[31686]: warning: user requested
media_relay 203.193.xx.xx is not available
Aug 31 15:48:59 p2 media-dispatcher[31686]: error: Error processing
request: No suitable relay found
Aug 31 15:49:07 p2 media-dispatcher[31686]: warning: user requested
media_relay 203.193.xx.xx is not available
Aug 31 15:49:07 p2 media-dispatcher[31686]: error: Error processing
request: No suitable relay found


The debug log after my modification on the mediaproxy-2.3.6 source code:
Aug 30 22:58:23 p2 media-relay[25537]: Received SIGTERM, shutting down.
Aug 30 22:58:23 p2 media-relay[25537]: Main loop terminated.
Aug 30 22:58:27 p2 media-relay[25544]: Log opened.
Aug 30 22:58:27 p2 media-relay[25544]: Starting MediaProxy Relay 2.3.6
Aug 30 22:58:27 p2 media-relay[25544]: Set resource limit for maximum
open file descriptors to 11000
Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: parsed_headers:
{'from_tag': '3472166832', 'signaling_ip':

'116.76.xx.xx', 'media': 'audio:192.168.1.2:20562:sendrecv',
'call_id': '846773914@192.168.1.2', 'cseq': '21',

'user_agent': 'Softphone V1.0', 'media_relay': '203.193.xx.xx',
'to_uri': '[hidden email]',

'type': 'request', 'from_uri': '[hidden email]'}
Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: session None,
call_id: 846773914@192.168.1.2
Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: before shuffle: deque([])
Aug 30 22:58:44 p2 media-dispatcher[25540]: warning: user requested
media_relay 203.193.33.158 is not

available
Aug 30 22:58:44 p2 media-dispatcher[25540]: error: Error processing
request: No suitable relay found



The tls files are located in:
[root@p2 ~]# ls /etc/mediaproxy/tls/
ca.pem  crl.pem  dispatcher.crt  dispatcher.key  README  relay.crt  relay.key

--
Jinke Jiang

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

Re: Got No suitable relay found from mediaproxy-2.3.6

Jiang Jinke
Problem solved!
I found that the mediaproxy is not working if I put the config.ini in
/usr/local/mediaproxy/config.ini, but it's working fine when I
put the configuration file in /etc/mediaproxy/config.ini.

I found out by looking into the source code and adding debug info in
both relay.py and dispatcher.py, found that the ConfigSetting didn't
get any thing even if I changed the /usr/local/mediaproxy/config.ini.

Double check with the INSTALL file of mediaproxy and found it's my
stupid mis-understanding on the following statement:
"MediaProxy will look for both a local configuration file, which is placed in
the same directory as the media-relay and media-dispather scripts, and a
system configuration file which is placed in /etc/mediaproxy/"

Sorry for this stupid question. :-P

Accutually if I'm famaliar with the log of mediaproxy, I'll find out
the problem at the first sight on the log.
The normal log should look like the following, the relay will connect
to dispatcher once it started. My previous log
shows that I didn't have the right configuration.

Sep  2 00:43:08 p2 media-relay[31750]: Log opened.
Sep  2 00:43:08 p2 media-relay[31750]: Starting MediaProxy Relay 2.3.6
Sep  2 00:43:08 p2 media-relay[31750]: Set resource limit for maximum
open file descriptors to 11000
Sep  2 00:43:08 p2 media-relay[31750]: debug: Adding new dispatcher at
203.193.xx.xx:25060
Sep  2 00:43:08 p2 media-dispatcher[31745]: debug: Connection from
relay at 203.193.xx.xx
Sep  2 00:43:08 p2 media-dispatcher[31745]: debug: Issuing "sessions"
command to relay at 203.193.xx.xx
Sep  2 00:43:08 p2 media-relay[31750]: debug: Connected to dispatcher
at 203.193.xx.xx:25060

Hope it will be helpful to others who are not famaliar with the
mediaproxy log info.

--
Jinke Jiang

On Mon, Aug 31, 2009 at 4:28 PM, Jiang Jinke<[hidden email]> wrote:

> [OpenSIPS-Users] Got No suitable relay found from mediaproxy-2.3.6
> Dear All,
>
> I got 'No suitable relay found' from media-dispatcher when I'm calling
> out from opensips to a Cisco 5300.
> I'm using NAT'ed ip and Cisco 5300 is using a public ip.
>
> I notice there is a post
> http://lists.opensips.org/pipermail/users/2009-January/002754.html
> in this list already talking about the similar problem.
> But my problem didn't have the push error. It's it a different problem ?
>
> I also tried to dig into the mediaproxy code in mediaproxy/dispatcher.py,
> adding more debug log to see if I can find out what the problem is.
> I also tried using the old version mediaproxy-2.0.3, but I still got
> exactly the same problem.
>
> firewall is disabled while testing.
> Here is my detail message:
> System info:
> CentOS release 5.3 (Final)
> uname -a
> Linux p2 2.6.18-128.4.1.el5PAE #1 SMP Tue Aug 4 20:58:34 EDT 2009 i686
> i686 i386 GNU/Linux
> python -V
> Python 2.4.3
>
> [root@p2 mediaproxy]# media-relay --version
> media-relay 2.3.6
> [root@p2 mediaproxy]# media-dispatcher --version
> media-dispatcher 2.3.6
> [root@p2 mediaproxy]#
> [root@p2 mediaproxy]# cd /usr/local/mediaproxy
> [root@p2 mediaproxy]# cat config.ini | grep -e "^[^;]"
> [Relay]
> dispatchers = 203.193.xx.xxx
> relay_ip = 203.193.xx.xxx
> port_range = 30000:40000
> log_level = DEBUG
> [Dispatcher]
> socket_path = dispatcher.sock
> listen = 203.193.xx.xxx
> listen_management = 127.0.0.1
> log_level = DEBUG
> relay_timeout = 5
> [TLS]
> [Database]
> [Radius]
> [OpenSIPS]
> socket_path = '/var/run/opensips.sock'
> max_connections = 20
>
> [root@p2 mediaproxy]# /usr/local/ngsw/sbin/opensips -V
> version: opensips 1.5.3-notls (i386/linux)
> flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST,
> SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
>
> FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> svnrevision: unknown
> @(#) $Id: main.c 5887 2009-07-16 11:47:46Z bogdan_iancu $
> main.c compiled on 13:33:26 Aug 30 2009 with gcc 4.1.2
>
> This is part of the scripts of the opensips.cfg:
>
>        # NAT'ed, we call it after proxy authorize
>        if (((isflagset(17) && isflagset(6)) || isflagset(18))
>                && is_method("INVITE|ACK")) {
>                xlog("L_INFO", "$Tf\tuse_media_proxy() in beginning\r\n");
>                setdebug(7);
>                $avp(s:media_relay) = "203.193.xx.xx";
>                use_media_proxy();
>                setdebug();
>        };
>
>
> OPENSIPS logs:
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      Received from
>
> 119.145.xxx.xxx^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      INVITE
>
> sip:[hidden email] SIP/2.0^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      From:
>
> <sip:[hidden email]>;tag=3759547607^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      To:
>
> <sip:[hidden email]>;tag=<null>^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      Call-ID:
>
> 50525467@10.10.101.147^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      CSeq: 21^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      Contact:
>
> <sip:8872@10.10.101.147:19001>^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      behind nat^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
> rc_avpair_gen: received unknown VSA attribute 101,
>
> vendor 9 of length 8: 0x3438382E3030
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      use_media_proxy() in
>
> beginning^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
> DBG:core:parse_headers: flags=ffffffffffffffff
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
> DBG:core:parse_headers: flags=8000000
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]:
> ERROR:mediaproxy:use_media_proxy: mediaproxy returned
>
> error
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      lookup aliases^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      NAT'ed flag already set
>
> before lookup location^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
> 15:48:58 2009      goto static routing^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: removed
> #following Mon Aug 31 15:48:58 2009   # in
>
> uri^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: removed
> #following Mon Aug 31 15:48:58 2009   # in to
>
> uri^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24027]: Mon Aug 31
> 15:48:58 2009      onreply_route 1^M
> Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24027]: Mon Aug 31
> 15:48:58 2009      SIP/2.0 100 Trying^M
>
>
> mediaproxy logs:
> Aug 31 15:23:03 p2 media-relay[31683]: Log opened.
> Aug 31 15:23:03 p2 media-relay[31683]: Starting MediaProxy Relay 2.3.6
> Aug 31 15:23:03 p2 media-relay[31683]: Set resource limit for maximum
> open file descriptors to 11000
> Aug 31 15:23:06 p2 media-dispatcher[31686]: Log opened.
> Aug 31 15:23:06 p2 media-dispatcher[31686]: Starting MediaProxy Dispatcher 2.3.6
> Aug 31 15:23:06 p2 media-dispatcher[31686]: Twisted is using selectreactor
> Aug 31 15:23:06 p2 media-dispatcher[31686]:
> mediaproxy.dispatcher.RelayFactory starting on 25060
> Aug 31 15:23:06 p2 media-dispatcher[31686]:
> mediaproxy.dispatcher.OpenSIPSControlFactory starting on
>
> "'/var/run/mediaproxy/dispatcher.sock'"
> Aug 31 15:23:06 p2 media-dispatcher[31686]:
> mediaproxy.dispatcher.ManagementControlFactory starting on 25061
> Aug 31 15:48:58 p2 media-dispatcher[31686]: warning: user requested
> media_relay 203.193.xx.xx is not available
> Aug 31 15:48:58 p2 media-dispatcher[31686]: error: Error processing
> request: No suitable relay found
> Aug 31 15:48:59 p2 media-dispatcher[31686]: warning: user requested
> media_relay 203.193.xx.xx is not available
> Aug 31 15:48:59 p2 media-dispatcher[31686]: error: Error processing
> request: No suitable relay found
> Aug 31 15:49:07 p2 media-dispatcher[31686]: warning: user requested
> media_relay 203.193.xx.xx is not available
> Aug 31 15:49:07 p2 media-dispatcher[31686]: error: Error processing
> request: No suitable relay found
>
>
> The debug log after my modification on the mediaproxy-2.3.6 source code:
> Aug 30 22:58:23 p2 media-relay[25537]: Received SIGTERM, shutting down.
> Aug 30 22:58:23 p2 media-relay[25537]: Main loop terminated.
> Aug 30 22:58:27 p2 media-relay[25544]: Log opened.
> Aug 30 22:58:27 p2 media-relay[25544]: Starting MediaProxy Relay 2.3.6
> Aug 30 22:58:27 p2 media-relay[25544]: Set resource limit for maximum
> open file descriptors to 11000
> Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: parsed_headers:
> {'from_tag': '3472166832', 'signaling_ip':
>
> '116.76.xx.xx', 'media': 'audio:192.168.1.2:20562:sendrecv',
> 'call_id': '846773914@192.168.1.2', 'cseq': '21',
>
> 'user_agent': 'Softphone V1.0', 'media_relay': '203.193.xx.xx',
> 'to_uri': '[hidden email]',
>
> 'type': 'request', 'from_uri': '[hidden email]'}
> Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: session None,
> call_id: 846773914@192.168.1.2
> Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: before shuffle: deque([])
> Aug 30 22:58:44 p2 media-dispatcher[25540]: warning: user requested
> media_relay 203.193.33.158 is not
>
> available
> Aug 30 22:58:44 p2 media-dispatcher[25540]: error: Error processing
> request: No suitable relay found
>
>
>
> The tls files are located in:
> [root@p2 ~]# ls /etc/mediaproxy/tls/
> ca.pem  crl.pem  dispatcher.crt  dispatcher.key  README  relay.crt  relay.key
>
> --
> Jinke Jiang
>

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