[Serusers] Ser0.8.14 + Mediaproxy
Bastian Schern
ml01 at in-bln.de
Tue Oct 19 00:50:03 CEST 2004
For me the Example works only with a small modification. I had modified
the ser.cfg in this way:
--- snip ---
debug=8
fork=yes
log_stderror=yes
check_via=no
dns=no
rev_dns=no
port=5060
children=4
fifo="/tmp/ser_fifo"
alias=es.homedns.org
alias="universe"
loadmodule "/lib/ser/modules/mysql.so"
loadmodule "/lib/ser/modules/sl.so"
loadmodule "/lib/ser/modules/tm.so"
loadmodule "/lib/ser/modules/rr.so"
loadmodule "/lib/ser/modules/maxfwd.so"
loadmodule "/lib/ser/modules/usrloc.so"
loadmodule "/lib/ser/modules/domain.so"
loadmodule "/lib/ser/modules/uri.so"
loadmodule "/lib/ser/modules/registrar.so"
loadmodule "/lib/ser/modules/textops.so"
loadmodule "/lib/ser/modules/mediaproxy.so"
loadmodule "/lib/ser/modules/auth.so"
loadmodule "/lib/ser/modules/auth_db.so"
modparam("usrloc", "db_mode", 0)
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
modparam("mediaproxy", "mediaproxy_socket", "/var/run/proxydispatcher.sock")
modparam("mediaproxy", "sip_asymmetrics",
"/etc/ser/sip-asymmetrics-clients")
modparam("mediaproxy", "rtp_asymmetrics",
"/etc/ser/rtp-asymmetrics-clients")
modparam("mediaproxy", "natping_interval", 20)
modparam("registrar", "nat_flag", 2)
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");
break;
};
if (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# Force subsequent messages to pass trough this proxy
record_route();
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;
};
if (uri==myself) {
if (method=="REGISTER") {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("universe", "subscriber")) {
www_challenge("universe", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
};
# if (is_uri_host_local()) {
if (!lookup("location")) {
sl_send_reply("404", "Not found");
break;
};
# };
} else {
sl_send_reply("403", "This domain is not served here");
break;
};
# if (method=="INVITE") {
if (method=="12345") {
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 (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();
};
}
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();
};
}
--- snap ---
Bit still I have some problems with some buggy clients they will cause
some endless loops in SER.
Is this about that warning:
12(24531) Warning: sl_send_reply: I won't send a reply for ACK!!
And my phones will not register a hangup.
Is this the reason or my bad config?
Thanks
Bastian
Ricardo Martinez schrieb:
> Hello.
> I been there. :) . It takes some time to figure it out how the
> mediaproxy works. Anyway, i'm using
> - SER v 0.8.14
> - Mediaproxy 1.2.0
> - Python 2.3
> - The ser.cfg included in /ser_directory/modules/mediaproxy/config/
> is very helpfull.
>
> It's working fine to me.
> Good Luck
>
>
> Ricardo Martinez.-
>
>
>>-----Mensaje original-----
>>De: Kiko Vives [SMTP:kiko.vives at ua.es]
>>Enviado el: Lunes, 18 de Octubre de 2004 04:45 a.m.
>>Para: serusers at lists.iptel.org
>>Asunto: Re: [Serusers] Ser0.8.14 + Mediaproxy
>>
>>Hello again.
>>
>>It happens to me too.
>>
>>Can someone gives some guidelines to make it work ? I mean, version
>>numbers for "mediaproxy.so" and mediaproxy server, and a ser.cfg sample.
>>
>>My problem is that it compiles OK and ser run without problem but it hangs
>>when I try to establish a session between two UAs using the media proxy.
>>
>>Thanks !
>>
>>Kiko
>>
>> ----- Original Message -----
>> From: md esa kamsan <mailto:mesak77 at yahoo.com>
>> To: serusers at lists.iptel.org <mailto:serusers at lists.iptel.org>
>> Sent: Monday, October 18, 2004 5:54 AM
>> Subject: [Serusers] Ser0.8.14 + Mediaproxy
>>
>> Hi ,
>>
>> Can someone help me... where is the best guide to make it run ....
>> I try several times but still failed
>>
>>
>>
>> Thx
>>
>> Esa
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam protection around
>> <http://mail.yahoo.com>
>>
>>
>> _____
>>
>>
>>
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers at lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>>
>> <<Archivo: ATT23899.txt>>
>
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list