Hi ALL;
I have been trying to work with ser+mediaproxy but I have one way audio problem
I have the following network:
UA (private ip)--------------------unix nat router------------------(public-ip)ser+mediaproxy-------------------------------UA(public ip)
1) I donot use any db for domain.so , what is it?
2) I run it with /etc/init.d/mediaproxy suuceccfully. how do you run it???????????
3) It appears ser canot find mediaproxy while I can run it successfully.I got the following errors :
0(5982) DBT:dbt_load_file: request for table [domain] 0(5982) DBT:dbt_load_file: db is [/usr/local/etc/ser/] 0(5982) DBT:dbt_load_file: loading file [/usr/local/etc/ser/] 0(5982) DTB:dbt_db_get_table: domain
Content of [domain]
0(5982) DBT:db_query: table not loaded! 0(5982) DBT:db_query: error while quering table! 0(5982) is_local(): Error while querying database 0(5982) parse_headers: flags=33554432 0(5982) DBT:db_query: table not loaded! 0(5982) DBT:db_query: error while quering table! 0(5982) is_local(): Error while querying database 0(5982) error: mediaproxy/sendMediaproxyCommand(): can't connect to MediaProxy
**********************************************************************************************************************************
MY ser.cfg is also as follows:
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"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database #loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" #loadmodule "/usr/local/lib/ser/modules/nathelper.so" loadmodule "/usr/local/lib/ser/modules/mediaproxy.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/dbtext.so" loadmodule "/usr/local/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! #loadmodule "/usr/local/lib/ser/modules/auth.so" #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database # for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# -- auth params -- # Uncomment if you are using auth module # #modparam("auth_db", "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to yes (which true in this config), # uncomment also the following parameter) # #modparam("auth_db", "password_column", "password")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
#NAT & RT #modparam("registrar", "nat_flag", 6) modparam("mediaproxy", "natping_interval",30) modparam("mediaproxy", "mediaproxy_socket", "var/run/mediaproxy.sock") modparam("mediaproxy", "sip_asymmetrics", "/usr/local/etc/ser/mediaproxy/sip-asymmetric-clients") modparam("mediaproxy", "rtp_asymmetrics", "usr/local/etc/ser/mediaproxy/rtp-asymmetric-clients")
# ------------------------- 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"); break; }; if ( msg:len > max_len ) { sl_send_reply("513", "Message too big"); break; };
# we record-route all messages -- to make sure that
record_route(); # loose-route processing if (loose_route()) { t_relay(); break; };
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) { log(1, "REQUEST FOR SERVED DOMAIN------------------");
if(method=="REGISTER"){ if (client_nat_test("3")){ setflag(6); force_rport(); fix_contact(); };
save("location"); break; }
if(!lookup("location")) { sl_send_reply("404", "not found"); break(); }
};
if (method=="INVITE"){ record_route(); };
if (client_nat_test("3") && !search("^Record-Route:")) { force_rport(); fix_contact(); };
if (method=="INVITE") { t_on_reply("1"); };
if (method=="INVITE" || method=="ACK") { use_media_proxy(); };
#we forwad to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP if (!t_relay()) { if (method=="INVITE" || method=="ACK"){ end_media_session(); }; sl_reply_error(); };
}
onreply_route[1]{ if(status=~"[12][0-9][0-9]"){
if (client_nat_test("1")) { fix_contact(); }; use_media_proxy(); };
}
Warmest Regards mohammad