The Ringdesk Plugin supports the same commands & triggers for every connected PBX solution. Some PBX solutions may not support certain commands or generate a different flow of events due to the way they implemented their own flow of events. In order to adopt to all PBX solutions we advice you to work with our recommended commands and connect to the minimal set of events shown below.

Please also read our Best Practice with tips of implementation.

This guideline is based on SDK Version 1.15.1 but should be the same for newer versions.
Please always use the latest version of the Plugin from our SDK on https://sdk.ringdesk.com. This example page also shows you how the Plugin can be implemented in your Host application.

<script src=“ https://sdk.ringdesk.com/dist/ringdesk-kit.js?v=1.15.1„></script>

onGetProfile

This event is called when the user logged in for the first time and signals all user and company information to the host.

When or how to use

– If you want to check if the username of the Ringdesk account matches the username in your Host application;
– If you want to get additional user information for the Host application;

Example

onIncomingCallRinging

This event is called when the user has an incoming call signalled by the used PBX.

When or how to use

This is typically the event you want to use to give the user caller information. Use the incoming pbxData.peer_number for a search in your own Host application.
The best way to present additional caller information on the call would be in a popup. We do not advice you to change the active page or path within the Host application. This call is only yet signalled!
There are many reasons you do not want to anticipate on this event with screen refresh, page or path changes. The most common are:

  • It could be that the user does not answer the call;
  • It could be that this call is a group call and inCommingCallRinging is signalled to all the members of the group;


Tip:
Avoid search on incoming internal phone calls or „anonymous“ calls by setting a minimal length to the peer_number, eg. 4 digits

Example

onCallAccepted

This event is called when the user accepted an incoming call and is actively with the caller on the phone.

When or how to use

This is typically the event you want to use to start the workflow that suits the action when your Host application user has an active phone call.
Ask yourself what your user would do manually when he wants to log a phone call in your Host application and try to automate this process.
You can either start a workflow, change the path of your host application to the related contact, or create a new contact in your host application with the phone number already entered!

Use the phoneNumber or pbxData.peer_number for a search in your own Host application, 

Tip:
Avoid search on incoming internal phone calls or „anonymous“ calls by setting a minimal length to the peer_number, eg. 4 digits.
callType can either be „incoming“ or „outgoing“

Example

onPeerChanged

This event is called when a PBX transferred a phone call with an already active line ( Some PBX solutions call a second new line without onPeerChanged and some PBX solutions will use the existing already active line. For this reason we highly recommend to implement this event in your Host application! )

When or how to use

See onCallAccepted. Use the phoneNumber or pbxData.peer_number for a search in your own Host application, 

Example

onCallEnd

This event is called when the call is ended.

When or how to use

Use the lineData.bxData.startTime and the lineData.endTime if you want to log the call in your Host application.
The callId is the unique ID of the PBX solution that can be logged as a matching unique identifier. 

Example

onDial

This event is called when the user is making an outbound call. The call is „dialing“ ( in progress ).

When or how to use

This is typically the event you want to use to start the workflow that suits the action when your Host application user is making an outbound call. Ask yourself what your user would do manually when he wants to log a phone call in your Host application and try to automate this process.You can either start a workflow, change the path of your host application to the related contact.

When the call was initiated within your Host application ( using the Ringdesk command set ) the user probably already has the desired Host application window.

Use the phoneNumber or pbxData.peer_number for a search in your own Host application, 

Tip

Avoid search on incoming internal phone calls or „anonymous“ calls by setting a minimal length to the peer_number, eg. 4 digits.