[asterisk-bugs] [JIRA] (ASTERISK-21384) Unique ID Call Count Increasing By 2
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Fri Apr 5 17:39:01 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-21384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205028#comment-205028 ]
Matt Jordan commented on ASTERISK-21384:
----------------------------------------
Yikes.
Relying on the unique ID value to be anything other then a unique value is relying on implementation defined behavior. The unique ID happens to be constructed currently from the system name and a time stamp. That scheme could change in a different version of Asterisk and so long as the value is unique across space/time, it would still be valid.
On top of that, it has no bearing on the call count, which is an integer that is atomically increased in a completely different section of the code. Channels can be created for all sorts of purposes that you would never see as well (dummy channels, for example, are created for variable substitution) - there is no actual relationship between the unique ID and the call counter in {{pbx}}.
This feels a bit brittle - I'd look into finding a different way to perform the load balancing.
What is actually doing the calculation to determine the PSTN gateway? Is it an external script (since it's querying for the call count using the CLI), or is it done in dialplan?
It feels like this could be done easily in the dialplan using the [GROUP|https://wiki.asterisk.org/wiki/display/AST/Function_GROUP] and [GROUP_COUNT|https://wiki.asterisk.org/wiki/display/AST/Function_GROUP_COUNT] functions. In fact, you could even be a bit more precise as to how many channels are currently directed to a PSTN gateway. If you had two groups of channels - one for each gateway - you could look at the GROUP_COUNT on each group to see which PSTN gateway had more/less channels and direct the channel to the right gateway. That would be a better load balancing situation, as it would keep the distribution of channels balanced even in the presence of long running calls.
> Unique ID Call Count Increasing By 2
> ------------------------------------
>
> Key: ASTERISK-21384
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-21384
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/General
> Affects Versions: 1.8.21.0, 11.3.0
> Reporter: Ross Beer
> Severity: Critical
>
> The channel count and sequence numbers are increasing by 2 for each call.
> 'core show channels' shows half the call count of the unique id '.45345' call count. This happens with every single call where as it should only increase by one to give an accurate call count.
> This variable is needed in our application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list