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 initiatedonDialStateEvents
– 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 Code | Description |
1141 | Dial-Out request is already in progress |
1142 | CLI doesn’t match with configured phone number |