Hi!!
We work with ser 0.8.14, and mediaproxy. As clients we are using two
Windows
Messenger 4.7 in two different ADSL (NATed) lines connecting to SER in
a
public Internet address.
The scenario is as follows:
The sip server is listening on 194.179.25.55. The user
chano@ wmserver.hi.inet on the machine sayuritra (private address:
172.26.0.52, public address: 217.125.212.22) calls to the user
raquel(a)wmserver.hi.inet on hobbes (private address: 192.168.1.34,
public
addess: 80.32.97.245). The messages captured in the sip server are the
following:
U 217.125.212.22:10094 -> 194.179.25.55:5060
INVITE sip:raquel@wmserver.hi.inet SIP/2.0..Via: SIP/2.0/UDP
172.26.0.52:13552..
From: "chano" <sip:chano@wmserver.hi.inet>;tag=181d13b4-e1f
0-4dbd-9606-18e52b57dbf6..To: <sip:raquel@wmserver.hi.inet>.
.Call-ID: ab9bb0f1-3a43-4ecd-a787-03a439714bda@172.26.0.52..CSeq: 1
INVITE..
Contact: <sip:172.26.0.52:13552>..User-Agent: Windows
RTC/1.0..Content-Type: application/sdp..
Content-Length: 529....v=0..o=sayuritra 0 0 IN I
P4 172.26.0.52..s=session..c=IN IP4 172.26.0.52..b=CT:1000..t=0 0..
m=audio 38370 RTP/AVP 97 111 112 6 0 8 4 5 3 101..a=rtpmap:97
red/8000..
a=rtpmap:111 SIREN/16000..a=fmtp:111 bitrate=16000..a=rtpmap:112
G7221/16000.
.a=fmtp:112 bitrate=24000..a=rtpmap:6 DVI4/16000..a=rtpmap:0
PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:4 G723/8000.
.a=rtpmap:5 DVI4/8000..a=rtpmap:3 GSM/8000..a=rtpmap:101 telephone-
event/8000..a=fmtp:
101 0-16..m=video 14490 RTP/AVP 34 31..a=rtpmap:34
H263/90000..a=rtpmap:31 H261/90000..
U 194.179.25.55:5060 -> 217.125.212.22:10094
SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP
172.26.0.52:13552;
rport=10094;received=217.125.212.22..From: "chano"
<sip:chano@wmserver.hi.inet>;
tag=181d13b4-e1f0-4dbd-9606-18e52b57dbf6..To:
<sip:raquel@wmserver.hi.inet>..Call-ID: ab9bb0f1-3a43-4ecd-a787-0
3a439714bda@172.26.0.52..CSeq: 1 INVITE..Server: Sip EXpress router
(0.8.14 (i386/linux))..
Content-Length: 0..Warning: 392 194.179.25.55:50
60 "Noisy feedback tells: pid=987 req_src_ip=217.125.212.22
req_src_port=10094
in_uri=sip:raquel@wmserver.hi.inet out_uri=sip:80.32.97.245:10052
via_cnt==1"....
U 194.179.25.55:5060 -> 80.32.97.245:10052
INVITE sip:80.32.97.245:10052 SIP/2.0..Max-Forwards: 10..Record-
Route: <sip:raquel@194.179.25.55;ftag=181d13b4-e1f0-4dbd-
960618e52b57dbf6;lr>..Via: SIP/2.0/UDP
194.179.25.55;branch=z9hG4bK8f9a.26d2ad44.0..Via: SIP/2.0/UDP
172.26.0.52:13552;rport=10094;received=217.125.212.22..From: "chano"
<sip:chano@wmserver.hi.inet>;tag=181d13b4-e1f0-4dbd-9606-
18e52b57dbf6..To: <sip:raquel@wmserver.hi.inet>..Call-ID: ab9bb0f1-
3a43-4ecd-a787-03a439714bda@172.26.0.52..CSeq: 1 INVITE..Contact:
<sip:217.125.212.22:10094>..User-Agent: Windows RTC/1.0..Content-Type:
application/sdp..Content-Length: 529....v=0..o=sayuritra 0 0 IN IP4
172.26.0.52..s=session..c=IN IP4 172.26.0.52..b=CT:1000..t=0
0..m=audio 38370 RTP/AVP 97 111 112 6 0 8 4 5 3 101..a=rtpmap:97
red/8000..a=rtpmap:111 SIREN/16000..a=fmtp:111
bitrate=16000..a=rtpmap:112 G7221/16000..a=fmtp:112
bitrate=24000..a=rtpmap:6 DVI4/16000..a=rtpmap:0 PCMU/8000..a=rtpmap:8
PCMA/8000..a=rtpmap:4 G723/8000..a=rtpmap:5 DVI4/8000..a=rtpmap:3
GSM/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..m=video
14490 RTP/AVP 34 31..a=rtpmap:34 H263/90000..a=rtpmap:31 H261/90000..
U 80.32.97.245:10052 -> 194.179.25.55:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP
194.179.25.55;branch=z9hG4bK8f9a.26d2ad44.0..Via: SIP/2.0/UDP
172.26.0.52:13552;rport=10094;received=217.125.212.22..From: "chano"
<sip:chano@wmserver.hi.inet>;tag=181d13b4-e1f0-4dbd-9606-
18e52b57dbf6..To: <sip:raquel@wmserver.hi.inet>;tag=4410fcfd-ae51-494e-
a0ff-47c34ab309cb..Call-ID: ab9bb0f1-3a43-4ecd-a787-
03a439714bda@172.26.0.52..CSeq: 1 INVITE..User-Agent: Windows
RTC/1.0..Content-Length: 0....
U 80.32.97.245:10052 -> 194.179.25.55:5060
SIP/2.0 400 Bad Request..Via: SIP/2.0/UDP
194.179.25.55;branch=z9hG4bK8f9a.26d2ad44.0..Via: SIP/2.0/UDP
172.26.0.52:13552;rport=10094;received=217.125.212.22..From: "chano"
<sip:chano@wmserver.hi.inet>;tag=181d13b4-e1f0-4dbd-9606-
18e52b57dbf6..To: <sip:raquel@wmserver.hi.inet>;tag=4410fcfd-ae51-494e-
a0ff-47c34ab309cb..Call-ID: ab9bb0f1-3a43-4ecd-a787-
03a439714bda@172.26.0.52..CSeq: 1 INVITE..Record-Route:
<sip:raquel@194.179.25.55;ftag=181d13b4-e1f0-4dbd-9606-18e52b57dbf6;lr>
..User-Agent: Windows RTC/1.0..Content-Length: 0....
My ser.cfg is:
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
listen=194.179.25.55
loadmodule "/usr/lib/ser/modules/postgres.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/textops.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/uri.so"
loadmodule "/usr/lib/ser/modules/domain.so"
loadmodule "/usr/lib/ser/modules/mediaproxy.so"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "user_column", "user_id")
modparam("usrloc", "db_url",
"sql://ser:ser@localhost:5432/ser")
modparam("auth_db", "user_column", "user_id")
modparam("auth_db", "db_url",
"sql://ser:ser@localhost:5432/ser")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("domain", "db_mode", 1)
modparam("domain", "domain_table", "subscriber")
modparam("domain", "db_url",
"sql://ser:ser@localhost:5432/ser")
modparam("uri", "db_url",
"sql://ser:ser@localhost:5432/ser")
modparam("uri", "uri_table", "uri")
modparam("uri", "uri_user_column", "user_id")
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
route{
if (!mf_process_maxfwd_header("10")) {
if (method!="ACK") {
sl_send_reply("483", "Too many hops");
};
break;
};
if (msg:len >= max_len) {
if (method!="ACK") {
sl_send_reply("513", "Message too big");
};
break;
};
if (method=="REGISTER") {
if (is_from_local()) {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("wmserver.hi.inet", "subscriber")) {
www_challenge("wmserver.hi.inet", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
} else {
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || is_uri_host_local())) {
sl_send_reply("403", "Relaying is forbidden");
break;
};
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
# Force subsequent messages to pass trough this proxy
if (method == "INVITE") {
record_route();
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (is_uri_host_local()) { # join with next if?
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
Any ideas?.Can this problem be solved?
Thanks in advance.
Show replies by date