Hello,
to resolve the problem you describe the script would have to be executed
for every branch, i.e. the last condition in your example should be
executed for sip:10.20.0.100:5060 and also for sip:192.44.30.122:16621.
That's currently not possible, because the script will be executed for
one branch only.
We have it on our todo list, contributions are welcome.
Jan.
On 08-10 15:06, Yang Xiang wrote:
Hi,
a user, we say yang, is registered from different locations, therefor there
are multiple contacts in the location table like this:
---------------------------------
aor : 'yang@domain'
Contact: 'sip:10.20.0.100:5060'
q: 1.00
aor :'yang@domain'
Contact: 'sip:192.44.30.122:16621'
q: 0.00
-----------------------------------
I have configured SER as following:
---------------------------
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
if (!uri=~"^sip:(.+@)?(10\.20\.).*") {
forward("192.168.252.2");
break;
};
t_relay();
------------------------------
That says the INVITE should be forwarded to an outbound proxy 192.168.252.2
if the user is not located in our internal network, e.g. 10.20.0.0/24.
However, the Request-URI will be overwritten with the highest-q rated
contact, in this case with the contact 'sip:10.20.0.100:5060' and the
if-block will be skiped. This induces the INVITE to
'sip:192.44.30.122:16621' will be also directly sent but not via our
outbound proxy 192.168.252.2, what means the messages will be discarded by
the firewall.
Is there any chance to resolve this problem?
Thanks
Yang
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers