I think this is a really good idea. What about having a mediaproxy modparam for "relay_group".. So a relay group could be "east_coast" or "west_coast" and you can send that as the preference (and OpenSIPs caches the IPs for the group and sends them pre-looked up to dispatcher)
Just my $0.02. Also, with preferred relays specified, will non-prefered relays every be picked? I can think of a handful of circumstances where you'd absolutely not want a non-prefered relay to ever be allowed. -Brett On Wed, Apr 7, 2010 at 2:45 AM, Saúl Ibarra Corretgé <[email protected]> wrote: > Hi, > > On 5/4/10 10:13 PM, Henk Hesselink wrote: >> Hi Adrian, >> >> The way I read the code I can indicate one preferred relay, but not a >> set. So I can't say "prefer this set of relays (i.e. the ones in this >> particular datacenter) over the rest". That's less flexible than the >> SRV style. >> >> What would be great would be a dispatcher option to say "based on the >> media streams in the SDP, prefer 'local' relays" for some definition of >> local - for instance relays that are on the same subnet as one or more >> of the media endpoints. I might be able to code up a patch for that if >> you can give me a hint where to start (looks like that would be the >> send_command method in the RelayFactory class). >> > > Currently only a single preferred relay can be used. The send_command > method from the RelayFactory class is responsible for selecting the > relay which will be used, currently in a random way if no preferred > relay is specified. > > The preferred relay is specified from the OpenSIPS configuration file > through an AVP and the mediaproxy module sends this information to the > dispatcher through the 'update' command. So that function would also > need modifications. > > Now the tricky part would be to decide where to do the actual DNS lookup. > > - If the lookup is done in OpenSIPS, you could pass a space separated > list of relays (in the right order) which would be appended at the > beginning of the list. > > - Do the lookup in MediaProxy. > > I'd rather not do it on MediaProxy, as this would increase the > complexity and add delay (due to the DNS lookup) to the setup of the call. > > Having that said, here is my proposal: modify both OpenSIPS module and > MdediaProxy to accept a list of space separated relays. The way of > building that list should be decoupled from the whole process IMHO, so > you could do it by having the DNS query results cached somewhere. This > would prevent the delay that DNS query may cause. > > > > Regards, > > -- > Saúl Ibarra Corretgé > AG Projects > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
