[asterisk-bugs] [JIRA] (ASTERISK-26496) GROUP_COUNT or GROUP_MATCH_COUNT may report an invalid number of channnels when channels are established nearly simultaneously

Victor Villarreal (JIRA) noreply at issues.asterisk.org
Sun Jan 8 20:54:12 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234511#comment-234511 ] 

Victor Villarreal commented on ASTERISK-26496:
----------------------------------------------

Hi there.

I've just found a workarround for this issue. If you use GROUP_COUNT() or GROUP_MATCH_COUNT() to check your current number of outgoing calls, then put this line of code

same => n,Wait($[ ${RAND(1,10)} / 10 ])

Before call GROUP_*_COUNT() function. This turn a pseudo-simultaneous calls into a non-simultaneous calls, adding a random delay (between 0 and 1 second) before proceed.

> GROUP_COUNT or GROUP_MATCH_COUNT may report an invalid number of channnels when channels are established nearly simultaneously
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26496
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26496
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Functions/General
>    Affects Versions: 11.22.0, 14.1.1
>         Environment: x86_64 Debian 7 based Asterisk server. Asterisk compiled from sources.
>            Reporter: Victor Villarreal
>         Attachments: Dan-CLI_output.txt, Dan-DialPlan.txt, issue_dialplan.txt, issue_full.txt
>
>
> When we fired several calls trough a SIP trunk simultaneously, the GROUP_COUNT and the GROUP_MATCH_COUNT could return the same number of calls on that trunk.
> You can found more info on the issue_full.txt (full log extract) and the issue_dialplan files.
> [Edit by Rusty - You can reproduce easily with the following dialplan]
> {noformat}
> [from-internal]
> exten = 101,1,Dial(Local/s at group-dial&Local/s at group-dial)
> [group-dial]
> exten = s,1,NoOp(Group count is: ${GROUP_COUNT(1)} )
> same = n,Set(GROUP()=1)
> same = n,Wait(45)
> same = n,Hangup()
> {noformat}
> Making several calls from one or two phones to 101 will result in the GROUP_COUNT occasionally being reported as the same (for the same group) for a pair of channels.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list