Call Waiting won't disable

I am currently running the latest FPBX 16 with Asterisk 18. Currently in the experimentation phase

I have a Polycom IP650 using the commercial endpoint manager to configure it.

I currently have a live FPBX 2.11 system with the same phones and similar config where this problem doesn’t exist.

What I have found is on the old system, a standard extension with one line when called returns busy if they are on a call. Perfect… However on the new system the Polycom reacts as if call waiting is enabled. Call waiting is enabled in the config of the phone the same as the live system as we do have some extensions where this is used. CW is then controlled on a per extension basis within FPBX. With the new setup whether CW is enabled or disabled the phone always reacts as if CW is enabled.

Am I missing something somewhere, been at this for a few days now and can’t see what I’m missing.

Any help appreciated.

Basic debug for call waiting would be to confirm that the astdb records are being set and unset properly. At the Asterisk CLI try the following for the extension in question:

Here is call waiting disabled

CLI> database show CW 6007
0 results found.

and here it is enabled

CLI> database show CW 6007
/CW/6007                                          : ENABLED
1 results found.

If that’s working as expected, then share a call trace via pastebin with the unexpected behavior. Providing Great Debug - Support Services - Documentation

Thank you for the quick reply.

To rule out a phone config issue I took a copy of the various cfg files from the live server, copied them to the dev server, formatted the handset and applied the copied files - bypassing the endpoint manager. The problem still remains. It looks like the system is still sending the call to the handset even though CW is clearly disabled.

database show CW is showing 0 results found.

pastebin link:

https://pastebin.freepbx.org/view/cb4ba8f0

This is a call from 5131 to 5131 which should have returned ‘Busy’. If I do exactly the same on the live system it returns BUSY

The problem line is 137:

/var/log/asterisk/full:[2022-06-28 13:21:45] VERBOSE[30675][C-0000003a] pbx.c: Executing [[email protected]:19] GotoIf("PJSIP/5131-0000004e", "1?continue") in new stack

This line is checking the EXTENSION_STATE for the dest extension and it’s not returning BUSY for some reason. I don’t know why that might be, possible fault with asterisk, in which case a restart might be in order.

Interesting. I’ve just rebooted the system but the problem still remains. I’m not sure what to try now. The big difference to me between the systems is that the old is SIP and the new is PJSIP. Would this have any impact?

I’m also unable to select SIP as it doesn’t look to have compiled during the install so is unavailable.

What is the Device Busy State at set to in the Advanced tab of the extension? By default it is 0 which means the endpoint will never return a BUSY state when in use. Call Waiting is just a function that looks for a state of a device and if state = X then CW is used (or not).

If you want to disable CW and have it return BUSY with one active call, set Device Busy State at to 1

It was set to 0. I’ve set it to 1, saved and applied but still the same.

Not sure if he helps in the diagnosis but under Reports > Asterisk Info > Peers

Endpoint: 5131/5131 Busy 2 of 1
InAuth: 5131-auth/5131
Aor: 5131 1
Contact: 5131/sip:[email protected]:5060 0d3e11e086 Avail 13.956
Channel: PJSIP/5131-00000006/Dial Ring 00:00:05
Exten: s CLCID: “Gun Room” <5131>
Channel: PJSIP/5131-00000007/AppDial Ringing 00:00:05
Exten: 5131 CLCID: “Gun Room” <5131>

Show the debug of this happening.

Is the pastebin link posted earlier enough or is there a more indepth debug that would be better?

I want to see a new call after the change, asterisk -rvvvvvvvvv and make the call.

https://pastebin.freepbx.org/view/543362ce

You could have pastebin’d this.

Does the hint change state when the ext is in use?

*CLI> core show hint 6007
[email protected]      : PJSIP/996007&PJSIP/9  State:Idle            Presence:available       Watchers  1
1 hint matching extension 6007
*CLI> core show hint 6007
[email protected]      : PJSIP/996007&PJSIP/9  State:InUse           Presence:available       Watchers  1
1 hint matching extension 6007

Previous post has been pastebin’d

Hint does seem to change;

voip1*CLI> core show hint 5131
[email protected]      : PJSIP/5131&Custom:DN  State:Busy            Presence:not_set         Watchers  0
1 hint matching extension 5131
voip1*CLI> core show hint 5131
[email protected]      : PJSIP/5131&Custom:DN  State:Idle            Presence:not_set         Watchers  0
1 hint matching extension 5131

exten => s,n(next2),GotoIf($["${EXTENSION_STATE(${DEXTEN}@ext-local)}"="NOT_INUSE" | "${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNKNOWN"]?continue)

This looks to be the culprit based on this:

-- Executing [[email protected]:19] GotoIf("PJSIP/5131-00000008", "1?continue") in new stack
-- Goto (macro-dial-one,s,27)

Jumping to priority 27 skips the state checks for call waiting.

Is this something I can fix through the GUI or is this pointing towards a bug?

This is something that needs to be looked at more. If one of those three states match, it makes the jump. Is it still seeing the state as NOT_INUSE for some reason? Or are one of the other two states being returned.

Might need to whip something up to test this with that will spit out the results of EXTENSION_STATE() when it is checked. @lgaetz Got something in your back pocket for that?

[macro-dialout-one-predial-hook]
exten => s,1,Noop(********************************************************)
exten => s,n,Noop(Extension state for ${DEXTEN} is ${EXTENSION_STATE(${DEXTEN}@ext-local)})
exten => s,n,MacroExit

That will show the ext state of the destination extension, but if things are working properly, then then hook won’t even be called. It might be illustrative.

What version of Asterisk is this?

I’m running 18.12.1

I believe the issue may just be localised to me dialling 5131 from ext 5131.

This correct busy behaviour works as expected on the live server but not my dev unit.

I have a softphone set up with another number linked. I can ring between the two fine. If I call 5131 from the softphone (5004) I get a busy tone.

Seems to be a potential bug when I try to ring myself. The same behaviour occurs with the softphone