How to implement busy line notification when call waiting is enabled

There needs to be an understanding of how concepts like Call Waiting and Busy states are handled in FreePBX/Asterisk.

First, Call Waiting. This is a concept, not a built-in feature of Asterisk. The implementation of Call Waiting is done by the designer of the system using Asterisk (in this case FreePBX). In this case (FreePBX) it’s just an internal database value. It is has a value ENABLED or it’s empty.

Second, Extension/Device States. This is built-in to Asterisk. Extension states are controlled by Device States. There are tech based states, such as for chan_pjsip and there’s custom devices such as the DND state.

Third, User Device (phone). Once the call is sent to the actual phone, the response from the phone plays into things.

Fourth, User update. The calling user won’t know if the phone busy (or not even) until a response is sent back to the calling user.

Overall concept is as follows:

  • Call is sent to an extension destination in the dialplan
  • FreePBX looks for the CW status of the extension
  • CW State = ENABLED - FreePBX then checks the Extension State, if the state is “NOT_INUSE” then there are no active calls, if it’s another state showing call activity (BUSY, RINGING, RINGING_INUSE, etc) then “call waiting” happens.
  • CW State = none - If there is no CW entry and “call waiting” is triggered, the call will be routed based on the settings of the extension, i.e. going to voicemail.

So there will be two places that this would need to be checked. At the PBX level because it may never make it to the phone. Then the response of the phone if the call is set to it. Also, in order to apply Music on Hold you would actually need to hold the call in some form but at that point the system just won’t “unhold” the call because the phone is no longer busy.

But also there is the Unavailable and Busy greetings that can be recorded by the users. If a call/response indicates a BUSY state in some form, FreePBX by default sends the caller to voicemail flagging the use of the BUSY greeting.

So really if you just want the calling party to know when it hits voicemail that the user was truly busy, make sure your users record their Busy Greeting properly. If there’s no voicemail and the call has no other place to go, it will be hungup with a Busy response which will trigger Busy tones to the calling user.