Browser Phone » API

Browser Phone API

The Browser Phone API allows you to easily make new calls or manage with a few easy to use JavaScript methods.

OpenVBX.clientDial( { ‘to’: ‘+14045551212’, ‘from’: ‘+14155551212’})

Pass To and From to this function and the dialer will initiate the call process and pop out on the screen.

Arguments

Name Type Description
to string The phone number of the person you're trying to call
from string The phone number to use as the Caller ID for the call. This must be a number you are allowed to use as a Caller ID with the Twilio API (i.e. a Twilio number of a validated caller ID).

Returns

void — returns no data

Usage

OpenVBX.clientDial({
  'to': '+17203089773',
  'callerid': '+14158774003'
});

OpenVBX.clientHangup()

Disconnects the phone call and closes the dialer pad

Arguments

Name Type Description
No Arguments

Returns

Void — returns no data

Usage

OpenVBX.clientHangup();

OpenVBX.clientMute()

Mute the active call

Arguments

Name Type Description
No Arguments

Returns

Void — returns no data

Usage

OpenVBX.clientMute();

OpenVBX.clientUnMute()

Unmute the active call

Arguments

Name Type Description
No Arguments

Returns

Void — returns no data

Usage

OpenVBX.clientUnMute();

OpenVBX.clientIsReady()

Check that the Client has connected with Twilio and is ready to make a call

Arguments

Name Type Description
No Arguments

Returns

boolean

Usage

OpenVBX.clientIsReady();