[OpenSER-Devel] [ openser-Bugs-1816565 ] Automatic mangling of
Contact header and SDP in mhomed mode
SourceForge.net
noreply at sourceforge.net
Sat Oct 20 08:24:46 CEST 2007
Bugs item #1816565, was opened at 2007-10-19 10:18
Message generated for change (Comment added) made by osas
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1816565&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: Automatic mangling of Contact header and SDP in mhomed mode
Initial Comment:
Strange behavior for openser 1.3 in mhomed mode (automatic mangling of Contact header and c= line of SDP)
I was playing with openser 1.3 in a multihomed setup.
In this setup, I noticed that by default, openser is mangling the Contact header and the sdp.
I stripped down the config to bare minimum to see if it was something related to my config, but it seems that this is not related to the config.
Here's the stripped down config that I used:
# ----------- global configuration parameters ------------------------
debug=3
fork=yes
log_stderror=no
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
auto_aliases=no
listen=udp:br0
listen=udp:eth1
children=1
mhomed=1
disable_tcp=yes
disable_dns_blacklist=true
# ------------------ module loading ----------------------------------
mpath="/opt/lib/openser/modules"
loadmodule "sl.so"
loadmodule "tm.so"
# -- tm params --
modparam("tm", "fr_inv_timer", 100)
modparam("tm", "fr_inv_timer_avp", "$avp(i:26)")
modparam("tm", "fr_timer", 10)
modparam("tm", "fr_timer_avp", "$avp(i:25)")
modparam("tm", "noisy_ctimer", 1)
modparam("tm", "onreply_avp_mode", 1)
loadmodule "rr.so"
# --- request routing logic -----
# main routing logic
route{
if (!method=="REGISTER") {
record_route();
}
if (loose_route()) {
route(1);
};
if (!uri==myself) {
route(1);
};
if (uri==myself) {
sl_send_reply("404", "Not Found");
exit;
};
route(1);
}
route[1] {
if (!t_relay()) {
sl_reply_error();
};
exit;
}
Here's the network setup:
<asterisk box> --- < openser > --- <SIP server>
<192.168.2.20> --- <192.168.2.1 : EXTERNAL_IP> --- <SIP_SERVER>
And here's an ngrep of the initial INVITEs:
23:53:31.439678 IP 192.168.2.20.sip > 192.168.2.1.sip: SIP, length: 819
INVITE sip:callee at SIP_SERVER SIP/2.0
Via: SIP/2.0/UDP 192.168.2.20:5060;branch=z9hG4bK4f70ea70
From: "Ovi Sas" <sip:caller at SIP_SERVER>;tag=as048c5bed
To: <sip:callee at SIP_SERVER>
Contact: <sip:caller at 192.168.2.20>
Call-ID: 28aedce563bc57dc2cac78967e69c141 at SIP_SERVER
CSeq: 102 INVITE
User-Agent: asterisk
Max-Forwards: 70
Date: Thu, 18 Oct 2007 04:23:04 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 285
v=0
o=root 8560 8560 IN IP4 192.168.2.20
s=session
c=IN IP4 192.168.2.20
t=0 0
m=audio 34028 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
23:53:31.454727 IP EXTERNAL_IP.sip > SIP_SERVER.sip: SIP, length: 1011
INVITE sip:callee at SIP_SERVER SIP/2.0
Record-Route: <sip:EXTERNAL_IP;r2=on;lr;ftag=as048c5bed>
Record-Route: <sip:192.168.2.1;r2=on;lr;ftag=as048c5bed>
Via: SIP/2.0/UDP EXTERNAL_IP:5060;branch=z9hG4bKea4e.7aacc885.0
Via: SIP/2.0/UDP 192.168.2.20:5060;branch=z9hG4bK4f70ea70
From: "Ovi Sas" <sip:caller at SIP_SERVER>;tag=as048c5bed
To: <sip:callee at SIP_SERVER>
Contact: <sip:caller at EXTERNAL_IP:5060>
Call-ID: 28aedce563bc57dc2cac78967e69c141 at SIP_SERVER
CSeq: 102 INVITE
User-Agent: asterisk
Max-Forwards: 70
Date: Thu, 18 Oct 2007 04:23:04 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 286
v=0
o=root 8560 8560 IN IP4 192.168.2.20
s=session
c=IN IP4 EXTERNAL_IP
t=0 0
m=audio 34028 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
Please note the Contact header and the c= line inside SDP.
Is there a way to bypass this behaviour?
Using the nathelper module doesn't seem to help (the Contact header will still carry the EXTERNAL_IP.
Regards,
Ovidiu Sas
http://openser.org/pipermail/users/2007-October/013819.html
----------------------------------------------------------------------
>Comment By: Ovidiu Sas (osas)
Date: 2007-10-20 02:24
Message:
Logged In: YES
user_id=1395524
Originator: YES
This issue seems to be related to the conntrack module ...
Closing as invalid.
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2007-10-19 11:42
Message:
Logged In: YES
user_id=1395524
Originator: YES
Hi Klaus,
I was under the same impression (that openser never changes Contact/SDP
except when told to do so). I was testing openser on a router running
dd-wrt V.23 SP2 std.
Here's the output of my lsmod (it doesn't load any sip modules ...)
# lsmod
Module Size Used by
ip_nat_pptp 2284 0 (unused)
ip_conntrack_pptp 2812 1
ip_nat_proto_gre 1552 0 (unused)
ip_conntrack_proto_gre 2440 0 [ip_nat_pptp ip_conntrack_pptp]
ext2 41528 1
sd_mod 12500 2
usb-storage 68624 1
scsi_mod 70616 2 [sd_mod usb-storage]
ehci-hcd 20556 0 (unused)
usbcore 74808 0 [usb-storage ehci-hcd]
jffs2 175668 1
crc32 3152 0 [jffs2]
wl 423640 0 (unused)
diag 2560 0 (unused)
I will dig more into this issue.
Regards,
Ovidiu Sas
----------------------------------------------------------------------
Comment By: Klaus Darilion (klaus_darilion)
Date: 2007-10-19 10:44
Message:
Logged In: YES
user_id=1318360
Originator: NO
I'm quite sure openser never changes Contact/SDP except when told to do
so. Some time ago someone had the same problem which was caused by Linux
netfilter sip_conntrack module. Make sure you do not have something similar
activated.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1816565&group_id=139143
More information about the Devel
mailing list