This bug report proposes a patch to include the call-limit feature:

Recently I posted this other bug report:

What I’m interested in is the following comment:

Replying to p_lindheimer:

> what you are asking for is the ability to not send calls to an extension that is currently busy and that is implemented by disabling the FreePBX CW feature code on the given extension.

Call Waiting is disabled on a SIP extension (either by disabling it in FreePBX or enabling it but the user dialed *71). I place a call from a ZAP channel and communicate with this SIP softphone. Then I place a second call through a ZAP channel to the same extension but the call is NOT rejected; the extension is NOT considered BUSY. So the SIP softphone displays a second incoming call while in conversation with the first caller. That’s what I want to avoid.

Is this a bug/broken feature?

still sounds to me that the CW is not active. (do a database show CW/ and see what it says. dialpaties.agi checks the state of the extension and if the extension shows as busy and CW is not set, it will not try another call. So either CW is not enabled, or your extension state is reporting incorrectly. The latter issue was a common Asterisk 1.4 but on earlier releases but is suppose to be fixed on 1.4.11. You can check the extension state during a call by doing a show hints and see what it says about the extension. If it is not showing busy then something is configured wrong somewhere.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

Thank you for your feedback.

In my example below, I am testing SIP extension 4053 (SJPhone softphone).

Regardless of whether CW is enabled or disabled in FreePBX, 4053’s state goes from “Idle” to “Ringing” to “InUse” when a call is established.
It does not show BUSY.
So in both cases (CW on/off) a second call is always “accepted” (on-screen popup).
Should I modify dialparies.agi so that an InUse is “equivalent” to “BUSY” as far as call limitation is concerned? (if so, I’d like some help on this)

*CLI> show hints
4053 : SIP/4053 State:InUse Watchers 0
4003 : SIP/4003 State:Idle Watchers 0
4002 : SIP/4002 State:Unavailable Watchers 0

*CLI> database show CW/4053
/CW/4053 : ENABLED

By the way, as far as I understood, I need to DISABLE call waiting to get the behavior I want, right?
If I disable it then “database show CW/4053” yields nothing (it does not say DISABLED).

*CLI> show version
Asterisk built by root @ INF-VOIP on a i686 running Linux on 2007-09-19 08:00:35 UTC

Help appreciated,


As a side note, according to the call-limit feature is not automatically injected to all extensions in Asterisk 1.2 so could this patch help out 1.2 users like me?

Anyway, if I get Call Waiting working as expected then I won’t even need that patch I guess.

What you see:

4053 : SIP/4053 State:InUse Watchers 0

is proper and it is what dialparties.agi looks for. You should do a database show CW at the CLI to determine if you really have CW disabled. This code works, trust me, it is fundamental to all sorts of features. If CW is enabled, it will ignore the state and send the call. If CW is disabled it will not send the call. No entry for the extension is equivalent to CW disabled.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

I trust you :wink:

*CLI> database show CW
/CW/4000 : ENABLED
/CW/4002 : ENABLED
/CW/4003 : ENABLED
/CW/4004 : ENABLED
/CW/4012 : ENABLED
/CW/4013 : ENABLED
/CW/4052 : ENABLED
/CW/4054 : ENABLED
/CW/4055 : ENABLED
/CW/4056 : ENABLED
/CW/4057 : ENABLED
/CW/4058 : ENABLED
/CW/4059 : ENABLED
/CW/4170 : ENABLED
/CW/4171 : ENABLED
/CW/4172 : ENABLED
/CW/4444 : ENABLED

As you can see, extension 4053 for which I disabled CW is NOT listed.
Is this normal?

Note: The dialparties.agi code looks for a CWINUSEBUSY variable which I have not defined in amportal.conf. Should I?

CWINUSEBUSY is something different. That simply controls how the state of an extension will be reported primarily geared for use with Voicemail and which message to play (or with VmX Locater which mode to be in). In the way past, a phone was considered unavailable if you were on the line and chose not to answer the line even though you had CW enabled. This controls whether or not the old behavior is used (report unavailable) vs. the current behavior is used (report line as busy if you were on the line and chose not to answer it) so you get the busy greeting which many people prefer.

If you do not have CW set for the extension and it is properly reporting InUse then dialparties.agi will not send the call to it. If you are still receiving the call, something else is going on. Set you verbosity up to 5 and turn on agi debug and make a call to see what is happening. If it is not immediately obvious then post it here to be reviewed by forum members and maybe someone can tell you what is up. Or if it is urgent, feel free to purchase support from the store and someone can look at your system to tell you what is going on and/or what needs to be changed to get the desired behavior.

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

Hi, I have the exact same problem as vieri. “database show CW” does not show any extensions with cw enabled. “show hints” shows the extension as “InUse” (not busy), but the next call to the queue is routed to the “InUse” phone. Is there a fix for this?