Delayed call to Asterisk

    The problem is as old as the Panasonic PBX in your office. If she, of course, is still there.
    When implementing Asterisk, experienced workers always want to leave the previous set of PBX functionality that they are used to using. And one of the killer features of Panasonic was “6” - a deferred call.

    “I’m calling him, but he’s 'busy'! Duc, then I’m shaking the '6' hop and picking up the phone, and how he gets free and the ATSka will call me back, ”says Mikhalych, our zavklad, with pleasure. “Can your miracle machine?”

    Oh, and can Asterisk really make a “6” out of the box? Next will be a detailed positive answer to this question with a small number of tales.



    So recently I came across the Asterisk CookBook . Share it with a colleague. Together with him we grunted that we had already mastered many recipes for a long time on our own, and the book is small, what can be new and useful in it?

    But after the weekend, the colleague smiled mysteriously and said: “CCSS!”

    In Asterisk 1.8, the developers implemented the Call Completion Supplementary Service. When I leafed through the book, I did not pay attention, because I thought that perhaps the implementation of some chips for ISDN is hidden behind this.

    However, behind this big name is a neat architecture that anyone can look at in this PDF (and there really is about ISDN :).

    And I will pass to application on an example from 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 all! Almost:) Much less invented bicycles on the forums ( link )

    But, there is one caveat. On Panasonic, we pressed “6” after we heard “busy” beeps, but before we hung up, then we hung up and began to wait for a call from the PBX.

    In the case of Asterisk, the situation is as follows: they called, heard “busy”, hung up, picked up the phone, dialed the call order code for a busy subscriber (in the example “30”), hung up, waited for a call from Asterisk. In the dialplan example, there is not enough message like “A call to a busy subscriber has been ordered”.

    I suppose the cancellation code (in the example of "31") will not particularly strain anyone. But you can cancel an order to call a busy subscriber.

    Additionally, from useful options it can be for a feast:
    cc_max_agents - the maximum number of people watching your feast
    cc_max_monitors - the maximum number of people you can follow
    cc_recall_timer - call time when calling from Asterisk to you when ordering a service

    For those using realtime, everything is neatly solved by adding fields to the database.

    To monitor the current state of using CCSS in the CLI: cc report status

    In the ccss.conf configuration file, you can specify an additional setting: the maximum number of followers is max_cc_agents. There is a description of all parameters and their possible values.

    It is also worth noting that the phone will not be busy (and we need it according to the conditions of the task) if it has the opportunity to accept the second call. To limit channels to a feast, you can use call-limit and / or disable Call Waiting on the device.

    In general, Mikhalych was extremely pleased with the inclusion of a 6 on the Asterisk, picked up and told how he cut an electric car through a defense plant at one time.

    PS In the comments, I ask you to share the experience of operating this functionality, an opinion on the stability of work, the found features of behavior.

    Also popular now: