From: "Greg Fausak" <greg(a)addabrand.com>
Keith,
If I'm not mistaken, the From and To form part of the request's dialog
'key' along with the callid. To cannot be changed. If you did change To
in the Level3 direction, when the request comes back you would have to
replace the
original 'To' from the UAC. I think this is, in effect, a psuedo b2bua.
I agree with Jiri, the request uri is what is important. However, you
know what they say about the 1000 pound gorilla :-)
-g
Bingo. It's about the gorilla.
Anyway, the following code snippet seems to be working with 0.8.14, though
it hasn't been extensively tested:
# replace To: with the current URI
if (subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/To:\1\u\2/ig')) {
route(1);
} else {
sl_send_reply("500", "Server Internal Error 164");
};
Since this is in a route[] block which already has the request-URI written
in e.164, this does it for us.
-Keith, TSS Support