davor jovanovic wrote:
I have already tried something like that but it
doesn't work. I already have
failure route and it works fine for numerical destinations, that is, if user
isn't in usrloc call is redirected to GW (if I call him by alias). But when
I try to replace original sip address with one in aliases
[lookup("aliases"); -> rewritehostport] SER doesn't do it. Instead of
"rewritehostport" I should have something that will rewrite username with
alias not just host and port.
But that's exactly what lookup("aliases") does.
Let's say you have a user "foo" with the URI "sip:foo@bar.com" in
your
location table, and an alias "sip:+12345@your.gw.ip" for this user, then
in failure route the URI "sip:foo@bar.com" is replaced by
"sip:+12345@your.gw.ip" when calling lookup("aliases");
The rewritehostport() is only needed when the host/port part in the
aliases table doesn't reflect your real PSTN gateway.
Andy