Hello,
Here my report ;-)
I used the following code:
# ------------- avp parameters
modparam("avpops", "avp_url",
"mysql://ser:heslo@localhost/ser")
modparam("avpops", "avp_table", "location")
modparam("avpops", "username_column", "username")
modparam("avpops", "domain_column", "domain")
modparam("avpops", "value_column", "contact")
and then...
# Force rtpproxy for users that are behind a Port Restricted Cone NAT (eg.
for us: IP=xxx.xxx.xxx.xxx)
avp_write("$ruri/domain","s:contact");
if (src_ip == xxx.xxx.xxx.xxx |
avp_check("s:contact","eq/xxx.xxx.xxx.xxx/g")) {
fix_nated_contact(); # Rewrite contact with source IP of signalling
force_rport(); # Add rport parameter to topmost Via
setflag(6);
log(1, "Call to Port Restricted Cone NAT...\n");
}
...and it works!
Thanks for your help!!
Sebastian
----- Original Message -----
From: "Klaus Darilion" <klaus.mailinglists(a)pernau.at>
To: "Sebastian Kühner" <skuehner(a)veraza.com>
Cc: <serusers(a)lists.iptel.org>
Sent: Thursday, July 28, 2005 1:03 PM
Subject: Re: [Serusers] Dest IP
If I understand your problem correctly you want this
IP address?
user ----> ser -----> user
^^^^
dst_ip
Just an idea: you may try to write the the ruri/domain into an AVP using
avpops (after lookup("location")). Then try using avp_check, and report
if this works :-)
regards,
klaus
Sebastian Kühner wrote:
> Hello,
>
> I need the destination IP of the user of the first INVITE message
(user ->
ser)... but
dst_ip == xxx.xxx.xxx.xxx gives me the IP of ser.
The problem is that I only want to force the rtp_proxy if the users are
behind a Port restricted cone NAT (the scr-ips of them are known)
Here is my code:
# Force rtpproxy for users that are behind a Port Restricted Cone NAT
if ((src_ip == xxx.xxx.xxx.xxx | dst_ip == xxx.xxx.xxx.xxx) &&
!(uri=~"sip:[0-9]{9,30}@.*")) {
fix_nated_contact(); # Rewrite contact with source IP of signalling
force_rport(); # Add rport parameter to topmost Via
setflag(6);
}
Has anyone an idea how I can get the IP of the user? For example in the
location database?
Thanks!
Sebastian
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers