<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I am having trouble with the new function in 1.9.0 lb_count_call.
Please look at the snippet below.<br>
<br>
failure_route[1]<br>
{<br>
...<br>
<blockquote>xlog("L_WARN", "trying to count call ip=$dlg_val(route)
port=$dp group=$dlg_val(balance_pool)
resource=$dlg_val(balance_resource)\n");<br>
</blockquote>
<blockquote>if ($dlg_val(balance_pool) = "1")<br>
{<br>
if (lb_is_destination("$dlg_val(route)", "$dp", "1", "1"))<br>
{<br>
xlog("L_WARN", "counting call!\n");<br>
if (lb_count_call("$dlg_val(route)", "$dp", "1",
"$dlg_val(balance_resource)"))<br>
{<br>
xlog("L_WARN", "call counted on sip:$du:$dp\n");<br>
}<br>
}<br>
}<br>
<br>
</blockquote>
...<br>
}<br>
<br>
Here is the output I see in my log file:<br>
<br>
<blockquote>Feb 9 15:53:07 opensips-vm /sbin/opensips[16562]:
trying to count call ip=xxx.xxx.xxx.xxx port=5060 group=1
resource=pstn<br>
Feb 9 15:53:07 opensips-vm /sbin/opensips[16562]: counting call!<br>
Feb 9 15:53:07 opensips-vm /sbin/opensips[16562]:
ERROR:load_balancer:lb_count_call: no destination to match the
given IP and port (xxx.xxx.xxx.xxx:5060)<br>
</blockquote>
Notice that it gets a positive result when calling
lb_is_destination, however, lb_count_call is throwing an error
message indicating it can't match a destination.<br>
<br>
On a side note, I am having trouble getting the "group" parameter to
accept variable input (i.e. $dlg_val(group)).<br>
<br>
Thanks,<br>
Seth<br>
</body>
</html>