[asterisk-users] GROUP_COUNT not counting correctly
Jonas Kellens
jonas.kellens at telenet.be
Fri Nov 5 09:27:11 CDT 2010
Hello,
this is a test to add a channel to multiple GROUPs.
this is my dialplan :
exten => s,n,NoOp(groepcount = ${GROUP_COUNT(40)})
exten => s,n,Set(GROUP(40)=40)
exten => s,n,NoOp(This channel is member of : ${GROUP_LIST()})
exten => s,n,NoOp(groepcount = ${GROUP_COUNT(40)})
exten => s,n,NoOp(groepcount = ${GROUP_COUNT(40L)})
exten => s,n,Set(GROUP(40)=40L)
exten => s,n,NoOp(This channel is member of : ${GROUP_LIST()})
exten => s,n,NoOp(groepcount = ${GROUP_COUNT(40L)})
this is the output on a first call :
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:17]
NoOp("SIP/testcorp7-00000036", "groepcount = 0") in new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:18]
Set("SIP/testcorp7-00000036", "GROUP(40)=40") in new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:19]
NoOp("SIP/testcorp7-00000036", "This channel is member of : 40 at 40") in
new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:20]
NoOp("SIP/testcorp7-00000036", "groepcount = 1") in new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:24]
NoOp("SIP/testcorp7-00000036", "groepcount = 0") in new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:25]
Set("SIP/testcorp7-00000036", "GROUP(40)=40L") in new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:26]
NoOp("SIP/testcorp7-00000036", "This channel is member of : 40L at 40") in
new stack
[Nov 5 17:17:31] -- Executing [s at sub-CheckChannels:27]
NoOp("SIP/testcorp7-00000036", "groepcount = 1") in new stack
this is the output on a second call :
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:17]
NoOp("SIP/testcorp6-00000037", "groepcount = 0") in new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:18]
Set("SIP/testcorp6-00000037", "GROUP(40)=40") in new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:19]
NoOp("SIP/testcorp6-00000037", "This channel is member of : 40 at 40") in
new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:20]
NoOp("SIP/testcorp6-00000037", "groepcount = 1") in new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:24]
NoOp("SIP/testcorp6-00000037", "groepcount = 1") in new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:25]
Set("SIP/testcorp6-00000037", "GROUP(40)=40L") in new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:26]
NoOp("SIP/testcorp6-00000037", "This channel is member of : 40L at 40") in
new stack
[Nov 5 17:17:43] -- Executing [s at sub-CheckChannels:27]
NoOp("SIP/testcorp6-00000037", "groepcount = 2") in new stack
Notice that the GROUP_COUNT for 40 at 40 in the second call is reset to 0
(zero) to be added by 1 again.
Notice that the GROUP_COUNT for 40L at 40 in the second call is added by 1
to result in a total of 2.
Why is the GROUP_COUNT of 40 at 40 not 2 also ??
Kind regards,
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101105/f0f31e5c/attachment.htm
More information about the asterisk-users
mailing list