<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">HI,<br>
<br>
here is also my log:<br>
<a class="moz-txt-link-freetext" href="http://pastebin.com/iD8V9VPr">http://pastebin.com/iD8V9VPr</a><br>
<br>
br,<br>
miha<br>
<br>
Dne 1/2/2013 1:15 PM, piše Miha:<br>
</div>
<blockquote cite="mid:50E424E4.5050700@softnet.si" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<small>HI to everyone:),<br>
<br>
I need a little help. I am new to opensips, right now I am
implementing load_balancar which is for now working:)<br>
ok, problem is when calls go from opensips to fs (fs for media
handling), fs bridge back call to opensips, which sends call to
phone (both phones are registered to opensips). After second
user pickups call, call is being canceled by opensips.<br>
<br>
If call is send to user, which is not registered to opensips
call is ok.<br>
<br>
Thanks!<br>
<br>
Miha<br>
<br>
[root@localhost tmp]# cat /usr/local/etc/opensips/opensips.cfg<br>
####### Global Parameters #########<br>
<br>
debug=4<br>
log_stderror=no<br>
log_facility=LOG_LOCAL7<br>
<br>
fork=yes<br>
children=4<br>
<br>
disable_tcp=no<br>
<br>
dns_try_ipv6=no<br>
<br>
auto_aliases=no<br>
<br>
/* bind on the machine's virtual ip (note: enable
sys.net.ipv4.ip_nonlocal_bind) */<br>
listen=udp:xxx.xxx.xxx.xxx:5060<br>
listen=tcp:xxx.xxx.xxx.xxx:5060<br>
<br>
####### Modules Section ########<br>
<br>
#set module path<br>
mpath="/usr/local/lib/opensips/modules/"<br>
<br>
loadmodule "db_mysql.so"<br>
loadmodule "signaling.so"<br>
loadmodule "sl.so"<br>
loadmodule "tm.so"<br>
loadmodule "rr.so"<br>
loadmodule "uri.so"<br>
loadmodule "usrloc.so"<br>
loadmodule "dialog.so"<br>
loadmodule "maxfwd.so"<br>
loadmodule "textops.so"<br>
loadmodule "mi_fifo.so"<br>
loadmodule "dispatcher.so"<br>
loadmodule "load_balancer.so"<br>
loadmodule "sipmsgops.so"<br>
loadmodule "auth_db.so"<br>
loadmodule "auth.so"<br>
loadmodule "domain.so"<br>
loadmodule "alias_db.so"<br>
loadmodule "presence.so"<br>
loadmodule "presence_xml.so"<br>
loadmodule "registrar.so"<br>
loadmodule "aaa_radius.so" <br>
loadmodule "acc.so"<br>
loadmodule "auth_aaa.so"<br>
loadmodule "siptrace.so"<br>
#loadmoudle "aaa_radius.so"<br>
<br>
# ----------------- setting module-specific parameters
---------------<br>
<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>
<br>
modparam("dialog", "db_mode", 1)<br>
modparam("dialog", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
<br>
modparam("rr", "enable_double_rr", 1)<br>
modparam("rr", "append_fromtag", 1)<br>
<br>
modparam("tm", "fr_timer", 2)<br>
<br>
#USRLOCK<br>
modparam("usrloc",
"db_url","mysql://root:soft1234@localhost/opensips")<br>
modparam("usrloc", "db_mode", 2)<br>
<br>
modparam("dispatcher", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
modparam("usrloc", "db_mode", 2)<br>
<br>
modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>
modparam("dispatcher", "ds_ping_interval", 5)<br>
modparam("dispatcher", "ds_probing_threshhold", 2)<br>
modparam("dispatcher", "ds_probing_mode", 1)<br>
<br>
modparam("load_balancer", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
modparam("load_balancer", "db_table", "load_balancer")<br>
modparam("load_balancer", "probing_method", "OPTIONS")<br>
modparam("load_balancer", "probing_interval", 5)<br>
<br>
<br>
#DB<br>
<br>
modparam("auth_db", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
modparam("auth_db", "load_credentials", "")<br>
modparam("auth_db", "calculate_ha1", yes)<br>
modparam("auth_db", "password_column", "password")<br>
<br>
modparam("alias_db", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
<br>
modparam("domain", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
<br>
#RADIUS<br>
modparam("acc", "aaa_url",
"radius:/usr/local/etc/radiusclient-ng/radiusclient.conf")<br>
modparam("auth_aaa", "aaa_url",
"radius:/usr/local/etc/radiusclient-ng/radiusclient.conf")<br>
<br>
#PRESENCE<br>
modparam("presence|presence_xml", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
modparam("presence_xml", "force_active", 1)<br>
#modparam("presence", "server_address", <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="sip:192.168.30.3:5060">"sip:192.168.30.3:5060"</a>)<br>
<br>
<br>
#URI<br>
modparam("uri", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
<br>
#SIPTRACE<br>
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>
modparam("siptrace", "db_url",
"mysql://root:soft1234@localhost/opensips")<br>
####### Routing Logic ########<br>
<br>
# based on <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.opensips.org/index.php?n=Resources.DocsTutLoadbalancing">http://www.opensips.org/index.php?n=Resources.DocsTutLoadbalancing</a><br>
route{<br>
xlog("L_ERR", "time [$Tf] method ($rm) r-uri ($ru) 2nd
via ($hdr(via[1]))\n");<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br>
<br>
if (!has_totag()) {<br>
# initial request<br>
record_route();<br>
}<br>
else {<br>
# sequential request - obey the indicated route<br>
loose_route();<br>
t_relay();<br>
exit;<br>
}<br>
<br>
# handle cancel and re-transmissions<br>
if ( is_method("CANCEL") ) {<br>
if ( t_check_trans() )<br>
t_relay();<br>
exit;<br>
}<br>
<br>
<br>
<br>
# from now on we have only the initial requests<br>
<br>
# select the node that'll handle the call (load
balanced)<br>
# the method used is different for invite/register
requests<br>
# unknown methods are rejected here<br>
<br>
if (is_method("REGISTER")) {<br>
$var(auth_code) = www_authorize("",
"subscriber");<br>
if ( $var(auth_code) == -1 || $var(auth_code) ==
-2 ) {<br>
xlog("L_NOTICE","Auth error for $fU@$fd
from $si cause $var(auth_code)");<br>
}<br>
if ( $var(auth_code) < 0 ) {<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
if (!db_check_to()) {<br>
sl_send_reply("403","Forbidden auth
ID");<br>
exit;<br>
} <br>
if (!save("location"))<br>
sl_reply_error();<br>
exit;<br>
}<br>
#RADIUS ATHENTICATION<br>
xlog ("L_NOTICE","si $si");<br>
<br>
if(!ds_is_in_list("$si", ""))<br>
{<br>
if (!aaa_www_authorize(""))<br>
{<br>
www_challenge("", "1");<br>
}<br>
}<br>
}<br>
xlog ("L_NOTICE","si $si");<br>
trace_dialog();<br>
if (is_method("INVITE"))<br>
{<br>
xlog ("L_NOTICE","si $si");<br>
if(!ds_is_in_list("$si", ""))<br>
{<br>
if
(!load_balance("1","pstn","1"))<br>
{<br>
sip_trace();<br>
send_reply("503","Service
Unavailable");<br>
exit;<br>
}<br>
<br>
}<br>
else<br>
{<br>
if (db_get_auth_id("$ru",
"$avp(auth_id)", "$avp(auth_realm)"))<br>
{<br>
if (lookup("location"))<br>
{<br>
xlog("L_NOTICE","du $du ru $ru rU $rU");<br>
t_relay();<br>
}<br>
}<br>
else<br>
{<br>
xlog("L_NOTICE","user ni in klic
gre na sbc");<br>
rewritehostport("xxx.xxx.xxx.xxx:5060");<br>
}<br>
<br>
<br>
}<br>
<br>
}<br>
}<br>
else<br>
{<br>
send_reply("405","Method Not Allowed");<br>
exit;<br>
}<br>
<br>
# route the request<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
}</small> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>