On Thu, Dec 18, 2003 at 10:58:22PM +0100, Jan Janak wrote:
I looked at the attached dumps. First of all, 0.8.10
and 0.8.12 handle
record routing differently. 0.8.10 implements strict routing while
0.8.12 implements loose routing.
The bug is in your script. Because 0.8.12 implements loose routing, the
Request-URI will contain the Contact of the callee. The Contact contains
the number of the callee -- 5803932.
So, should I be checking a different variable? If so, which? I didn't
find anything about this in the Admin Guide.
In your script you are searching for numbers beginning
with 580 and
rewrite the hostname to a gateway. ACK and BYE will also contain the
number in the Request-URI -- see above, but they don't contain the IP of
your server in the Request-URI -- the IP of the callee is there.
But you don't check this and rewrite anyway.
The proper solution would be to search for numbers beginning with 580
inside the if (uri==myself) condition.
I've moved the search inside the if (uri==myself) condition as you
suggested. However, this has not (as I suspected) changed the behavior
of the routing. The 580XXXX calls still do not get routed to the
gateway as they did in 0.8.10. In the attached ngrep output you can see
a call to sip:5803932@172.21.30.53 starting at 2003/12/18
17:15:44.976502. However this request makes it past the 580XXXX check
and is routed instead to 172.21.30.10, which is not what I would expect.
Is there still something wrong with the new config? Am I checking the
wrong variable?
BTW, all searches and rewrites of Request-URI should
be inside
uri==myself condition -- the condition will be true only for requests
establishing a dialog.
The Request-URI of requests WITHIN a dialog (BYE, ACK)
must not be changed.
In addition to that 0.8.10 and 0.8.12 configs are different. Your config
for 0.8.10 doesn't use record routing while the config for 0.8.12 does.
I am aware that they are slightly different. I used the 0.8.12 default
config as a starting point and attempted to translate the working 0.8.10
configuration to the 0.8.12 syntax.
--
Jamin W. Collins
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo