Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Basic call control functions

Updated on December 13, 2021

You can perform basic call state control, such as answering a call, putting a call on hold, and making a call.

Pega Call supports call types that you can use to circumstance call treatment rules. The pyCallType property specifies the call types, which include:

INBOUND
For inbound calls
CONSULT
For consultation and transferred calls
OUTBOUND
For calls placed from the contact center or the CSR's phone to an external phone number
INTERNAL
For calls that are internal to the call center, such as calls from one CSR to another

Each call state activity in the Call Control Panel sends a request to the Computer Telephony Integration (CTI) server. The CTI server receives a call handling request, applies appropriate settings, and returns an event that instructs the Call Control Panel how to handle the call.

Basic call control includes the following call handling requests:

Answering a call
This request uses the answerCall function to answer an incoming call from the line that is in an alerting or ringing state.
Putting a call on hold
This request uses the holdCall function to hold and activate a call. The CTI server uses the CallId parameter to identify and place the call on hold.
Initiating a call (Make call)
This request uses the makeCall function to place or initiate a call. The CTI server uses the destination parameter to set the destination number on the server.
Concluding a call (Hang up)
This request uses the hangUpCall function to end a call.
Retrieving a call from a hold state
This request uses the retrieveCall function to release a call from a hold state and move it to an active state.
Sending a dual tone multiple frequencies (DTMF) tone when the call is on hold
This requests uses the sendDTMF function to send DTMF tones while the call is on hold.

Enabling call control

You must map the CTI server Inbound event to the Pega Platform framework layer, using the forwardEvent parameter of the login function.

When the Pega Platform layer receives an Inbound offering event, it applies call control functions and processes the event.

The answerCall function

The answerCall function is called to move the call answer state to an incoming call while in a ringing state. This function uses the callId parameter to place an answer call request to the CTI server. If no calls are found in the ringing state, then an error is returned to the Call Control Panel.

This function uses the following parameters:

Parameters of the answerCall function

ParameterDescription
callIdThe call identifier
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the answer call request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

The holdCall function

The holdCall function is used to put an ongoing call on hold. This function uses the callId parameter to place the hold call request to the CTI server.

This function uses the following parameters:

Parameters of the holdCall function

ParameterDescription
callIdThe call identifier
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the hold call request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

The makeCall function

The makeCall function is used to place a new call to a destination number that is specified on the interface file. This function uses the destination parameter to send the new call request to the CTI server. If the call is successful, then no data is returned from the CTI server. If the make call request is unsuccessful, then the CTI server returns an error to the Call Control Panel.

This function uses the following parameters:

Parameters of the makeCall function

ParameterDescription
destinationThe phone number that is used to dial to send the new call request
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the make call request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

The hangUpCall function

The hangUpCall function is invoked to release an active call from an established state. This function uses the callId parameter to place the hang-up call request to the CTI server. If the call is successfully released, then the state of the call is changed to the released state. If the hangup call request is unsuccessful, then the CTI server returns an error to the Call Control Panel.

This function uses the following parameters:

Parameters of the hangUpCall function

ParameterDescription
callIdThe call identifier
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the hang up call request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

The retrieveCall function

The retrieveCall function is called to retrieve the call from a hold state to an active state. This function uses the callId parameter to perform a retrieve call request to the CTI server. If the call retrieval is successful, then the state of the call is changed to the active state. If the request is unsuccessful, then the CTI server will return an error to the Call Control Panel.

This function uses the following parameters:

Parameters of the retrieveCall function

ParameterDescription
callIdThe call identifier
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the retrieve call request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

The sendDTMF function

The sendDTMF function is used to send DTMF tones while the call is on hold. If the request is unsuccessful, then the CTI server returns an error to the Call Control Panel.

This function uses the following parameters:

Parameters of the sendDTMF function

ParameterDescription
callIdThe call identifier
digitsThe string of tones that are sent while the call is put on hold
optionsThe object that holds the additional parameters that are required to complete the request
successThe callback function that is invoked on success
failureThe callback function that is invoked on failure

To send the send DTMF tone request to the CTI server, copy the function from the interface file and implement it in your implementation JavaScript file.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us