Hi,
On Mon, Aug 28, 2006 at 04:36:42PM +0200, Jeremie Le Hen wrote:
I am running a NATing proxy. Everything works fine,
except that
some of my neighbour proxies send me BYE requests with an incorrect
Route header containing their own IP address.
The result is naturally that my proxy sends back the request and
the call is never ended.
I know this is a wrong behaviour and I have contacted the remote
administrator to have him fix his proxy. But in the meantime
I would like to find a workaround for my users.
I tried to do the following, before calling loose_routing(). I am
not sure if it's relevant or not nevertheless:
% if (method == "BYE") {
% # XXX Remove buggy Route header from BYE packets.
% xlog("L_ALERT", "Removing buggy Route header from BYE request");
% remove_hf("Route");
% lookup("location");
% }
However, I raised the verbosity level and found that the Route header
is read as soon as the packet is received, therefore the above
block is not really useful.
I dare to post the temporary workaround I have found for this issue,
for the records.
Fortunately, stock OpenSER doesn't allow to do this, which is fine
in regard to the RFC.
However I have customers and I can't afford to wait for the remote
administrator to unbreak his proxy. Given that the packet is
analyzed as soon as it is received by OpenSER, I didn't find an
easy way to circumvent a buggy Route header using the available
modules. Therefore, I wrote my little own module "shuntroute.so"
which mangles the SIP message as though there hav been no Route
header at all.
The above configuration block is now:
% if (method == "BYE") {
% # XXX Remove buggy Route header from BYE packets.
% xlog("L_ALERT", "Removing buggy Route header from BYE
request");
% shuntroute();
% remove_hf("Route");
% lookup("location");
% }
Please purist, forgive me.
Best regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >