How to enable asterisk Call Completion on Busy Subscriber (CCBS)

asterisksipvoip

I cannot enable Call Completion on Busy Subscriber (CCBS) on asterisk, witch is part of the Call Completion Supplementary Services (CCSS), as is the Call Completion on No Response (CCNR) feature.

Here's the scenario: Mark picks up his phone (1000) and dials Richard by dialing 2000. Richard is currently on a call, so Mark hears a busy signal. Mark then hangs up, picks up the phone and dials 30 to call the CallCompletionRequest application. After some time, Richard finishes his call and hangs up. Mark is automatically called back by Asterisk. When Mark picks up his phone, Asterisk will dial extension 2000 for him.

According to the documentation I must add the cc_agent_policy and cc_monitor_policy according to my needs (generic), add the CCSS enable extension to the dialplan and enable it after dialing a busy telephone. Which I did.

The thing is that the CCBS, the one the is used when the extensions os busy, doesn't work as nothing happens when dialing extensions 30 to enable monitoring on a previously busy extension, which is a bit frustrating as the other feature, CCNR, the one used to monitor non responsive extensions, works all right.

Could someone please tell me whats missing?

Here's the config files:

/etc/asterisk/sip.conf

[1000]
context=default
cc_agent_policy=generic
cc_monitor_policy=generic

[2000]
context=default
cc_agent_policy=generic
cc_monitor_policy=generic

/etc/asterisk/extensions.conf

[default]
exten => 1000,1,Dial(SIP/1000,20)
exten => 1000,n,Hangup
exten => 2000,1,Dial(SIP/2000,20)
exten => 2000,n,Hangup
exten => 30,1,CallCompletionRequest
exten => 30,n,Hangup
exten => 31,1,CallCompletionCancel
exten => 31,n,Hangup

Here is the CC report status in CLI after calling a phone that did not answer the call and enabling CCSS dialing extension 30:

Core ID     Caller              Status
----------------------------------------------------------------------------
0       SIP/1000        CC accepted by callee
        |-->2000@default
        |-->SIP/2000(CCNR)

And after calling a busy phone (guess it should show the CC status) and trying to enable CCSS dialing extension 30:

CLI> There are currently no active call completion transactions

System info:

  • OS: Centos7
  • asterisk 13.13-cert6

Best Answer

To have Asterisk enabling CCBS after a CallCompletionRequest the busy device need to answer the SIP INVITE with a 486 Busy Here response. That is, Asterisk have to dial the extension even if it have internally the status "InUse", and the device need to have the "Call Waiting" feature disabled. In my context, where i maintain a Elastix distro, I had to enable the "Call Waiting" for all devices to Asterisk dial the extension even if it is busy. And then, with the "Call Waiting" disabled at the device, it responds a SIP 486 message.

In pure Asterisk, it may be achieved setting

busylevel = 2 

in the sip.conf for the extensions. Asterisk will dial the extension even if it is on a call, and with the "Call Waiting" device feature disabled, it will responds 486.

Reference for sip.conf.sample, with the available configs for peer/user/friend: https://github.com/asterisk/asterisk/blob/13.26/configs/samples/sip.conf.sample