The problem is as old as a Panasonic PBX in your office. If she, of course, still have.
When implementing Asterisk, employees with experience always want to leave the old set of PBX functionality they used to use. And one of the killer features of Panasonic was “6-ka” - deferred challenge.
“I call him, and he is 'busy'! So, then I hop the '6' and press the box of the box, and how he gets free and ATSka will call me back ”- Mikhail Mikhalych, our warehouse manager, tells me with pleasure. “Can your miracle machine?”
Aw, can an Asterisk know how to make a “6” out of the box? Next will be a detailed positive answer to this question with an even small number of fables.
')
So recently came
across the book
Asterisk CookBook . Share it with a colleague. Together with him, we snickered that many recipes we had long ago mastered on our own, and the book is small, what could be new and useful in it?
But after the weekend, a colleague mysteriously smiled and said: “CCSS!”
In Asterisk 1.8, developers implemented the Call Completion Supplementary Service. When I was flipping through the book, I didn’t pay attention, because I thought that behind this is probably hidden implementation of some chips for ISDN.
However, behind this loud name there is a neat architecture that anyone can look at in this
PDF (and there really is about ISDN :).
And I turn to the application of the
example of official documentation. sip.conf [Mark] context=phone_calls cc_agent_policy=generic cc_monitor_policy=generic [Richard] context=phone_calls cc_agent_policy=generic cc_monitor_policy=generic dialplan' [phone_calls] exten => 1000,1,Dial(SIP/Mark,20) exten => 1000,n,Hangup exten => 2000,1,Dial(SIP/Richard,20) exten => 2000,n,Hangup exten => 30,1,CallCompletionRequest exten => 30,n,Hangup exten => 31,1,CallCompletionCancel exten => 31,n,Hangup
And that's it! Almost:) Much less invented bicycles on the forums (
link )
But, there is one nuance. At the Panasonic PBX, we pressed “6” after we heard the beeps “busy”, but before we hung up, then we hung up and waited for the delayed call from the PBX.
In the case of Asterisk, the situation looks like this: they called, heard "busy", hung up, picked up the phone, dialed the call order code for the busy subscriber (in the example "30"), hung up, waited for a call from Asterisk. In the example of dialplan, there is not enough message like "A call to an occupied subscriber is ordered."
I suppose the cancellation code (in the example "31") especially no one will strain. But you can cancel an order to call a busy subscriber.
In addition from useful options can be for a feast:
cc_max_agents - the maximum number of watching your feast
cc_max_monitors - the maximum amount you can follow
cc_recall_timer - call time when calling from Asterisk to you when ordering a service
For those using realtime, in general, everything is neatly solved by adding fields to the database.
To monitor the current status of using CCSS in CLI: cc report status
In the ccss.conf configuration file, you can specify an additional setting: the maximum number of followers max_cc_agents. There is also a description of all parameters and their possible values.
It is also worth noting that the phone will not be occupied (and we need it according to the conditions of the problem) if he has the opportunity to take the second call. To limit the channels to the peer, you can use call-limit and / or disable Call Waiting on the device.
In general, Mikhalych was extremely pleased with the inclusion of the 6-ki on Asterisk, got more comfortable and told how he had cut through the electric car at the defense plant.
PS In the comments I ask to share the experience of operating this functionality, an opinion on the stability of the work, and the found behavioral features.