<html><body>
<p>Hi John,<br>
<br>
I would agree that media proxy needs better support for geo-distribution of relays. One possibility is to implement GeoIP directly within the dispatcher, not within opensips. The dispatcher could compute GeoIP location of each relay when it registers, and then for each call compute GeoIP location of the caller (or callee) and select the closest relay based upon that. And it could load-balance within co-located relays ("co-located" based upon GeoIP).<br>
<br>
One issue with geo distribution of relays is call setup latency and thruput: the opensips process blocks while the dispatcher has round-trip conversation with the media relay. This latency goes from ~20ms for local relay to >200ms for international relay, which can block a lot of processes, reducing thruput. Ideally, the communication between dispatcher and relay wouldn't block the opensips process.<br>
<br>
Good luck implementing a solution, and please let me know what you come up with.<br>
<br>
Regards,<br>
Kennard<br>
<br>
<img width="16" height="16" src="cid:1__=07BBFD0DDFC7B5B58f9e8a93df9@logitech.com" border="0" alt="Inactive hide details for John Khvatov ---09/13/2010 06:07:16 AM---Hello all! We are working on building geo-distributed VoIP s"><font color="#424282">John Khvatov ---09/13/2010 06:07:16 AM---Hello all! We are working on building geo-distributed VoIP solution with</font><br>
<br>
<font size="2" color="#5F5F5F">From:        </font><font size="2">John Khvatov <ivaxer@gmail.com></font><br>
<font size="2" color="#5F5F5F">To:        </font><font size="2">users@lists.opensips.org</font><br>
<font size="2" color="#5F5F5F">Date:        </font><font size="2">09/13/2010 06:07 AM</font><br>
<font size="2" color="#5F5F5F">Subject:        </font><font size="2">[OpenSIPS-Users] Mediaproxy: media relay selection algorithm        improvements</font><br>
<font size="2" color="#5F5F5F">Sent by:        </font><font size="2">users-bounces@lists.opensips.org</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt>Hello all!<br>
<br>
We are working on building geo-distributed VoIP solution with<br>
Mediaproxy.<br>
<br>
I think, that the current media relay selection algorithm is not perfect<br>
and can be improved. In the current implementation we set IP address of<br>
a particular media relay that will be preferred by dispatcher. But what<br>
if the particular media relay will be unavailable? Media dispatcher will<br>
run normal selection algorithm and does not select neighbor of the<br>
particular media relay.<br>
<br>
I propose to implement the groups of media relays. Each media-relay can<br>
be registered on dispatcher with name and group. In the OpenSIPS config<br>
we can specify preferred media relay/relays by name or group.<br>
<br>
Consider the example. Several our relays in Frankfurt registered on<br>
dispatchers with group=frankfurt, in Moscow -- with group=moscow. When<br>
we set “$avp(s:media_relay_group) to "moscow", dispatcher will<br>
select one of media_relay hosted in Moscow. Also, we can simply add/remove<br>
media_relays in run-time.<br>
<br>
What do you think about this idea? Is it difficult to implement?<br>
<br>
-- <br>
WBR, John Khvatov<br>
<br>
_______________________________________________<br>
Users mailing list<br>
Users@lists.opensips.org<br>
</tt><tt><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></tt><tt><br>
</tt><br>
</body></html>