Call
The call action will connect the call to other phone numbers. For example, when the caller dials the PIOPIY phone number the incoming call can be routed to multiple phone numbers at a time, such as landline and mobile number.
- Node.js
- Python
The call()
method in the StreamAction
class allows you to initiate a call from one number to multiple recipients. The call will attempt to connect to each number in sequence, with customizable options such as call duration, timeouts and retries.
For single user:
const { StreamAction } = require("piopiy");
const stream = new StreamAction();
const destination_number = "Your destination number"; // Your destination phone number with country code.
const piopiy_number = "Your piopiy number"; // Your piopiy number provided by the Piopiy TeleCMI platform.
const options = { duration: 10, timeout: 20, loop: 1 };
stream.call(customer_number, piopiy_number, options);
For multiple users:
const { StreamAction } = require("piopiy");
const stream = new StreamAction();
const multiple_destination_numbers = [ "Your destination number", "Your destination number"]; // Multiple destination's phone numbers with country code.
const piopiy_number = "Your piopiy number"; // Your piopiy number provided by the Piopiy TeleCMI platform.
const options = { duration: 10, timeout: 20, loop: 1, ring_type: "group" };
action.call(customer_number, piopiy_number, multiple_agent_number, options);
Parameters type and description
Mandatory parameters
Parameter | Type | Description |
---|---|---|
destination_number | number | The phone number for single destination number, including country codes. |
piopiy_number | number | The piopiy number provided by the Piopiy TeleCMI platform. |
multiple_destination_numbers | array | An array of phone numbers for multiple destination numbers, including country codes. |
options | object | An object containing optional parameters (duration, timeout, loop & ring_type). |
Options Parameters
Parameter | Type | Description |
---|---|---|
duration | number | The maximum duration of the call in seconds,By default 5400 seconds. |
timeout | number | Time to wait for the call to be answered in seconds,By default 40 seconds. |
loop | number | The number of retry attempts if the call is not answered,By default 1. |
ring_type | string | The type of ringing for the call. By default, it is single, where agents receive calls one by one. If set to group, all agents will receive calls simultaneously. |
The call()
method in the StreamAction
class allows you to initiate a call from one number to multiple recipients. The call will attempt to connect to each number in sequence, with customizable options such as call duration, timeouts and retries.
For single user:
from piopiy import StreamAction
stream = StreamAction()
destination_number = "Your destination number"; # Your destination phone number with country code.
piopiy_number = "Your piopiy number" # Your piopiy number provided by the Piopiy TeleCMI platform.
options = { duration: 10, timeout: 20, loop: 1 }
stream.call(agent_number, piopiy_number, options)
For multiple users:
from piopiy import StreamAction
stream = StreamAction()
multiple_destination_numbers = ["Your destination number", "Your destination number"]; # Multiple destination's phone numbers with country code.
piopiy_number = "Your piopiy number" # Your piopiy number provided by the Piopiy TeleCMI platform.
options = { duration: 10, timeout: 20, loop: 1, ring_type: "group"}
stream.call(multiple_destination_numbers, piopiy_number, options)
Parameters type and description
Mandatory parameters
Parameter | Type | Description |
---|---|---|
destination_number | number | The phone number for single destination number, including country codes. |
piopiy_number | number | The piopiy number provided by the Piopiy TeleCMI platform. |
multiple_destination_numbers | array | An array of phone numbers for multiple destination numbers, including country codes. |
options | object | An object containing optional parameters (duration, timeout, loop & ring_type). |
Options Parameters
Parameter | Type | Description |
---|---|---|
duration | number | The maximum duration of the call in seconds,By default 5400 seconds. |
timeout | number | Time to wait for the call to be answered in seconds,By default 40 seconds. |
loop | number | The number of retry attempts if the call is not answered,By default 1. |
ring_type | string | The type of ringing for the call. By default, it is single, where agents receive calls one by one. If set to group, all agents will receive calls simultaneously. |