Call Card
To manage the call card, it is advisable to familiarize yourself with the scenarios.
General Description
To change the title of the card (area 1), you need to call the method CallCardSetCardTitle and pass an object with the title property.
BX24.placement.call('CallCardSetCardTitle', {title: 'Card Title'}, () => { //some code });
To change the text in area 2, you need to call the method CallCardSetStatusText and pass an object with the statusText property.
BX24.placement.call('CallCardSetStatusText', {statusText: 'Status Text'}, () => { //some code });
The call card has a total of 12 interface states. You can retrieve them by calling the method CallCardGetListUiStates. An array of available call card states will be passed to the callback function.
BX24.placement.call('CallCardGetListUiStates', (data) => { console.log(data); });
To switch to another state of the card, call the method CallCardSetUiState and pass an object with the uiState property.
BX24.placement.call('CallCardSetUiState', { uiState: 'connected'}, () => { //some code });
To handle button presses by the operator in the call card, you need to subscribe to the corresponding events.
Card States
|
State |
Description |
Handles Button Presses |
|
[incoming](*incoming) |
For accepting incoming calls |
|
|
[transferIncoming](*transferIncoming) |
For accepting a redirected incoming call |
|
|
[outgoing](*outgoing) |
For displaying the outgoing call card |
|
|
[connectingIncoming](*connectingIncoming) |
For displaying the card while connecting to an incoming call |
|
|
[connectingOutgoing](*connectingOutgoing) |
For displaying the card while connecting to an outgoing call |
|
|
[connected](*connected) |
For displaying after connecting to the call |
|
|
[transferring](*transferring) |
For confirming the transfer of the call to another operator |
|
|
[transferFailed](*transferFailed) |
If the call transfer failed |
|
|
[transferConnected](*transferConnected) |
If the transfer was successful and you need to exit the call card |
|
|
[error](*error) |
If an error occurred |
|
|
[moneyError](*moneyError) |
If the account has run out of funds and the administrator of the account needs to be informed |
|
|
[redial](*redial) |
If the subscriber is busy, allow the operator to call this number again without hiding the call card |
|
|
Timer in the Call Card |
By default, when transitioning to the connected state, the call timer automatically starts. This behavior can be disabled by passing in addition to |