Create call via js

Hi,

I have function to create call via js in phone.js but it didn't work.

I saw in network tab wait for about 1 or 2 minutes then it return all my 20 calls, not create a new one.

Can anyone help me to fix my code?

// this.getPID is case id
closeClicked: function(event) {
        console.log(this.getPID);
        App.api.call('POST', App.api.buildURL('Calls'), {
            "name":"Test",
            "parent_id" : this.getPID,
            "parent_type" : "Cases"
        }, {
            success: function (data) {
                console.log(data);
            },
            error: function (e) {
                throw e;
            }
        });
    },

Sugar Ent 7.7

Thanks,

M