Hi All,<br /><br />I have opensips using load_balancer module with two destinations. Both have 500 pstn resources and execute a simple application
that answers a call, plays some audio and waits for the BYE message.<br />If I place few calls (10 at the same time) all works great. However, if I
put more traffic, the pstn resources are not freed always, even if all the calls are ended gracefully and the BYE and the subsequent OK messages are
forwarded correctly.<br />I'm sure there's a problem with my configuration or my destinations. So I need to now what triggers the liberation of the
resource.<br /><br />This is my configuration script:<br /><br />####### Global Parameters #########<br /><br />debug=3<br
/>#log_facility=LOG_LOCAL6<br /><br />fork=yes<br />children=4<br /><br />/* uncomment the following lines to enable debugging */<br />#debug=6<br
/>#fork=no<br />#log_stderror=yes<br /><br />/* uncomment the next line to disable TCP (default on) */<br />disable_tcp=yes<br /><br />port=5061<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:10.180.12.6:5061<br /><br /><br />####### Modules Section ########<br /><br />#set module path<br
/>mpath="/usr/local/lib/opensips/modules/"<br /><br />loadmodule "maxfwd.so"<br />loadmodule "sl.so"<br />loadmodule
"db_mysql.so"<br />loadmodule "tm.so"<br />loadmodule "uri.so"<br />loadmodule "rr.so"<br />loadmodule
"dialog.so"<br />loadmodule "mi_fifo.so"<br />loadmodule "signaling.so"<br />loadmodule "textops.so"<br
/>loadmodule "load_balancer.so"<br />loadmodule "options.so"<br /><br /># ----------------- setting module-specific parameters
---------------<br /><br /><br /># ----- mi_fifo params -----<br />modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")<br /><br /><br /># ----- rr params -----<br /># add value to ;lr param to cope with most of the UAs<br
/>#modparam("rr", "enable_full_lr", 1)<br /># do not append from tag to the RR (no need for this script)<br
/>#modparam("rr", "append_fromtag", 0)<br />modparam("rr","enable_double_rr",1)<br
/>modparam("rr","append_fromtag",1)<br /><br /><br /># ----- uri params -----<br />modparam("uri",
"use_uri_table", 0)<br /><br />modparam("dialog", "dlg_flag", 13)<br />modparam("dialog",
"db_mode", 1)<br />modparam("dialog", "db_url", "mysql://root:Viamonte1621@localhost/opensips")<br /><br
/><br />modparam("load_balancer", "db_url","mysql://root:Viamonte1621@localhost/opensips")<br
/>modparam("load_balancer", "probing_interval", 30)<br />modparam("load_balancer", "probing_method",
"OPTIONS")<br />modparam("load_balancer", "probing_from", "sip:proxy@10.180.12.6:5061")<br /><br /><br /><br
/><br />####### Routing Logic ########<br /><br /><br /># main request routing logic<br />route{<br /> if
(!mf_process_maxfwd_header("3")) {<br /> sl_send_reply("483","looping");<br
/> exit;<br /> }<br /><br /><br /> if (!has_totag()) {<br
/> xlog("[Redmond] Hast'n to tag\n");<br
/> # initial request<br />
record_route();<br /> } else {<br /> # sequential request -> obey Route
indication<br /> xlog("[Redmond] Has to tag\n");<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
/> if (uri==myself){<br /> if (is_method("OPTIONS") && (!
uri=~"sip:.*[@]+.*")) {<br /> options_reply();<br />
exit;<br /> }<br /> }<br /><br
/> # from now on we have only the initial requests<br /> if
(!is_method("INVITE")) {<br /> xlog("[Redmond] Not invite\n");<br />
if ( t_check_trans() )<br /> t_relay();<br />
exit;<br />
#send_reply("405","Method Not Allowed");<br
/> #exit;<br />
}<br /><br /> load_balance("0","pstn");<br /><br /> # LB function
returns negative if no suitable destination (for requested resources) is found,<br /> # or if all
destinations are full<br /> if ($retcode<0) {<br />
xlog("[Redmond] Service full\n");<br /> sl_send_reply("500","Service full");<br
/> exit;<br /> }<br /><br /> xlog("[Redmond]
Selected destination is: $du\n");<br /><br /> # send it out<br /> if (!t_relay())
{<br /> sl_reply_error();<br /> }<br />}<br /><br />failure_route[1] {<br
/> xlog("[Redmond] Failure route\n");<br /> if
(t_check_status("(408)|(5[0-9][0-9])")) {<br />
lb_disable();<br /> if
(load_balance("0","pstn")) {<br
/>
t_on_failure("1");<br
/>
t_relay();<br /> } else {<br
/> <br
/>
t_reply("503", "Service Unavailable");<br
/> }<br /> }<br
/>}<br /><br />Thanks,<br />Diego