[OpenSIPS-Users] Got No suitable relay found from mediaproxy-2.3.6

Jiang Jinke jiangjinke at gmail.com
Mon Aug 31 10:28:33 CEST 2009


[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 at p2 mediaproxy]# media-relay --version
media-relay 2.3.6
[root at p2 mediaproxy]# media-dispatcher --version
media-dispatcher 2.3.6
[root at p2 mediaproxy]#
[root at p2 mediaproxy]# cd /usr/local/mediaproxy
[root at 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 at 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:0086135xxxxxxxx at domain.com 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:8872 at domain.com>;tag=3759547607^M
Aug 31 15:48:58 p2 /usr/local/ngsw/sbin/opensips[24020]: Mon Aug 31
15:48:58 2009      To:

<sip:0086135xxxxxxxx at domain.com>;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 at 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 at 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 at 192.168.1.2', 'cseq': '21',

'user_agent': 'Softphone V1.0', 'media_relay': '203.193.xx.xx',
'to_uri': '0086135xxxxxxxx at domain.com',

'type': 'request', 'from_uri': '8872 at domain.com'}
Aug 30 22:58:44 p2 media-dispatcher[25540]: debug: session None,
call_id: 846773914 at 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 at p2 ~]# ls /etc/mediaproxy/tls/
ca.pem  crl.pem  dispatcher.crt  dispatcher.key  README  relay.crt  relay.key

--
Jinke Jiang



More information about the Users mailing list