Enx.makeOutboundCall() method allows you to initiate an Outbound Call to PSTN Number or SIP URI while being in the session, thus inviting the called participant to join the session on accepting the call.
number– String. It can be either a PSTN Number or a SIP URI to dial out.
callerId– Calling Line Identification Number to be added as the originator of the Call. In the case of PSTN Phone Numbers, this will be validated against your purchased number or opted Shared Number. In case if the CLI does not match, the call will fail with an error “CLI mismatch”.
dialStateEvents– Notification to the call initiator about the status of the dial-out process as received from Gateway. The JSON Response returns status codes as: initiated, calling, connecting, connected, and terminated.
dTMFCollected– Notification when DTMF input is collected. It gets the String of digits collected.
Error Codes / Exceptions:
|1141||Dial out request already in process.|
|1142||CLI doesn’t match with the configured phone number.|
|5095||Invalid phone number.|