El Martes, 21 de Abril de 2009, Brandon Armstead escribió:
Inaki,
Please, mantain the thread in the maillist.
Yes, it's a different scenario.
You could do some trick:
- When P1 receives a REGISTER it sets a bflag for it (bflag 1). - When P2 receives a REGISTER it sets a bflag for it (bflag 2). - When P3receives a REGISTER it sets a bflag for it (bflag 3).
When P1 receives a request and performs location for that AoR, it will also extract the bflags, so P1 checks if bflag 1 is on. If not and bflag 2 is on, then it routes (by setting $du => without changing the resolved RURI) the request to P2.
:)
Inaki,
Sorry missed the 'reply to all button'. I think what your saying makes sense, so simply enumerate each server:
i.e.
P1 - Set Flag 1 P2 - Set Flag 2 P3 - Set Flag 3
these flags will then be written to usrloc, and upon lookup read from usrloc.
In which case I can simply check this $bf psuedo variable for the specific server value, or even potentially do a lookup from a data source w/ avp_db_query and forward to associative proxy correctly by setting the destination uri.
Does this sound feasable? Thanks!
On Tue, Apr 21, 2009 at 1:59 PM, Iñaki Baz Castillo ibc@aliax.net wrote:
El Martes, 21 de Abril de 2009, Brandon Armstead escribió:
Yes.
Well, I think is faster and easier just checking the bflags retrieved when performing the location operation. You can do an AND operation against the $bf variable, or just check the bflags:
------------------------------------------ # I'm Proxy 1, so...
if isbflagset(1) # nothing to do, I will route the request to the user location. ;
else if isbflagset(2) # I route the request to Proxy 2. $du = "sip:P2";
else if isbflagset(3) # I route the request to Proxy 3. $du = "sip:P3"; ------------------------------------------
Does this sound feasable? Thanks!
Yes, it does. You must also allow these request from P1 to P2 without asking for auth and so.
Regards.