[OpenSIPS-Devel] [ opensips-Bugs-3603973 ] lb_call_count
SourceForge.net
noreply at sourceforge.net
Mon Feb 11 13:44:12 CET 2013
Bugs item #3603973, was opened at 2013-02-09 16:26
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3603973&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Seth Schultz (sethschultz)
>Assigned to: Liviu Chircu (liviuchircu)
Summary: lb_call_count
Initial Comment:
Hello,
I am having trouble with the new function in 1.9.0 lb_count_call. Please look at the snippet below.
failure_route[1]
{
...
xlog("L_WARN", "trying to count call ip=$dlg_val(route) port=$dp group=$dlg_val(balance_pool) resource=$dlg_val(balance_resource)\n");
if ($dlg_val(balance_pool) = "1")
{
if (lb_is_destination("$dlg_val(route)", "$dp", "1", "1"))
{
xlog("L_WARN", "counting call!\n");
if (lb_count_call("$dlg_val(route)", "$dp", "1", "$dlg_val(balance_resource)"))
{
xlog("L_WARN", "call counted on sip:$du:$dp\n");
}
}
}
...
}
Here is the output I see in my log file:
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
Feb 9 15:53:07 opensips-vm /sbin/opensips[16562]: counting call!
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)
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. I have tried hard coding values, however, this resulted in the same error.
On a side note, I am having trouble getting the "group" parameter to accept variable input (i.e. $dlg_val(group)).
Thanks,
Seth
----------------------------------------------------------------------
>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-02-11 04:44
Message:
Thanks to Liviu, this is fixed !
----------------------------------------------------------------------
Comment By: Liviu Chircu (liviuchircu)
Date: 2013-02-10 03:36
Message:
Hello Seth,
A fix for this has been commited both on trunk and 1.9
Regards,
Liviu
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3603973&group_id=232389
More information about the Devel
mailing list