Determining the number of inuse channels for a SIP peer

Hi Group

Ok so all the documentation says that I should be using the GROUP_COUNT function to determine inuse channels for a SIP peer however I have been checking the SIPPEER (curcalls) function which seems to work fine.

Is there any reason I shouldnt be using this?


If you read the Asterisk sip.conf sample file , you will find this

; You are encouraged to use the dialplan groupcount functionality
; to enforce call limits instead of using this channel-specific method.
; You can still set limits per device in sip.conf or in a database by using
; “setvar” to set variables that can be used in the dialplan for various limits.

So it is recommended to use groupcount

I have also used it earlier, but a bit confused if is it a correct way to get current call & verify by MySQL query, please expert suggest us.

Unfortunately that text does not give the reason why.
Please also realise that I am not enforcing the limit with call-limit but setting it high and using SIPPEER(curcalls) within the dialplan.