[Serusers] loose_route() function doesn't work? - ser 2_0_0

tzieleniewski tzieleniewski at o2.pl
Sun Jul 8 23:39:38 CEST 2007


> On Ne, 2007-07-08 at 14:21 +0200, tzieleniewski wrote:
> > Hi,
> > 
> > I have the following SIP scenario:
> > 
> > UA_A -> SER_A -> other SIP Proxy -> SER_A -> UA_B
> > 
> > I want to force SER_A instance to forward the received request to other SIP proxy element and ensure that that request will return to SER_A afterwards.
> > To do that I use an insert_hf() function from textops module inside ser.cfg to insert a double Route header field - first value the sip uri of the 'other SIP proxy' and second one the SER_A sip uri to assure that the forwarded request will return to SER_A.
> 
> Well it looks quite strange (yes I know that IMS AS use the Route
> headers for scenario like that one above, OTOH they usually are B2BUAs,
> so in reality you see two "independent" calls on SER_A :), if you insert
> the two Route headers into the request (and assuming the other SIP proxy
> is RFC compliant) it should work.
That is exactly what I am trying to achive. In IMS whenever SCSCF passes the signaling to AS it inserts those two Route headers. This ofcourse is not important if AS acts as UA or B2BUA but in the case of AS in the SIP Proxy mode makes a difference:) 

> 
> > Whenever request enters the ser.cfg script logic my SER code performs the loose_route() check in general. In my situation when request initialy enters the logic it doesn't have any Route headers. When request enters a particular route block responsible for handling this request there is an lookup_user() invocation to check if the user should be serviced by this SER. If lookup_user() returns true and this particular user has a flag set which indicates routing through the extra SIP proxy I add the Route headers and pass the request to the 'FORWARD' route block where I do the t_relay().
> > My problem is that when I do t_relay() after inserting the Route headers into the request it is not forwarded according to the topmost Route header field value??
> 
> Yes, inserting Route header does not affect the destination for the
> request (which was already computed), so you can either use
> t_forward_to, which has the destination as parameter or change it using
> attr_destination or xlset_destination (near the code where you add the
> Route header).
> 
> > Is it bug in ser??

When is the actual destination computed, is it during the first invocation of the loose_route() function??

tomasz
> 
> No, it's know behaviour.
> 
> Michal
> 




More information about the sr-users mailing list