[Users] Registrar-initiated Route changes on Invite?

Joachim Fabini Joachim.Fabini at tuwien.ac.at
Thu Oct 20 15:08:07 CEST 2005


Hi,

We'd like to force the following SIP INVITE routing 
scenario: UA1->P1->P2->R->P2->P1->UA2. 

Unfortunately the Route is not known apriori and
must be built dynamically. P1 knows the Route from
P1 to R, R knows the Route from R to P1/UA2.

The INVITE sent by UA1 is loosely routed to R based
on the Route (Route: <sip:P2;lr>,<sip:R;lr>) 
that is added by P1 to UA1's INVITE. This works.
The message arrives correctly to the registrar, Route 
header contains Route: <sip:R;lr> as it should.

What we'd like to do: 
1) Lookup the contact (lookup("location");)
2) Rewrite the Route field to the value
   Route: <sip:P2;lr>,<sip:P1;lr> that is 
   stored by R in an AVP.
3) Forward the Invite on this route to UA2

Can someone please give some hints on how this 
is typically done in OpenSER? 
Although we rewrite the Invite's Route header field 
(new value stored in an AVP) at the Registrar, 
loose_route() does not work. We tried several 
alternatives including re-writing the Route header,
pushing hard-coded strings into the Route, etc. but 
none of these solutions does what we want.

What does work is if R self-forwards the Invite and
only then adds a new Route header. Apparently 
loose_route() in R acts on the route header of the 
incoming INVITE - if present - and ignores route header 
changes done within the script.

Thanks in advance
--Joachim





More information about the Users mailing list