Hi all,

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:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.20:5060;branch=z9hG4bK4f70ea70
From: "Ovi Sas" <sip:[EMAIL PROTECTED]>;tag=as048c5bed
To: <sip:[EMAIL PROTECTED]>
Contact: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]>;tag=as048c5bed
To: <sip:[EMAIL PROTECTED]>
Contact: <sip:[EMAIL PROTECTED]:5060>
Call-ID: [EMAIL PROTECTED]
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

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to