How can I manage my Voip Phone calls (HangUp) through an API in JavaScript

I would like to connect Softphones with each other.

I would like to check what phone calls are being in progress in the system, more precisely, between the actual phones.
If it is possible, I would like a solution for the case when any of the participants calls the other, I -as a third participant (as an owner)- will receive a notification immediately about the call and its datas.

It would be even better if I had more control in the actions, for example, I would like to interrupt or hang up the call in particular cases.
I found a really good solution for this(, but I can't step further.
It works until it is written, when I connect two softphones (Bria) to the system, and I call from one of them the other one, then it shows the popup that I have written based on the example.

But how can I solve that, if I want to hang up or interrupt the call, for example, by the action of pressing a button?
Based on the example, I get until this part (The other codes are unvaried in comparison to the downloaded "full example code"). The Popup is shown, but I don't know how could I hang up the call.

function showPopUp(caller, callee, direction, state){
    if ($("#NoficationPopup").length > 0){
        /*update the GUI labels*/
        $('<div id="NoficationPopup" title=\"' + direction + '\">' +
                '<div align=left>' +
                    '<label id="lbCaller">Caller: '+caller+'</label> <BR />'  +
                    '<label id="lbCallee">Callee: '+callee+'</label> <BR />' +
                    '<label id="lbDirection">Direction: '+direction+'</label> <BR />' +
                    '<label id="lbState">State: '+state+'</label> <BR />' +
                '</div> ' +
                resizable: false, minWidth: 250, minHeight: 100,
                /*NEW PART*/
                buttons: {
                        HangUp: function () {
                            alert("HangUp the line");
                        /*How can I really hung up the line*/
                /*NEW PART END*/
                close: function () {

I would be glad to receive any help or idea in connection with this

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!