On Jul 06, 2004 at 18:14, bert berlin <btberlin(a)quintum.com> wrote:
Below is a call flow for a situation that fails -
I have attached the ser.cfg file, and two ethereal sniffs - these are
for fax call attempts - one with record_route commented out (which
succeeds) , and one with record_route(), which fails.
Note that in the failure case, with record_route(), the re-invite from
208.226.140.40 gets to the proxy at 208.226.140.141, but the proxy never
sends that to the origination UA, 208.226.140.142.
There are several errors.
[...]
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
Add a loose route block here. If you don't your messages won't be
properly routed. See etc/ser.cfg for a good basic config example.
if (loose_route()) {
t_relay();
break;
};
############################################
# store user location if a REGISTER appears
if (method=="REGISTER") {
save("location");
break;
};
The above stuff should be under if (uri==myself) or you will catch all the registers (even
if they are not for your proxy). OTOH this won't affect your test.
if (uri==myself) #where myself is defined by the aliases above
{
#look for the registered contact in the location table of database
#and if find it, rewrite the uri and forward statefully to the destination
if (lookup ("location"))##Lookup finds the contact info and rewrites the
header
{
record_route();#send everything back through the proxy
t_relay();
break;
}
else
{
sl_send_reply("404","user not found");#and if you really don't
know what to do, send this back
break;
}
};
Here you are dropping all the packets (you don't forward them and you've
reached the end of your config). So if a packet doesn't match uri==myself it
will get dropped. This happens to your re-INVITEs. Add here a t_relay()
or forward(uri:host, uri:port).
}
Also note that your UA1 (.142) sends the ACK directly to UA2(.40) and not
through the proxy. See packet 15 in sip-fax-with-record-route-7-6-04.
Andrei