Hi everyone,<br><br>I have installed OpenSIPS 1.4.4 recently on a ubuntu 8.04, I have 3 UAC configured. Two of them are SJphone which are within the same network. One of them (Xlite) is outside the network and behind NAT. I am facing two problems.<br>
<br>1. The SJphone within network works fine but user hear his own echo.<br>2. XLite outside network giving the error "Error no audio devices available"<br><br>The config file is as follows:<br><br>####### Global Parameters #########<br>
<br>fork=yes<br>children=4<br><br>/* uncomment the following lines to enable debugging */<br>debug=6<br>log_stderror=no<br>log_facility=LOG_LOCAL0<br><br>/* uncomment the next line to disable TCP (default on) */<br>disable_tcp=yes<br>
<br>/* uncomment the next line to enable the auto temporary blacklisting of<br> not available destinations (default disabled) */<br>#disable_dns_blacklist=no<br><br>/* uncomment the next line to enable IPv6 lookup after IPv4 dns<br>
lookup failures (default disabled) */<br>#dns_try_ipv6=yes<br><br><br>port=5060<br><br>/* uncomment and configure the following line if you want opensips to<br> bind on a specific interface/port/proto (default bind on all available) */<br>
listen=udp:<a href="http://mydomain.com:5060">mydomain.com:5060</a><br>listen=udp:999.999.1.2:5060<br>listen=udp:<a href="http://127.0.0.1:5060">127.0.0.1:5060</a><br><br>#set module path<br>mpath="/usr/local/lib/opensips/modules/"<br>
alias=<a href="http://mydomain.com">mydomain.com</a><br><br>/* uncomment next line for MySQL DB support */<br>loadmodule "db_mysql.so"<br>loadmodule "sl.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>
loadmodule "maxfwd.so"<br>loadmodule "usrloc.so"<br>loadmodule "registrar.so"<br>loadmodule "textops.so"<br>loadmodule "mi_fifo.so"<br>loadmodule "uri_db.so"<br>
loadmodule "uri.so"<br>loadmodule "xlog.so"<br>loadmodule "acc.so"<br>/* uncomment next lines for MySQL based authentication support<br> NOTE: a DB (like db_mysql) module must be also loaded */<br>
loadmodule "auth.so"<br>loadmodule "auth_db.so"<br>/* uncomment next line for aliases support<br> NOTE: a DB (like db_mysql) module must be also loaded */<br>loadmodule "alias_db.so"<br>/* uncomment next line for multi-domain support<br>
NOTE: a DB (like db_mysql) module must be also loaded<br> NOTE: be sure and enable multi-domain support in all used modules<br> (see "multi-module params" section ) */<br>loadmodule "domain.so"<br>
/* uncomment the next two lines for presence server support<br> NOTE: a DB (like db_mysql) module must be also loaded */<br>#loadmodule "presence.so"<br>#loadmodule "presence_xml.so"<br><br><br># ----------------- setting module-specific parameters ---------------<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>modparam("rr", "enable_full_lr", 1)<br>modparam("rr", "append_fromtag", 0)<br>modparam("registrar", "method_filtering", 1)<br>
modparam("uri_db", "use_uri_table", 0)<br>modparam("uri_db", "db_url", "")<br><br>modparam("acc", "early_media", 1)<br>modparam("acc", "report_ack", 1)<br>
modparam("acc", "report_cancels", 1)<br>modparam("acc", "detect_direction", 0)<br>modparam("acc", "failed_transaction_flag", 3)<br>modparam("acc", "log_flag", 1)<br>
modparam("acc", "log_missed_flag", 2)<br>modparam("acc", "db_flag", 1)<br>modparam("acc", "db_missed_flag", 2)<br><br><br>modparam("usrloc", "db_mode", 2)<br>
modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "password_column", "password")<br><br><br><br>####### Routing Logic ########<br>route{<br><br> if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br> exit;<br> }<br><br> if (has_totag()) {<br> # sequential request withing a dialog should<br> # take the path determined by record-routing<br>
if (loose_route()) {<br> if (is_method("BYE")) {<br> setflag(1); # do accounting ...<br> setflag(3); # ... even if the transaction fails<br> }<br> route(1);<br>
} else {<br> /* uncomment the following lines if you want to enable presence */<br> ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {<br> ## # in-dialog subscribe requests<br>
## route(2);<br> ## exit;<br> ##}<br> if ( is_method("ACK") ) {<br> if ( t_check_trans() ) {<br> # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server<br>
t_relay();<br> exit;<br> } else {<br> # ACK without matching transaction ... ignore and discard.\n");<br> exit;<br> }<br>
}<br> sl_send_reply("404","Not here");<br> }<br> exit;<br> }<br><br> #initial requests<br><br> # CANCEL processing<br> if (is_method("CANCEL"))<br>
{<br> if (t_check_trans())<br> t_relay();<br> exit;<br> }<br><br> t_check_trans();<br><br><br> # record routing<br> if (!is_method("REGISTER|MESSAGE"))<br> record_route();<br>
<br> # account only INVITEs<br> if (is_method("INVITE")) {<br> setflag(1); # do accounting<br> }<br> if (!uri==myself)<br> /* replace with following line if multi-domain support is used */<br>
##if (!is_uri_host_local())<br> {<br> append_hf("P-hint: outbound\r\n");<br> route(1);<br> }<br><br> # requests for my domain<br><br> /* uncomment this if you want to enable presence server<br>
and comment the next 'if' block<br> NOTE: uncomment also the definition of route[2] from below */<br> ##if( is_method("PUBLISH|SUBSCRIBE"))<br> ## route(2);<br><br> if (is_method("PUBLISH"))<br>
{<br> sl_send_reply("503", "Service Unavailable");<br> exit;<br> }<br> <br><br> if (is_method("REGISTER"))<br> {<br> # authenticate the REGISTER requests (uncomment to enable auth)<br>
if (!www_authorize("", "subscriber"))<br> {<br> www_challenge("", "0");<br> exit;<br> }<br> <br><br> if (!save("location"))<br>
sl_reply_error();<br><br> exit;<br> }<br><br> if ($rU==NULL) {<br> # request with no Username in RURI<br> sl_send_reply("484","Address Incomplete");<br> exit;<br>
}<br><br> # apply DB based aliases (uncomment to enable)<br> ##alias_db_lookup("dbaliases");<br><br> if (!lookup("location")) {<br> switch ($retcode) {<br> case -1:<br> case -3:<br>
t_newtran();<br> t_reply("404", "Not Found");<br> exit;<br> case -2:<br> sl_send_reply("405", "Method Not Allowed");<br>
exit;<br> }<br> }<br><br> # when routing via usrloc, log the missed calls also<br> setflag(2);<br><br> route(1);<br>}<br><br><br>route[1] {<br> # for INVITEs enable some additional helper routes<br>
if (is_method("INVITE")) {<br> t_on_branch("2");<br> t_on_reply("2");<br> t_on_failure("1");<br> }<br><br> if (!t_relay()) {<br> sl_reply_error();<br>
};<br> exit;<br>}<br><br><br>branch_route[2] {<br> xlog("new branch at $ru\n");<br>}<br><br><br>onreply_route[2] {<br> xlog("incoming reply\n");<br>}<br><br><br>failure_route[1] {<br> if (t_was_cancelled()) {<br>
exit;<br> }<br><br>}<br><br><br><br>