[Home]

Summary:ASTERISK-10610: GROUP_COUNT() returns 0
Reporter:Kenton (m4him)Labels:
Date Opened:2007-10-24 06:23:38Date Closed:2008-01-09 12:20:54.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-groupcount.diff.txt
( 1) asterisk-groupcount2.diff.txt
Description:Description
GROUP_COUNT([groupname][@category])
Calculates the group count for the specified group, or uses the channel's current group if not specified (and non-empty).

GROUP_COUNT() always returns when no group is specified.
Comments:By: James Golovich (jamesgolovich) 2007-10-24 15:28:33

Do you have a group specified in the channel config?

Edit: it just occurred to me that this isn't the same group that you specify in the channel config.  I'm going to look into this a bit more.



By: James Golovich (jamesgolovich) 2007-10-25 03:08:51

The attached patch fixes the problem.  This is against SVN trunk but it should compile against 1.4 as well.

In the future please include more information in your bugreport for example showing an example extensions.conf entry that shows this.  If I had seen something like that I wouldn't have jumped to the conclusion that this was just a configuration problem.

By: James Golovich (jamesgolovich) 2007-10-25 03:54:54

jmls on irc pointed out that channels can be in multiple groups if you specify a category.  In my first patch the first group would always be used.  The 2nd patch allows the category to be passed to GROUP_COUNT like: GROUP_COUNT(@category)

We probably should document that if you don't specify a category then the result will be the value of whatever the first group set was.  Of course I think everyone that uses multiple groups probably explicitly passes the group@category.

By: Kenton (m4him) 2007-10-25 07:21:01

When I patched 1.4.13 and then start asterisk I get the following:

[Oct 25 06:14:53] ERROR[7673] pbx.c: Function GROUP_COUNT already registered.
[Oct 25 06:14:53] ERROR[7673] pbx.c: Function GROUP_MATCH_COUNT already registered.
[Oct 25 06:14:53] ERROR[7673] pbx.c: Function GROUP_LIST already registered.
[Oct 25 06:14:53] ERROR[7673] pbx.c: Function GROUP already registered.

By: James Golovich (jamesgolovich) 2007-10-25 11:45:51

Did the patch apply cleanly?  I just patched the SVN 1.4 branch with that patch and it worked just fine.  I don't really see how that could be happening, since I didn't mess with the function definitions at all

Edit:  Looking through my patch I'm calling ast_app_group_get_count with the list locked.  I suppose it would be best to either move that call outside of the lock, or just duplicate the code (which I never like to do) that it does inside that function since we are already walking the list anyways



By: Digium Subversion (svnbot) 2008-01-08 13:50:07.000-0600

Repository: asterisk
Revision: 97152

U   branches/1.4/funcs/func_groupcount.c

------------------------------------------------------------------------
r97152 | file | 2008-01-08 13:50:07 -0600 (Tue, 08 Jan 2008) | 4 lines

If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue ASTERISK-10610)
Reported by: m4him

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=97152

By: Digium Subversion (svnbot) 2008-01-08 13:52:08.000-0600

Repository: asterisk
Revision: 97153

_U  trunk/
U   trunk/funcs/func_groupcount.c

------------------------------------------------------------------------
r97153 | file | 2008-01-08 13:52:07 -0600 (Tue, 08 Jan 2008) | 12 lines

Merged revisions 97152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97152 | file | 2008-01-08 15:53:52 -0400 (Tue, 08 Jan 2008) | 4 lines

If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue ASTERISK-10610)
Reported by: m4him

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=97153

By: Digium Subversion (svnbot) 2008-01-09 12:20:54.000-0600

Repository: asterisk
Revision: 97535

_U  team/murf/bug11210/
U   team/murf/bug11210/CHANGES
U   team/murf/bug11210/apps/app_queue.c
U   team/murf/bug11210/apps/app_voicemail.c
U   team/murf/bug11210/channels/chan_console.c
U   team/murf/bug11210/channels/chan_mgcp.c
U   team/murf/bug11210/channels/chan_sip.c
U   team/murf/bug11210/configs/queues.conf.sample
U   team/murf/bug11210/funcs/func_groupcount.c
U   team/murf/bug11210/main/asterisk.c
U   team/murf/bug11210/main/autoservice.c
U   team/murf/bug11210/main/utils.c
U   team/murf/bug11210/res/res_jabber.c

------------------------------------------------------------------------
r97535 | murf | 2008-01-09 12:20:51 -0600 (Wed, 09 Jan 2008) | 140 lines

Merged revisions 97125,97153-97154,97193,97196-97200,97203,97208,97248 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r97125 | tilghman | 2008-01-08 12:06:27 -0700 (Tue, 08 Jan 2008) | 11 lines

Merged revisions 97077 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97077 | tilghman | 2008-01-08 12:02:13 -0600 (Tue, 08 Jan 2008) | 3 lines

Apply multiple crash fixes, found in issue ASTERISK-10897, but not completely
closing that issue.

........

................
r97153 | file | 2008-01-08 12:55:56 -0700 (Tue, 08 Jan 2008) | 12 lines

Merged revisions 97152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97152 | file | 2008-01-08 15:53:52 -0400 (Tue, 08 Jan 2008) | 4 lines

If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
(closes issue ASTERISK-10610)
Reported by: m4him

........

................
r97154 | file | 2008-01-08 13:06:52 -0700 (Tue, 08 Jan 2008) | 6 lines

Move common code for setting T38 capabilities and fix a bug with fax detection in the SIP RTP read callback. It's still sort of silly... but more on that later.
(closes issue ASTERISK-10758)
Reported by: dimas
Patches:
     sipt38prop.patch uploaded by dimas (license 88)

................
r97193 | mmichelson | 2008-01-08 13:45:59 -0700 (Tue, 08 Jan 2008) | 17 lines

Merged revisions 97192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97192 | mmichelson | 2008-01-08 14:42:07 -0600 (Tue, 08 Jan 2008) | 9 lines

Making some changes designed to not allow for a corrupted mailstream for a vm_state.

1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.

(closes issue ASTERISK-10818, reported by dwhite)


........

................
r97196 | file | 2008-01-08 13:50:57 -0700 (Tue, 08 Jan 2008) | 14 lines

Merged revisions 97195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97195 | file | 2008-01-08 16:48:20 -0400 (Tue, 08 Jan 2008) | 6 lines

Fix various DTMF issues in chan_mgcp.
(closes issue ASTERISK-10954)
Reported by: eferro
Patches:
     dtmf_control_hybrid-inband-mode.patch uploaded by eferro (license 337)

........

................
r97197 | file | 2008-01-08 13:52:07 -0700 (Tue, 08 Jan 2008) | 2 lines

One line documentation ftw!

................
r97198 | tilghman | 2008-01-08 13:56:38 -0700 (Tue, 08 Jan 2008) | 11 lines

Merged revisions 97194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97194 | tilghman | 2008-01-08 14:47:07 -0600 (Tue, 08 Jan 2008) | 3 lines

Increase constants to where we're less likely to hit them while debugging.
(Closes issue ASTERISK-11165)

........

................
r97199 | oej | 2008-01-08 13:58:56 -0700 (Tue, 08 Jan 2008) | 2 lines

Iksemel is alive in a new home. Release 1.3 is out with bug fixes.

................
r97200 | oej | 2008-01-08 14:01:46 -0700 (Tue, 08 Jan 2008) | 4 lines

Change reference to external library so it appears on the extref listing
http://www.asterisk.org/doxygen/trunk/extref.html


................
r97203 | mmichelson | 2008-01-08 14:18:32 -0700 (Tue, 08 Jan 2008) | 8 lines

Adding the option of specifying a second interface in a member definition for a queue. app_queue
will monitor this second device's state for the member, even though it actually calls the first
interface. This ability has been added for statically defined queue members, realtime queue members,
and dynamic queue members added through the CLI, dialplan, or manager.

(closes issue ASTERISK-11085, reported by acidv)


................
r97208 | mmichelson | 2008-01-08 14:28:04 -0700 (Tue, 08 Jan 2008) | 10 lines

Blocked revisions 97206 via svnmerge

........
r97206 | mmichelson | 2008-01-08 15:24:48 -0600 (Tue, 08 Jan 2008) | 3 lines

Some coding guidelines-related cleanup


........

................
r97248 | twilson | 2008-01-08 14:56:57 -0700 (Tue, 08 Jan 2008) | 2 lines

Initialize new variable to NULL

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=97535