Setting Call Limits for SIP peers Version 16

It seems that call-limit has been deprecated, so I am attempting to limit the amount of calls each peer can have, on a per peer basis.

Ultimately, Im trying to achieve call waiting enabled, or disabled.

I am using real-time for my sip peers, I have set callcounter = yes, and in queues I have set ringinuse = no. But I doubt that will do anything, as the peers arent in any queues.

I dont have a problem checking a field in the database before the call is made, but if thats the case, can anyone point me in the right direction of figuring out how to find channel status of a peer?


What problem are you having with group counts, which are the official replacement?

I guess the problem with group counts, is that I don’t know how group counts work.

I’ve been reading into since posting though.

I found on a thread that call-limit was deprecated, but didn’t know what its replacement was.

For reference, Im replacing a box that currently runs Asterisk 1.4.44… So Im still learning the “new” way. But I still am using the real-time and not AGI way.

Group count seems to limit the entire group and not each extension?

Do I have to create a group for each extension?

Yes, you would use a group for each extension.


Okay, maybe someone can help me out here.

Im to a point where if the extension receives an inbound call, they cannot receive another. Perfect.

But, if the extension makes a call out, they can still receive a call while the outbound call is still active. Its like the group count isn’t checking for outbound channels?

This is what I have for my group setup. Where ‘CallIn’ is the dialed extension, and ‘climit’ is defined in the database as ‘1’.

exten => s,1,SET(GROUP()={CallIn}) same => n,SET(climit={ODBC_CW-CHECK({CallIn})}) same => n,GotoIf([{GROUP_COUNT()} > {climit}]?10)
same => n,Return()

same => 10,Hangup(17)

The group count checks for any channels that are tagged with the group. You’d need to show the console log showing that a group was set in such cases and to what.


If you don’t set the group counter on the outbound call, then the counter doesn’t go up…

I added the counter to my outbound plan, as well as the inbound plan.

I name the groups by the extension, and it works.

Thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.