Being within EnableX Session, you may initiate an Outbound Call to PSTN Number or SIP URI inviting the called participant to join the session on accepting the call.

Method: makeOutboundCall( number )

Parameters:

  • @param {String} number – Phone Number with STD code to be dialed.

Event Listener:

  • onOutBoundCallInitiated – User is acknowledged that the call has been initiated
  • onDialStateEvents – Status of the Dial out Process is notified as and when received from Gateway. The JSON Response returns the following status codes: initiated, calling, connecting, connected, terminated, failed, and disconnected
// To enable stats
window.EnxRtc.makeOutboundCall(clientId);

// Add Event Listeners
window.EnxRtc.addEventListner("onOutBoundCallInitiated", function
(data)
{
console.log(JSON.stringify(data.data));
});
window.EnxRtc.addEventListner("onDialStateEvents",function (data)
console.log(JSON.stringify(data.data));
});

Error Codes – Failure Conditions to accept Dial-Out request

Error CodeDescription
1141Dial-Out request is already in progress
1142CLI doesn’t match with configured phone number