Forward Call
The bridge 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.
- Curl
- Node.js
- Python
Bridge action JSON
- Single
- Group
[
{
action: "bridge",
duration: 300,
timeout: 20,
from: 19170000000,
loop: 2,
connect: [
{
type: "pstn",
number: 440000000000,
}
]
}
]
[
{
action: "bridge",
duration: 300,
timeout: 20,
from: 19170000000,
loop: 2,
ring_type: "group",
connect: [
{
type: "pstn",
number: 440000000000,
},
{
type: "pstn",
number: 440000000001,
}
]
}
]
Parameters type and description
Parameter | Type | Description |
---|---|---|
*action | string | The PCMO action to control the flow of the call. |
from | number | It defines the caller id of this call. By default, the from number will be PIOPIY plaform's default phone number. |
duration | number | The duration of this call in seconds. By default, the duration is 5400. seconds. |
timeout | number | The ringing time of this call in seconds, The default value for timeout is 40. |
loop | number | The total number of retry, of this call. By default, the loop is 1. |
ring_type | string | It defines to call multiple phone numbers at a time. By default, the ring type is single. |
*connect | JSON array |
|
Note
The call()
method in the PiopiyAction
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 { PiopiyAction } = require("piopiy");
const action = new PiopiyAction();
const customer_number = "Your customer number"; // Your customer phone number with country code.
const piopiy_number = "Your piopiy number"; // Your piopiy number provided by the Piopiy TeleCMI platform.
const agent_number = "Your agent phone number"; // Your agent phone number with country code.
const options = { duration: 10, timeout: 20, loop: 1 };
action.call(customer_number, piopiy_number, agent_number, options)
For multiple users:
const {PiopiyAction} = require("piopiy");
const action = new PiopiyAction();
const customer_number = "Your customer number"; // Your customer phone number with country code.
const piopiy_number = "Your piopiy number"; // Your piopiy number provided by the Piopiy TeleCMI platform.
const multiple_agent_number = ["Your agent phone number", "Your agent phone number"]; // Multiple agent's phone number with country code.
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 |
---|---|---|
customer_number | number | The phone number of the customer being called, including the country code. |
piopiy_number | number | The piopiy number provided by the Piopiy TeleCMI platform. |
agent_number | number | The phone number for single agent, including country codes. |
multiple_agent_number | array | An array of phone numbers for multiple agents, 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 PiopiyAction
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 Action
action = Action()
customer_number = "Your customer number" # Your customer phone number with country code.
piopiy_number = "Your piopiy number" # Your piopiy number provided by the Piopiy TeleCMI platform.
agent_number = "Your agent phone number" # Your agent phone number with country code.
options = { duration: 10, timeout: 20, loop: 1 }
action.call(customer_number, piopiy_number, agent_number, options)
For multiple users:
from piopiy import Action
action = Action()
customer_number = "Your customer number" # Your customer phone number with country code.
piopiy_number = "Your piopiy number" # Your piopiy number provided by the Piopiy TeleCMI platform.
multiple_agent_number = ["Your agent phone number", "Your agent phone number"] # Multiple agent's phone number with country code.
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 |
---|---|---|
customer_number | number | The phone number of the customer being called, including the country code. |
piopiy_number | number | The piopiy number provided by the Piopiy TeleCMI platform. |
agent_number | number | The phone number for single agent, including country codes. |
multiple_agent_number | array | An array of phone numbers for multiple agents, 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. |