[prev in list] [next in list] [prev in thread] [next in thread]
List: serusers
Subject: Re: [SR-Users] redirect client to keep original ruri
From: Andrew Pogrebennyk <apogrebennyk () sipwise ! com>
Date: 2012-01-30 17:02:20
Message-ID: 4F26CD1C.8070800 () sipwise ! com
[Download RAW message or body]
Since this thread will probably end up in Google I''ll share my
experience. I ended up with this"
if(t_check_status("301|302"))
{
#NOTE: must assign to $du to keep R-URI intact
$var(contact) = $T_rpl($ct);
$var(contact) = $(var(contact){nameaddr.uri});
$du = $var(contact);
xlog("L_INFO", "Redirect from proxy intercepted - M=$rm
R=$ru F=$fu T=$tu IP=$avp(s:ip):$avp(s:port) ($si:$sp) ID=$ci\n");
append_branch();
route(ROUTE_RELAY);
exit;
}
where route(ROUTE_RELAY) is merely a call t_relay_to("0x01") wrapped up
in some logging. So far so good.
There was a problem when a new request target needed digest-ch'd the
caller with 407. The redirect server by default relayed not 407 but 302
reply back. I've set tm modparam failure_reply_mode to 3 - voila!
http://kamailio.org/docs/modules/3.1.x/modules/tm.html#failure_reply_mode
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic