Home  >   Articles   >  Phone Calls Generic API

Phone Calls Generic API

In his article, you will learn about configuring phone settings, sending requests from Postman and request examples. 
A
Abdul Sameer
4 Apr, 2024 - Updated 11 days ago
Table of Contents

Introduction

Effective call management is essential for businesses to maintain seamless communication with their clients. 

Vtiger CRM offers a powerful solution through its Generic Phone Calls API, enabling users to effortlessly handle incoming calls and update call records.

A Generic Phone Call API lets you add phone call features to your CRM. It offers methods to start, manage, and handle calls, like making or receiving calls, call controls (answering, hanging up), call recording, accessing call details and updating call records.

You can use Postman to send Generic Phone calls API reqests. But before that, you must configure a Generic gateway in the Phone Configuration in the CRM settings.

Benefits

Following are the benefits of using Generic Phone call APIs:

  • Simplifies adding phone call features to CRM systems, reducing development time.
  • Customizable solution adaptable to CRM workflows and requirements.
  • Handles large call volumes within CRM environments efficiently.
  • Reduces development and maintenance costs compared to custom CRM call solutions.

Feature Availability

 

One Pilot

One Growth

One Professional

One Enterprise

Feature Availability

Phone Calls Generic API

-


To know more about feature limits, click here.
 

In his article, you will learn about:

  • Configuring phone settings.
  • Sending requests from Postman.
  • Request examples. 


 

Key Terminology

 

Phone Gateway

A phone gateway is a feature in Vtiger CRM that facilitates communication by integrating telephony services.

Postman

Postman is a popular API development tool used for testing, documenting, and sharing APIs.

API

Application Programming Interface (API) is a set of rules and protocols that allows different software applications to communicate with each other. 

Endpoint

In the context of web services and APIs, an endpoint is a specific URL that represents a resource or service provided by a server. 

UUID

Universally Unique Identifier (UUID) is a 128-bit identifier standard used in software development to uniquely identify information or entities without requiring centralized coordination.

 

Configuring Phone Settings

Follow these steps to configure the Generic gateway for phone calls:

  1. Log in to your CRM account.
  2. Click the User Menu.
  3. Click Settings.
  4. Select Phone Configuration under Extensions.
  5. Click Add Gateway.
  6. Select Generic from the drop-down.
  7. Copy and paste the Vtiger Secret Key into a notepad.
  8. Click Save.

Sending a Request From Postman

Once you configure a Generic gateway for phone calls, you must send a request from Postman to create or update Phone call records.

Follow these steps to send a request from Postman to your Vtiger instance:

  1. Log in to your Postman account.
  2. Click Send an API Request.
  3. Select the POST method from the drop-down.
  4. Enter the Endpoint as follows - (https://your_vtiger_domain/modules/PhoneCalls/callbacks/Generic.php)
  5. Click the Header tab. 
  6. Enter or select information for the following - 
    1. Key: Enter the key as (X-VTIGER-SECRET).
    2. Value: Paste the copied Vtiger Secret Key.
  7. Click the Params tab.
    1. Enter the required parameters depending on the request. Refer to the Request examples in the next section.
  8. Click Send.

Request Examples

Following are the request examples to perform certain actions during a phone call to update the Phone call record.

Call Initiation

To initiate a call, send the request with the following parameters: 

Parameter

Description

from

The number from which the call has come.

to

The number to which the call has come.

event

Call initiated

call_id

This will be stored in source  UUID and later help in updating the call record.

direction

inbound 

 

If the number of the inbound call matches a contact's number in the Office Phone Number field, then the phone call record is created for the contact.

 

Call Connected

If a call is initiated and you want to update the Status field of the call as In progress and update Handled By field, you can send the request with the following parameters.

Parameter

Description

from

The number from which the call has come.

to

The number to which the call has come, the system will search the Users module to find the user having this number in the Office Phone field.

event

call_connected

call_id

UUID of the phone call record

 

This request will find existing phone call records using the Call ID, update the Status as In Progress, and update the Handled by field using the number in the To field.


Call Recording

If you want to update the call recording link in a phone call record, then send a request with the following parameters.

Parameter

Description

call_id

UUID of the phone call record

Recording URL

Specify the URL of the recording

event

call_recording

 

Call Transfer

If a call is transferred from one user to another and you want to update the Handled By field in a phone call record of the contact who received  the call, then send the request with the following parameters: 

Parameter

Description

event

call_transfer

call_id

UUID of the phone call record

transferred_number

Pass the number of the user who picked up the call after the transfer

 

Call Status Update

After a call is completed and the status needs to be updated, send a request with the following parameters: 

Parameter

Description

event

Call Hangup

call_id

UUID of the phone call record

hangup_reason

No_answer or busy or completed or any other Value



 

To update  a phone call record based on the Hang up Reason field, send a request with the following parameters:

Parameter

Description

hangup_reason

Call status

no_answer

hangup

busy

busy

completed

completed

any_other_state

any_other_state

 

References

Was this article helpful?
0  out of  0  found this helpful.
Comments 0
Be the first to comment
© Copyright 2023 Vtiger. All rights reserved.