[OpenSIPS-Users] mediaproxy relay on none default route interface failed

Ghaith ALKAYYEM ghaith.alkayyem at telecom-bretagne.eu
Thu Sep 10 12:56:00 CEST 2009


Hello,

I think it's not possible to use two separate relays on the same server,
I tried that a lot then I switched to RTPproxy.

Regards.


On Thu, 2009-09-10 at 18:22 +0800, Jiang Jinke wrote:
> Dear All,
> 
> I tried to make the relay to listen to the none default route
> interface, but failed.
> 
> Below is my configuration info and my env.
> 
> Using the latest mediaproxy-2.3.8 on CentOS 5.3.
> 
> I had media-dispatcher and media-relay running on my server which has
> multiple NIC interface,
> two public ips which are belong to two different provider.
> 
> for example:
> eth0: 192.168.88.12
> eth1: 203.xx.xx.xx
> eth2: 63.xx.xx.xx
> eth3: 10.11.12.21
> 
> route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 63.xx.xx.32    0.0.0.0         255.255.255.240 U     0      0        0 eth2
> 203.xx.xx.128  0.0.0.0         255.255.255.192 U     0      0        0 eth1
> 10.11.12.0      0.0.0.0         255.255.255.0   U     0      0        0 eth3
> 192.168.88.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth3
> 0.0.0.0         203.xx.xx.129  0.0.0.0         UG    0      0        0 eth1
> 
> But I notice that the relay are always binding to the one that has
> default route
> as said in the document.
> I can use two machine of course, but is it possible to have two
> separate relay that will
> only sent out packet from the interface it's listening to.
> 
> my config file is:
> [Relay]
> dispatchers = 63.xx.xx.xx 203.xx.xx.xx
> port_range = 30000:40000
> log_level = DEBUG
> [Dispatcher]
> socket_path = dispatcher.sock
> listen_management = 127.0.0.1
> log_level = DEBUG
> relay_timeout = 5
> [TLS]
> certs_path = tls
> [Database]
> [Radius]
> [OpenSIPS]
> socket_path = '/var/run/opensips.sock'
> max_connections = 20
> 
> I tried to use the media_relay_avp before calling use_media_proxy();
> but it seems the relay still listening to the other interface which
> has the default route.
> 
> The script of opensips is below:
> $avp(s:media_relay) = "63.xx.xx.xx";
> use_media_proxy();
> 
> Regards,
> --
> Jinke Jiang
> 
> 
> 
> the debug log of mediaproxy:
> Sep 10 18:16:54 ssw1 media-dispatcher[21925]: debug: Issuing "update"
> command to relay at 63.xx.xx.xx
> Sep 10 18:16:54 ssw1 media-relay[21930]: debug: Received new SDP offer
> Sep 10 18:16:54 ssw1 media-relay[21930]:
> mediaproxy.mediacontrol.StreamListenerProtocol starting on 30028
> Sep 10 18:16:54 ssw1 media-relay[21930]:
> mediaproxy.mediacontrol.StreamListenerProtocol starting on 30029
> Sep 10 18:16:54 ssw1 media-relay[21930]:
> mediaproxy.mediacontrol.StreamListenerProtocol starting on 30030
> Sep 10 18:16:54 ssw1 media-relay[21930]:
> mediaproxy.mediacontrol.StreamListenerProtocol starting on 30031
> Sep 10 18:16:54 ssw1 media-relay[21930]: debug: Added new stream:
> (audio) 10.10.101.147:20562 (RTP: Unknown, RTCP: Unknown) <->
> 203.xx.xx.xx:30028 <->
> 
> 203.xx.xx.xx:30030 <-> Unknown (RTP: Unknown, RTCP: Unknown)
> Sep 10 18:16:54 ssw1 media-relay[21930]: debug: created new session
> 4022675837 at 10.10.101.147: 8871 at test.com (3297793466) -->
> 0086135xxxxxxxx at test.com
> Sep 10 18:16:55 ssw1 media-dispatcher[21925]: debug: Issuing "update"
> command to relay at 63.xx.xx.xx
> Sep 10 18:16:55 ssw1 media-relay[21930]: debug: updating existing
> session 4022675837 at 10.10.101.147: 8871 at test.com (3297793466) -->
> 0086135xxxxxxxx at test.com
> Sep 10 18:16:55 ssw1 media-relay[21930]: debug: Received updated SDP answer
> Sep 10 18:16:55 ssw1 media-relay[21930]: debug: Got initial answer
> from callee for stream: (audio) 10.10.101.147:20562 (RTP: Unknown,
> RTCP: Unknown) <->
> 
> 203.xx.xx.xx:30028 <-> 203.xx.xx.xx:30030 <-> 203.xx.xx.15x:18550
> (RTP: Unknown, RTCP: Unknown)
> Sep 10 18:16:56 ssw1 media-relay[21930]: debug: Got traffic
> information for stream: (audio) 10.10.101.147:20562 (RTP:
> 119.145.xx.xx:20562, RTCP: Unknown) <->
> 
> 203.xx.xx.xx:30028 <-> 203.xx.xx.xx:30030 <-> 203.xx.xx.15x:18550
> (RTP: Unknown, RTCP: Unknown)
> Sep 10 18:16:56 ssw1 media-relay[21930]: debug: Got traffic
> information for stream: (audio) 10.10.101.147:20562 (RTP:
> 119.145.xx.xx:20562, RTCP: Unknown) <->
> 
> 203.xx.xx.xx:30028 <-> 203.xx.xx.xx:30030 <-> 203.xx.xx.15x:18550
> (RTP: 203.xx.xx.15x:18550, RTCP: Unknown)
> Sep 10 18:16:58 ssw1 media-relay[21930]: debug: Got traffic
> information for stream: (audio) 10.10.101.147:20562 (RTP:
> 119.145.xx.xx:20562, RTCP: Unknown) <->
> 
> 203.xx.xx.xx:30028 <-> 203.xx.xx.xx:30030 <-> 203.xx.xx.15x:18550
> (RTP: 203.xx.xx.15x:18550, RTCP: 203.xx.xx.15x:18551)
> Sep 10 18:17:03 ssw1 media-dispatcher[21925]: debug: Issuing "update"
> command to relay at 63.xx.xx.xx
> Sep 10 18:17:03 ssw1 media-relay[21930]: debug: updating existing
> session 4022675837 at 10.10.101.147: 8871 at test.com (3297793466) -->
> 0086135xxxxxxxx at test.com
> Sep 10 18:17:03 ssw1 media-relay[21930]: debug: Received updated SDP answer
> Sep 10 18:17:03 ssw1 media-relay[21930]: debug: Unchanged stream:
> (audio) 10.10.101.147:20562 (RTP: 119.145.xx.xx:20562, RTCP: Unknown)
> <->
> 
> 203.xx.xx.xx:30028 <-> 203.xx.xx.xx:30030 <-> 203.xx.xx.15x:18550
> (RTP: 203.xx.xx.15x:18550, RTCP: 203.xx.xx.15x:18551)
> Sep 10 18:17:04 ssw1 media-dispatcher[21925]: debug: Issuing "remove"
> command to relay at 63.xx.xx.xx
> Sep 10 18:17:04 ssw1 media-relay[21930]: debug: removing session
> 4022675837 at 10.10.101.147: 8871 at test.com (3297793466) -->
> 0086135xxxxxxxx at test.com
> Sep 10 18:17:04 ssw1 media-relay[21930]: (Port 30028 Closed)
> Sep 10 18:17:04 ssw1 media-relay[21930]: (Port 30029 Closed)
> Sep 10 18:17:04 ssw1 media-relay[21930]: (Port 30030 Closed)
> Sep 10 18:17:04 ssw1 media-relay[21930]: (Port 30031 Closed)
> Sep 10 18:17:04 ssw1 media-dispatcher[21925]: debug: Got statistics:
> {'from_tag': '3297793466', 'dialog_id': None, 'start_time':
> 1252577815.98, 'timed_out':
> 
> False, 'call_id': '4022675837 at 10.10.101.147', 'to_tag':
> 'ee5e73584226257a4ebacc86b8766efa', 'streams': [{'status': 'closed',
> 'caller_codec': 'G729',
> 
> 'post_dial_delay': 1.2267410755199999, 'callee_codec': 'G729',
> 'start_time': 0, 'caller_bytes': 42200, 'callee_bytes': 11100,
> 'caller_packets': 844,
> 
> 'end_time': 8, 'callee_remote': '203.xx.xx.15x:18550',
> 'caller_remote': '119.145.xx.xx:20562', 'media_type': 'audio',
> 'callee_local': '203.xx.xx.xx:30030',
> 
> 'timeout_wait': 0, 'caller_local': '203.xx.xx.xx:30028',
> 'callee_packets': 185}], 'duration': 8, 'to_uri':
> '0086135xxxxxxxx at test.com', 'from_uri':
> 
> '8871 at test.com', 'callee_ua': 'Sippy B2BUA (RADIUS)', 'caller_ua':
> 'Softphone PPTP V2.0'}
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 




More information about the Users mailing list