[Asterisk-Users] SetGroup and CheckGroup problems

Mike Sander mike at corporatebankinginternational.com
Mon Jan 24 23:04:06 MST 2005


Excuse my continued denseness, but I'm still not getting the groups concept.

I have 1 IAX trunk allowing multiple incoming and outgoing calls, and about
10 SIP channels. I don't have any ZAP cards or channels configured. Is the
SetGroup command type intended mainly for Zaptel interfaces??

I changed the CheckGroup(1) command to GetGroupCount(${ARG3}) where ARG3 is
the extension being dialed. Then I added SetVar(GPCNT=${GROUPCOUNT}) so I
could see the value of GROUPCOUNT in the CLI debug.

The answer is usually 1, whether the destination is on a call or not. When
they are conferencing with 2 external calls, it shows 2, but there doesn't
seem to by rhyme or reason. It makes sense to me to show 1 when they are on
the call, 2 when they have 2 going etc, but if they aren't on any calls, it
should show 0.

Am I missing something here, I'm sure it's really obvious.

With thanks

Mike


Mike Sander wrote:
> I have a rather long dial plan, but it includes support for call waiting.
> However, the setgroup checkgroup commands don't seem to be working. Can
> anyone help on this one?

Long story short: you cannot put a channel into two groups, unless you 
add "categories" to your group names. Calling SetGroup multiple times 
without category designators just replaces the channel's group each time 
you call it.

However, you do not need to use SetGroup/CheckGroup to check a group's 
status; you can use GetGroupCount to directly check any group you want, 
even one that the current channel is not in. If you are using CVS HEAD, 
you can even use GetGroupMatchCount to get counts of multiple groups 
with similar names. Also in CVS HEAD, you can set OUTBOUND_GROUP before 
calling Dial(), and the channels it creates to actually call the targets 
will be automatically placed into that group, as if you had used 
SetGroup on them (which you cannot do normally, since you can't run any 
dialplan code on those channels).
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.3 - Release Date: 24/01/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.3 - Release Date: 24/01/2005
 




More information about the asterisk-users mailing list