Re: [OpenSIPS-Users] Load Balancer - Delay in clearing dialogs

2016-08-17 Thread Chandan PR
Thanks for the input Bogdan.

We found that the problem was due to some calls failing to get the response.

Since we had the dialog timeout of 6 hours, which was not in sync with
application logic, we were sending more calls than available destinations.

We have updated the dialog timeout in par with the application and this
should resolve the issue for us.

Regards,
Chandan

On Wed, Aug 17, 2016 at 3:15 PM, Bogdan-Andrei Iancu 
wrote:

> Hi Chandan,
>
> Could you check what is the status of the calls (see the "State" field) ?
> I guess the call are listed in state 5 (terminated) - and this is the
> reason why you do not see them as counted by LB.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 16.08.2016 12:47, Chandan PR wrote:
>
> Hi Guys,
>
> Opendsips Version : 1.9.x
>
> We have configured the load balancer with 8 ports.
>
> When the calls are ongoing, the lb_list shows the load balancer is running
> full.
>
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> lb_list
> Destination:: sip:192.168.248.62:5060 id=152 group=1 enabled=yes
> auto-re=on
> Resource:: channel max=4 load=4
> Destination:: sip:192.168.248.64:5060 id=153 group=1 enabled=yes
> auto-re=on
> Resource:: channel max=4 load=4
>
> When I check the dialog_list, I see some older dialogs which are yet to be
> cleared.
>
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> dlg_list | grep "callid"
> callid:: 14713396610041471339775929_ZTLT_931
> callid:: 14713396610151471339775929_ZTLT_937
> callid:: 14713396610221471339775929_ZTLT_942
> callid:: 14713396610081471339775929_ZTLT_933
> callid:: 14713396610181471339775929_ZTLT_939
> callid:: 14713396610191471339775929_ZTLT_940
> callid:: 14713396610131471339775929_ZTLT_936
> callid:: 14713396610031471339775929_ZTLT_930
> callid:: 14713396610061471339775929_ZTLT_932
> callid:: 14713396610161471339775929_ZTLT_938
> callid:: 14713396610271471339775929_ZTLT_945
> callid:: 14713396610371471339775929_ZTLT_951
> callid:: 14713396610101471339775929_ZTLT_934
> callid:: 14713396610311471339775929_ZTLT_947
> callid:: 14713396610211471339775929_ZTLT_941
> callid:: 14713396610241471339775929_ZTLT_943
> callid:: 14713396610341471339775929_ZTLT_949
> callid:: 14713396610011471339775929_ZTLT_929
> callid:: 14713396610111471339775929_ZTLT_935
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> dlg_list | grep "callid" | wc -l
> 13
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin#
>
> *Even when the lb_list shows the load as 0, I see some dialogs present and
> getting cleared after around 10-12 seconds.*
>
> What would be the impact of this delay in clearing the dialogs? Can this
> lead to lot many calls rejected with "Destination Full" (We are
> experiencing this issue in our production, where a huge number of calls
> rejected)?
>
> Is there any way to reduce this delay or clear the dialogs immediately?
>
> *Dialog Module Settings:*
>  DIALOG module
> loadmodule "dialog.so"
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
> modparam("dialog", "db_mode", 2)
> modparam("dialog", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") #
>
>
> *Load Balancer Script:*
> #
> # $Id: opensips_loadbalancer.m4 9723 2013-02-01 15:10:50Z bogdan_iancu $
> #
> # OpenSIPS loadbalancer script
> # by OpenSIPS Solutions 
> #
> # This script was generated via "make menuconfig", from
> #   the "Load Balancer" scenario.
> # You can enable / disable more features / functionalities by
> #   re-generating the scenario with different options.
> #
> # Please refer to the Core CookBook at:
> #  http://www.opensips.org/Resources/DocsCookbooks
> # for a explanation of possible statements, functions and parameters.
> #
>
>
> ### Global Parameters #
>
> debug=3
> log_stderror=no
> log_facility=LOG_LOCAL1
>
> fork=yes
> children=4
>
> /* uncomment the following lines to enable debugging */
> #debug=6
> #fork=no
> #log_stderror=yes
>
> /* uncomment the next line to enable the auto temporary blacklisting of
>not available destinations (default disabled) */
> #disable_dns_blacklist=no
>
> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>lookup failures (default disabled) */
> #dns_try_ipv6=yes
>
> /* comment the next line to enable the auto discovery of local aliases
>based on revers DNS on IPs */
> auto_aliases=no
>
>
> listen=udp:192.168.248.111:5060   # CUSTOMIZE ME
>
> disable_tcp=no
> listen=tcp:192.168.248.111:5060   # CUSTOMIZE ME
>
> disable_tls=yes
>
>
>
>
> ### Modules Section 
>
> #set module path
> mpath="/usr/local/opensips/lib64/opensips/modules/"
>
>
>
>  SIGNALING module
> loadmodule "signaling.so"
>
>  StateLess module
> loadmodule "sl.so"
>
>  Transaction Module
> loadmodule "tm.so"
> 

Re: [OpenSIPS-Users] Load Balancer - Delay in clearing dialogs

2016-08-17 Thread Bogdan-Andrei Iancu

Hi Chandan,

Could you check what is the status of the calls (see the "State" field) 
? I guess the call are listed in state 5 (terminated) - and this is the 
reason why you do not see them as counted by LB.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 16.08.2016 12:47, Chandan PR wrote:

Hi Guys,

Opendsips Version : 1.9.x

We have configured the load balancer with 8 ports.

When the calls are ongoing, the lb_list shows the load balancer is 
running full.


root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo lb_list
Destination:: sip:192.168.248.62:5060  
id=152 group=1 enabled=yes auto-re=on

Resource:: channel max=4 load=4
Destination:: sip:192.168.248.64:5060  
id=153 group=1 enabled=yes auto-re=on

Resource:: channel max=4 load=4

When I check the dialog_list, I see some older dialogs which are yet 
to be cleared.


root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo dlg_list | grep "callid"

callid:: 14713396610041471339775929_ZTLT_931
callid:: 14713396610151471339775929_ZTLT_937
callid:: 14713396610221471339775929_ZTLT_942
callid:: 14713396610081471339775929_ZTLT_933
callid:: 14713396610181471339775929_ZTLT_939
callid:: 14713396610191471339775929_ZTLT_940
callid:: 14713396610131471339775929_ZTLT_936
callid:: 14713396610031471339775929_ZTLT_930
callid:: 14713396610061471339775929_ZTLT_932
callid:: 14713396610161471339775929_ZTLT_938
callid:: 14713396610271471339775929_ZTLT_945
callid:: 14713396610371471339775929_ZTLT_951
callid:: 14713396610101471339775929_ZTLT_934
callid:: 14713396610311471339775929_ZTLT_947
callid:: 14713396610211471339775929_ZTLT_941
callid:: 14713396610241471339775929_ZTLT_943
callid:: 14713396610341471339775929_ZTLT_949
callid:: 14713396610011471339775929_ZTLT_929
callid:: 14713396610111471339775929_ZTLT_935
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo dlg_list | grep "callid" | wc -l

13
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin#

*Even when the lb_list shows the load as 0, I see some dialogs present 
and getting cleared after around 10-12 seconds.*


What would be the impact of this delay in clearing the dialogs? Can 
this lead to lot many calls rejected with "Destination Full" (We are 
experiencing this issue in our production, where a huge number of 
calls rejected)?


Is there any way to reduce this delay or clear the dialogs immediately?

*_Dialog Module Settings:_*
 DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") #


*_Load Balancer Script:_*
#
# $Id: opensips_loadbalancer.m4 9723 2013-02-01 15:10:50Z bogdan_iancu $
#
# OpenSIPS loadbalancer script
# by OpenSIPS Solutions >

#
# This script was generated via "make menuconfig", from
#   the "Load Balancer" scenario.
# You can enable / disable more features / functionalities by
#   re-generating the scenario with different options.
#
# Please refer to the Core CookBook at:
# http://www.opensips.org/Resources/DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#


### Global Parameters #

debug=3
log_stderror=no
log_facility=LOG_LOCAL1

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* comment the next line to enable the auto discovery of local aliases
   based on revers DNS on IPs */
auto_aliases=no


listen=udp:192.168.248.111:5060    # 
CUSTOMIZE ME


disable_tcp=no
listen=tcp:192.168.248.111:5060    # 
CUSTOMIZE ME


disable_tls=yes




### Modules Section 

#set module path
mpath="/usr/local/opensips/lib64/opensips/modules/"



 SIGNALING module
loadmodule "signaling.so"

 StateLess module
loadmodule "sl.so"

 Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timer", 30)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

 Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)

 MAX ForWarD module
loadmodule "maxfwd.so"

 SIP MSG OPerationS module
loadmodule "sipmsgops.so"

 FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)

[OpenSIPS-Users] Load Balancer - Delay in clearing dialogs

2016-08-16 Thread Chandan PR
Hi Guys,

Opendsips Version : 1.9.x

We have configured the load balancer with 8 ports.

When the calls are ongoing, the lb_list shows the load balancer is running
full.

root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
lb_list
Destination:: sip:192.168.248.62:5060 id=152 group=1 enabled=yes auto-re=on
Resource:: channel max=4 load=4
Destination:: sip:192.168.248.64:5060 id=153 group=1 enabled=yes auto-re=on
Resource:: channel max=4 load=4

When I check the dialog_list, I see some older dialogs which are yet to be
cleared.

root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
dlg_list | grep "callid"
callid:: 14713396610041471339775929_ZTLT_931
callid:: 14713396610151471339775929_ZTLT_937
callid:: 14713396610221471339775929_ZTLT_942
callid:: 14713396610081471339775929_ZTLT_933
callid:: 14713396610181471339775929_ZTLT_939
callid:: 14713396610191471339775929_ZTLT_940
callid:: 14713396610131471339775929_ZTLT_936
callid:: 14713396610031471339775929_ZTLT_930
callid:: 14713396610061471339775929_ZTLT_932
callid:: 14713396610161471339775929_ZTLT_938
callid:: 14713396610271471339775929_ZTLT_945
callid:: 14713396610371471339775929_ZTLT_951
callid:: 14713396610101471339775929_ZTLT_934
callid:: 14713396610311471339775929_ZTLT_947
callid:: 14713396610211471339775929_ZTLT_941
callid:: 14713396610241471339775929_ZTLT_943
callid:: 14713396610341471339775929_ZTLT_949
callid:: 14713396610011471339775929_ZTLT_929
callid:: 14713396610111471339775929_ZTLT_935
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
dlg_list | grep "callid" | wc -l
13
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin#

*Even when the lb_list shows the load as 0, I see some dialogs present and
getting cleared after around 10-12 seconds.*

What would be the impact of this delay in clearing the dialogs? Can this
lead to lot many calls rejected with "Destination Full" (We are
experiencing this issue in our production, where a huge number of calls
rejected)?

Is there any way to reduce this delay or clear the dialogs immediately?

*Dialog Module Settings:*
 DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") #


*Load Balancer Script:*
#
# $Id: opensips_loadbalancer.m4 9723 2013-02-01 15:10:50Z bogdan_iancu $
#
# OpenSIPS loadbalancer script
# by OpenSIPS Solutions 
#
# This script was generated via "make menuconfig", from
#   the "Load Balancer" scenario.
# You can enable / disable more features / functionalities by
#   re-generating the scenario with different options.
#
# Please refer to the Core CookBook at:
#  http://www.opensips.org/Resources/DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#


### Global Parameters #

debug=3
log_stderror=no
log_facility=LOG_LOCAL1

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* comment the next line to enable the auto discovery of local aliases
   based on revers DNS on IPs */
auto_aliases=no


listen=udp:192.168.248.111:5060   # CUSTOMIZE ME

disable_tcp=no
listen=tcp:192.168.248.111:5060   # CUSTOMIZE ME

disable_tls=yes




### Modules Section 

#set module path
mpath="/usr/local/opensips/lib64/opensips/modules/"



 SIGNALING module
loadmodule "signaling.so"

 StateLess module
loadmodule "sl.so"

 Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timer", 30)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

 Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)

 MAX ForWarD module
loadmodule "maxfwd.so"

 SIP MSG OPerationS module
loadmodule "sipmsgops.so"

 FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)

 URI module
loadmodule "uri.so"
modparam("uri", "use_uri_table", 0)

 MYSQL module
loadmodule "db_mysql.so"

 AVPOPS module
loadmodule "avpops.so"

 ACCounting module
loadmodule "acc.so"
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 0)
/* by default we do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable "append_fromtag"
   in "rr" module */
modparam("acc", "detect_direction", 0)