with SIP there were a special field, called call-limit.
We cannot find something like that with PJSIP.
We manage to to things using group() and group_count(), it is not easy as we have to managed for caller AND callee.
We are using database to set max call per users
But if you add pickup this is more complicated
We managed to do some things but we’d like to know if there is a better (more simple!) way ?
Do you know if there is a function that returns the number of channel where a user is
Something like count_chan(PJSIP/bob) would be perfect !
This means that we can use asterisk and linux command into dialplan ? I’ll have a look at it.
But won’t it be to slow to call such command to count how many calls a user have just to decide if we send the call or not ?