- Home [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Getting started
- Manage types
- Global context and isolation
- Manage apps
- Work with external services
- Scripts in widgets
- Web components
- Access permissions
- Getting started with processes
- Getting started with signatures
- Getting started with file previews
- Getting started with the organizational chart
- Getting started with users and groups
-
Getting started with the
Table data type - Use cases
- How to set up custom view of app items
- How to set up dynamic display of fields and widgets with a complex condition
- How to register a document
- How to calculate the number of days between two dates
- How to create a substitution for a user
- How to use pagination and sorting when searching for app items
- Integration with IP telephony
In this article
Integration with IP telephony
By default, the system includes integrations with different IP telephony providers. If the provider you need is not in the list, you can use this API to configure an integration on your own. To do that, create a custom module and add several functions in the module’s scripts using TypeScript.
Built-in and custom telephony integration modules basically work in the same way and have the same features. Your module allows you to:
Limitations
Before you start implementing your own IP telephony integration, consider the following limitations of APIs:Implementation
To create an integration module, you need to add the following functions to the custom module’s scripts:
When you add these functions and save the script on the module’s page, you will see a new section, Telephony settings. In this section, you will see your link to the webhook. Each time data is sent to this link, the// Checking the connection with the telephony provider. The function is called when a user clicks the Check connection on the module’s page. // Returns the connection checking status shown to the user on the module’s page. async function VoipTestConnection(): Promise<VoipTestConnectionResult> { } // Processing a request from your IP telephony provider. The function is called when a request to the module’s webhook is made. // The 'request' parameter stores information about the HTTP request, including HTTP headers and the request body contents. // The function returns the result of request processing. // Based on this result, the system will show notifications about the incoming call, save the call recording, etc. async function VoipParseWebhookRequest(request: FetchRequest): Promise<VoipWebhookParseResult> { } // Getting a list of users from the IP telephony provider. // This function is called when telephony users are associated with system users, after a user clicks Configure on the module’s page. // It returns a list of telephony provider users. async function VoipGetMembers(): Promise<VoipMember[]> { } // Generating an outgoing call. This function is called when a system user clicks Call // in a Phone number type field of an app item. In the `srcPhone` parameters, the caller’s phone number is specified, // and `dstPhone` is the number that is called. async function VoipGenerateCall(srcPhone: string, dstPhone: string): Promise<void> { } // Getting a link to a call recording. This function is called when a user plays a call recording in the app item’s activity stream. // The 'callData' parameter stores data from the `VoipParseWebhookRequest` function // specified when the information about the recording was saved. The function returns a link to a file. async function VoipGetCallLink(callData: any): Promise<string> { } // This function is called automatically when the link to the webhook changes (for example, then the token is updated). // The `webhookUrl` parameter stores an absolute link to the integration module’s webhook. Using this function is optional. async function VoipOnWebhookUpdated(webhookUrl: string): Promise<void> { }
VoipParseWebhookRequest
function you added to the script will be called. This function helps you to process the request and returns its instance,VoipWebhookParseResult
, that is used by the system to display information about the call and save information about the call recording. You need to specify the link to the webhook in your IP telephony provider’s settings. The link processes HTTP requests of theGET
andPOST
types. It has to contain the required parametertoken
.