2008/1/17, Andreti <mbedial(a)gmail.com>om>:
Hi everybody,
I'm working with Openser + Mediaproxy 1.9.0 and it seems that everything
is
working when the calls are establised between users attached to the same
proxy server, even with different kind of NATs.
However It doen't work in 2 different scenarios, and the result is exactly
the same , the video and audio is only sent in one way.
Scenario 1
========
User A attached to the SIP proxy xxx.xxx.xxx.13 (Public IP) calls to a GW
xxx.xxx.xxx.11 (Public IP) with several users internally associated. In
this case the user A can see the video and audio sent by the GW, but the
GW
doesn't receive any RTSP stream. It seems that the mediaproxy doesn't do
anything, why? maybe because the GW blongs to other domain (xxx.xxx.xxx.11
)
? What can I do?
If the GW calls to user A, it works fine (I can see the session in the
mediaproxy with sessions.py)
Scenario 2
========
In this case, I have another GW with Public IP address xxx.xxx.xxx.14, but
it doesn't include in the INVITE message the SDP body. The GW calls to the
same user attached to the SIP proxy xxx.xxx.xxx.13 , and the behaviour is
exactly the same as scenario 1, the calling site can sse the video and
audio
but the called can't.
Unlike the previous scenario, the signalling is:
INVITE without SDP --> 200 OK (SDP) -- > ACK (SDP)
In theory, Mediaproxy 1.9.0 should support this procedure since it's a
SIP
standard mechanism, however the called party doesn't receive RTP stream.
In
my opinion, the problem could be related to scenario 1, I mean , the
calling
party is not attached to the SIP proxy (belongs to other domain) and when
the 200 OK (SDP) message arrives to the SIP proxy, the mediaproxy doesn't
do
anything
Sorry for the complex explanation. I've waste a lot of time trying to
solve
this solution and honestly I don't know what to do. Please, could somebody
help??
I attach my openser.conf. I hope it helps.
Andreti
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# setflag(ACCOUNTING_FLAG);
# avp_write("SER_IP","$avp(s:sip-proxy)");
# avp_write("$ru", "$avp(can_uri)");
if (!method=="REGISTER") record_route();
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
if(is_method("BYE"))
{ # log it all the time
acc_rad_request("200 ok");
acc_log_request("200 ok");
setflag(1);
}
route(1);
};
if (src_ip==193.36.177.227) {
fix_nated_sdp("2");
};
if(is_method("INVITE") && !has_totag())
{ # set the acc flags
setflag(1);
setflag(2);
};
if (method=="MESSAGE") {
setflag(1);
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
};
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest
if (!radius_www_authorize(""))
{
www_challenge("","1");
exit;
}
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
save("location");
exit;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
# log to acc as missed call
acc_rad_request("404 Not Found");
acc_log_request("404 Not Found");
sl_send_reply("404", "Not Found");
exit;
};
};
if (method=="INVITE") {
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
#if ((method=="INVITE" || method=="ACK") &&
!to_uri=="sip:frog1@xxx.xxx.10.12") {
# use_media_proxy();
#};
t_relay();
return;
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
append_hf("P-hint: usrloc applied\r\n");
# route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}
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();
};
}