PHLO APIs use HTTP verbs and standard HTTP status codes to make it easier for you to integrate communications into your code. To secure your requests to our servers, we serve our API over HTTPS.
You may also want to learn about our client SDKs: iOS SDK, Android SDK, and Browser SDK.
https://phlorunner.plivo.com/{version}/
Note: The current version of the API is v1
.
Plivo exposes a list of REST APIs to perform various actions related to PHLO.
https://phlorunner.plivo.com/v1/
Plivo authenticates requests to its APIs with BasicAuth
using your AUTH ID
and AUTH TOKEN
, which you can find on the overview page of the console.
1
2
3
4
5
6
7
import plivo
proxies = {
'http': 'https://username:password@proxyurl:proxyport',
'https': 'https://username:password@proxyurl:proxyport'
}
client = plivo.RestClient('<auth_id>', '<auth_token>', proxies=proxies,timeout=5)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
require 'rubygems'
require 'plivo'
proxy = {
proxy_host: "https://proxyurl",
proxy_port: "proxyport",
proxy_user: "username",
proxy_pass: "password"
}
api = RestClient.new("<auth_id>", "<auth_token>", proxy, timeout=5)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
var plivo = require('plivo');
let options = {
'timeout': 5000, //ms
'host': 'https://proxyurl',
'port': 'proxyport',
auth: {
username: 'my-user',
password: 'my-password'
}
}
var client = new plivo.Client("<auth_id>", "<auth_token>", options);
Was this code helpful
1
2
3
4
5
6
<?php
require 'vendor/autoload.php';
use Plivo\RestClient;
$client = new RestClient("<auth_id>", "<auth_token>", "<https://proxyurl>", "<proxyport>", "<username>", "<password>");
$client->client->setTimeout(5)
Was this code helpful
1
2
3
4
5
6
7
8
9
package com.plivo.api.samples.application;
import com.plivo.api.Plivo;
class AutheExample {
public static void main(String [] args) {
Plivo.init();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System;
using System.Collections.Generic;
using Plivo;
namespace PlivoExamples {
internal class Program {
public static void Main(string[] args) {
var api = new PlivoApi(
"<auth_id>", "<auth_token>",
"<https://proxyurl>", "<proxyport>", "<username>", "<password>");
api.Client.SetTimeout(10);
}
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
package main
import "github.com/plivo/plivo-go/v7"
func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
panic(err)
}
}
Was this code helpful
Plivo only accepts input of the type application/json
.
All POST
requests arguments must be passed as json with the Content-Type set as application/json
.
All GET
and DELETE
request arguments must be passed in the query string.
Plivo server SDKs let you specify timeouts and proxy settings to be used while making API requests. Select the programming language of your choice and click on the latest version to see how to specify these settings.
Plivo uses offset-based pagination to list the resources. For instance, if your search request has a result of 100 objects with limit = 10 and offset = 5, then Plivo will return objects with indices 51 through 60.
limit integer |
A limit on the number phone numbers to be returned. limit can range between 1 and 20, and the default is 20. |
offset integer |
A pagination cursor to denote the number of objects by which the results should be offset. |
All PHLO API endpoints return a response in JSON format. An api_id
is set in each response to uniquely identify your request. The API returns one of these HTTP status codes depending on whether the API call is successful or a failure.
200 |
Request has been executed |
201 |
Resource created |
202 |
Resource changed |
204 |
Resource deleted |
400 |
A parameter is missing or is invalid |
401 |
Authentication failed |
404 |
Resource cannot be found |
405 |
HTTP method not allowed |
500 |
Server error |
api_idstring | Identifies the request |
errorstring | Indicates there’s an error and provides information about it |
messagestring | Provides information regarding the request |
{
"api_id": "495fe589-9bea-4283-b142-feb3f7d157d0",
"phlo_id": "73d6ab01-a2f6-4a84-850f-21e1d46b30bf",
"name": "Multi-party_Outbound",
"created_on": "2020-08-01 09:04:40.632232+00:00"
}
{
"phlo_id": "73d6ab01-a2f6-4a84-850f-21e1d46b30bf",
"api_id": "65bba537-7b1a-4329-9a34-cedf32b60bf1",
"error": "Could not verify your access level for that URL. You have to login with proper credentials."
}
PHLO APIs let you manage all the PHLOs in your account, run a PHLO by triggering it via an API request, and invoke triggers in PHLO components.
BaseURI
https://phlorunner.plivo.com/v1/phlo/{phlo_id}
phlo_idstring | Unique identifier for the PHLO |
namestring | Name of the PHLO |
created_ontimestamp | Date on which the PHLO was created in the account. Format: YYYY-MM-DD HH:mm:ss.SSSSSS+|-hh:mm |
{
"phlo_id": "4c1a9f23-7f56-4879-bb80-db856e1e7701",
"name": "SMS Notifications",
"created_on": "2021-01-30 09:20:08.617883+00:00"
}
GET
https://phlorunner.plivo.com/v1/phlo/{phlo_id}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
Returns a PHLO
object.
1
2
3
4
5
6
7
8
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
response = phlo_client.phlo.get(phlo_id)
print (str(response))
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
begin
phlo = client.phlo.get('<phlo_id>')
puts phlo
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var phloClient = phlo = null;
//Get Phlo details by phlo id
phloClient = new PhloClient(authId, authToken);
phloClient.phlo.get(phloId).then(function (result) {
console.log('phlo details =>', result);
}).catch(function (err) {
console.log('Failed to fetch phlo details', err);
});;
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
/**
* Example for API Request
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
try {
$response = $client->phlo->getPhlo("<phlo_id>");
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
private static final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
System.out.println("Call Response:"+ phlo);
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var phlo = phloClient.Phlo.Get(phloID);
Console.WriteLine(phlo());
}
}
}
Was this code helpful
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://phlorunner.plivo.com/v1/phlo/{phlo_id}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
func main() {
testPhloGet()
}
func testPhloGet() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 200
{
"api_id": "e4202a42-0419-43db-9889-c440d3167796",
"phlo_id": "4c1a9f23-7f56-4879-bb80-db856e1e7701",
"name": "SMS Notifications",
"created_on": "2021-01-30 09:20:08.617883+00:00"
}
Run a PHLO by triggering it via an API request to the PHLO URL. PHLO URLs are listed on the PHLO page of the console.
POST
https://phlorunner.plivo.com/v1/account/{auth_id}/phlo/{phlo_id}
Param | Description/Allowed Values |
auth_idRequiredstring | You can find your Plivo Auth ID on the overview page of the console. |
phlo_idRequiredstring | Unique identifier for the PHLO. You can find a PHLO ID on the PHLO page of the console. |
If a dynamic payload is not defined in the Start
node of the PHLO (as shown in the screenshot) then no arguments need to be passed. In this example, the payload will be defined in the Send SMS node.
If a dynamic payload is defined in the Start
node of the PHLO (as shown in the next screenshot) then values for keys defined in the Start
node of PHLO will be passed. In this example, the values are
Param | Description |
from | Value of the from key |
to | Value of the to key |
Payload defined in the Start node will be accessed in the Send SMS node using liquid tags like the one shown in the image below.
Returns an api_id
to uniquely identify the PHLO run, referred to as phlo_run_id
. The message
attribute in the response provides more information about the PHLO run.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# without payload in request
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
response = phlo.run()
print str(response)
# with payload in request
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
payload = {"from" : "+12025550000","to" : "+12025551111"}
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
response = phlo.run(**payload)
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# without payload in request
begin
phlo = client.phlo.get('<phlo_id>')
response = phlo.run()
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
# with payload in request
begin
phlo = client.phlo.get('phlo_id')
#parameters set in PHLO - params
params = {
from: '12025550000',
to: '12025551111'
}
response = phlo.run(params)
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = 'PHLO_ID';
var phloClient = phlo = null;
// without payload in request
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).run().then(function (result) {
console.log('Phlo run result', result);
}).catch(function (err) {
console.error('Phlo run failed', err);
});
// with payload in request
var payload = {
from: '12025550000',
to: '12025551111'
}
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).run(payload).then(function (result) {
console.log('Phlo run result', result);
}).catch(function (err) {
console.error('Phlo run failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Example for API Request
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
// without payload in request
$phlo = $client->phlo->get("<phlo_id>");
try {
$response = $phlo->run();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
// with payload in request
$phlo = $client->phlo->get("<phlo_id>");
try {
$response = $phlo->run(["field1" => "value1", "field2" => "value2"]); // These are the fields entered in the PHLO console
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
// without payload
public class Example
{
private static final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
PhloUpdateResponse response = Phlo.updater(phloId).payload().run();
}
}
// with payload
public class Example
{
private static final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
Map<String, Object> payload = new HashMap<>();
payload.put("phone", "+12025550000");
payload.put("to", "+12025551111");
PhloUpdateResponse response = Phlo.updater(phloId).payload(payload).run();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using Plivo;
// without payload
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var phlo = phloClient.Phlo.Get(phloID);
Console.WriteLine(phlo.Run());
}
}
}
// with payload
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var phlo = phloClient.Phlo.Get(phloID);
var data = new Dictionary<string, object>
{
{ "from", "12025550000" },
{ "to", "12025551111" }
};
Console.WriteLine(phlo.Run(data));
}
}
}
Was this code helpful
1
2
3
4
5
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/account/{auth_id}/phlo/{phlo_id}' \
--header 'Content-Type: application/json' \
--data '{"from": "12025550000","to": "12025551111"}'
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
// without payload in request
func main() {
testPhloRunWithoutParams()
}
func testPhloRunWithoutParams() {
phloClient, err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := phloGet.Run(nil)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}
// with payload in request
func main() {
testPhloRunWithParams()
}
func testPhloRunWithParams() {
phloClient, err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
//pass corresponding from and to values
type params map[string]interface{}
response, err := phloGet.Run(params{
"from": "12025550000",
"to": "12025551111",
})
if err != nil {
println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"phlo_id": "4c1a9f23-7f56-4879-bb80-db856e1e7701",
"api_id": "7b6f8256-07c7-4d9a-bf2a-a2cd0f05d269",
"message": "b'Send SMS' - b'Send SMS_1' with phlo_run_uuid: 7b6f8256-07c7-4d9a-bf2a-a2cd0f05d269 executed with response: {'api_id': '81525812-3c04-11e9-aa1e-06c75f1208d2',\n 'message': 'message(s) queued',\n 'message_uuid': ['8152b05a-3c04-11e9-aa1e-06c75f1208d2']}"
}
message will differ depending on the node defined for the PHLO trigger
The multiparty call component lets multiple users dial in to a single call. The component has triggers to add users into the call, perform warm and cold transfers, and manage members on the call.
Call members can be assigned agent
or customer
roles. An agent
can initiate and manage transfers. When members are placed on hold, the agent hold music configured in the UI is played to agent
members and customer hold music is played to customer
members.
node_idstring | Unique identifier for the node. |
phlo_idstring | Unique identifier for the PHLO. |
namestring | Node name. |
node_typestring | Component type of the node: multi_party_call. |
created_ontimestamp | Date on which the PHLO was created. Format: YYYY-MM-DD HH:mm:ss.SSSSSS+|-hh:mm |
{
"node_id": "b4b48fc2-f47a-4a93-97c3-749ed9a40fa8",
"phlo_id": "73d6ab01-a2f6-4a84-850f-21e1d46b30bf",
"name": "Multi-Party Call_1",
"node_type": "multi_party_call",
"created_on": "2020-08-01 09:05:11.846982+00:00"
}
GET
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the node. Node ID is available in the configuration section of the corresponding multiparty call node in the PHLO. See the screenshot below. |
Param | Description/Allowed Values |
actionRequired | Value is always call. |
toRequired | Phone number or SIP endpoint address of the user to add to the multiparty call. |
roleRequired | Role of the user added to the multiparty call. Allowed values: customer, agent |
trigger_sourceRequired | Phone number or SIP endpoint address of the user (agent) initiating the trigger. |
Returns a MultiPartyCall
object.
HTTP Status Code: 200
{
"api_id": "2163e3fb-d6d0-46fb-a4ce-2d24a6b0b89f",
"node_id": "b4b48fc2-f47a-4a93-97c3-749ed9a40fa8",
"phlo_id": "73d6ab01-a2f6-4a84-850f-21e1d46b30bf",
"name": "Multi-Party Call_1",
"node_type": "multi_party_call",
"created_on": "2020-08-01 09:05:11.846982+00:00"
}
Triggers the multiparty call to dial a user into the call or warm or cold transfer a user.
BaseURI
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}
Dials a phone number or a SIP endpoint and adds the user to the multiparty call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the multiparty call. The ID is available in the configuration section of the corresponding multiparty call node in the PHLO. |
Param | Description/Allowed Values |
actionRequired | Value is always call. |
toRequired | Phone number or SIP endpoint address of the user to add to the multiparty call. |
roleRequired | Role of the user added to the multiparty call. Allowed values: customer, agent |
trigger_sourceRequired | Phone number or SIP endpoint address of the user (agent) initiating the trigger. |
Returns a MultiPartyCall
object.
HTTP Status Code: 201
{
"api_id": "073e36d4-fd1e-4be3-b00b-ab33105011a7",
"error": ""
}
A user (U1) can transfer a call with a member (U2) of a multiparty call to another user (U3). With a warm transfer, the user who initiates the transfer (U1) and the user to whom the call is transferred to (U3) can speak privately before U2 is added to the call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier of a PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier of the node. The ID is available in the configuration section of the corresponding multiparty call node in the PHLO. |
Param | Description/Allowed Values |
actionRequired | Value is always warm_transfer. |
toRequired | Phone number or SIP endpoint address of the user to which the call is to be transferred. |
roleRequired | Role of the user added to the multiparty call. Allowed values: customer, agent |
trigger_sourceRequired | Phone number or SIP endpoint address of the user initiating the transfer. |
Returns a MultiPartyCall
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
trigger_source = '<member_address>'
to = '<target_address>'
response = phlo.multi_party_call(node_id).warm_transfer(trigger_source, to)
print (str(response))
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
# multi_party_call.warm_transfer(<trigger_source>, <to>)
begin
response = multi_party_call.warm_transfer('<member_address>', '<target_address>')
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_address>';
var mpcTargetNo = '<target_address>';
var role = 'agent';
// Warm Transfer - multi party call
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).warmTransfer(mpcSourceNo, mpcTargetNo, role).then(function (result) {
console.log('Warm transfer result', result);
}).catch(function (err) {
console.log('Warm transfer failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
* Example for Multiparty warm transfer
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
try {
$response = $multiPartyCall->warm_transfer($trigger_source, $to, $role);
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String triggerSource = "<member_address>";
String to = "<target_address>";
String memberId = to;
String role = "agent";
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).triggerSource(triggerSource).to(to).role(role).warm_transfer().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var triggerSource = "<member_address>";
var to = "<target_address>";
var role = "agent";
Console.WriteLine(multiPartyCallObj.WarmTransfer(triggerSource, to));
}
}
}
Was this code helpful
1
2
3
4
5
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}' \
--header 'Content-Type: application/json' \
--data '{"action": "warm_transfer","trigger_source": "12025550000","role": "agent","to":"12025551111"}'
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const actionTo = "<member_address>"
const actionSource = "<target_address>"
//Use the following multiparty call actions as needed; do not edit the following
const actionRole = "agent"
const actionCall = "call"
const actionWarmTransfer = "warm_tranfer"
const actionColdTransfer = "cold_transfer"
func main() {
testMultiPartyCallWarmTransfer()
}
func testMultiPartyCallWarmTransfer() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
callPayload := plivo.PhloMultiPartyCallActionPayload{
actionWarmTransfer,
actionTo,
actionRole,
actionSource,
}
response, err := MPCGet.WarmTransfer(callPayload)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "faad0293-f5f0-487e-8ff7-b45ba6c45b25",
"error": ""
}
A user (U1) can transfer a call with a member (U2) on a multiparty call to another user (U3). With a cold transfer, user U2 is connected directly to the user to whom the call is transferred (U3) and the user initiating the cold transfer (U1) is disconnected from the multiparty call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier of the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier of the multiparty call. The ID is available in the configuration section of the corresponding multiparty call node in the PHLO. |
Param | Description/Allowed Values |
actionRequired | Value is always cold_transfer. |
toRequired | Phone number or SIP endpoint address of the user to which the call is to be transferred. |
roleRequired | Role of the user added to the multiparty call. Allowed values: customer, agent |
trigger_sourceRequired | Phone number or SIP endpoint address of the user (agent) initiating the transfer. |
Returns a MultiPartyCall
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
trigger_source = '<from_endpoint>'
to = '<to_endpoint>'
response = phlo.multi_party_call(node_id).cold_transfer(trigger_source, to)
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
multi_party_call = phlo.multi_party_call('<node_id>')
# multi_party_call.cold_transfer(<trigger_source>, <to>)
begin
response = multi_party_call.cold_transfer('<from_endpoint>', '<to_endpoint>')
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>'; //Trigger source address
var mpcTargetNo = '<target_id>'; //Trigger target address
var role = 'agent';
// Cold Transfer - multiparty call
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).coldTransfer(mpcSourceNo, mpcTargetNo, role).then(function (result) {
console.log('Cold transfer result', result);
}).catch(function (err) {
console.log('Cold transfer failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
* Example for MultiParty Cold transfer
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
try {
$response = $multiPartyCall->cold_transfer($trigger_source, $to, $role);
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String triggerSource = "<from_endpoint>";
String to = "<to_endpoint>";
String memberId = to;
String role = "agent";
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).triggerSource(triggerSource).to(to).role(role).cold_transfer().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var triggerSource = "<from_endpoint>";
var to = "<to_endpoint>";
var role = "agent";
Console.WriteLine(multiPartyCallObj.ColdTransfer(triggerSource, to));
}
}
}
Was this code helpful
1
2
3
4
5
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}' \
--header 'Content-Type: application/json' \
--data '{"action": "cold_transfer","trigger_source": "<from_endpoint>","role": "agent","to":"<to_endpoint>"}'
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const actionTo = "<to_endpoint>"
const actionSource = "<from_endpoint>"
//Use the following multiparty call actions as needed; do not edit the following
const actionRole = "agent"
const actionCall = "call"
const actionWarmTransfer = "warm_tranfer"
const actionColdTransfer = "cold_transfer"
func main() {
testMultiPartyCallColdTransfer()
}
func testMultiPartyCallColdTransfer() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
callPayload := plivo.PhloMultiPartyCallActionPayload{
actionColdTransfer,
actionTo,
actionRole,
actionSource,
}
response, err := MPCGet.ColdTransfer(callPayload)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "8c77b816-d621-4028-afc8-1aeab1d497a8",
"error": ""
}
A member
is created when someone joins a multiparty call. Plivo lets you manage call transfers and change the states of members in a multiparty call.
node_idstring | Unique identifier for the node. |
node_typestring | Component type of the node. Value is always multi_party_call. |
phlo_idstring | Unique identifier for the PHLO. |
member_address | Phone number or SIP endpoint address of the member to put on hold. |
created_ontimestamp | Datetime when the PHLO was created. Format: YYYY-MM-DD HH:mm:ss.SSSSSS+|-hh:mm |
{
"node_id": "36989807-a76f-4555-84d1-9dfdccca7a80",
"node_type": "multi_party_call",
"phlo_id": "e564a84a-7910-4447-b16f-65c541dd552c",
"member_address": "9999999999",
"created_on": "2020-11-03 19:32:33.240504+00:00'
}
Perform actions on members in a multiparty call. You can hold, unhold, and hang up members, resume and abort transfers, and drop voicemail for members.
BaseURI
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Places a member in the multiparty call on hold. When a member places the call on hold, the member will be muted and the other members will hear the hold music. You can configure agent hold music and customer hold music in the node.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier of the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier of the node, which is available in the configuration section of the corresponding multiparty call node in the PHLO. |
member_address Required |
Phone number or SIP endpoint address of the member to put on hold. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always hold. |
Returns a Member
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
member_address = '<member_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
#Hold:
response = phlo.multi_party_call(node_id).member(member_address).hold()
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
multi_party_call = phlo.multi_party_call('<node_id>')
# member_address => phone number of the member who is being put on hold
#
# multi_party_call.member(<member_address>).hold
begin
response = multi_party_call.member('<member_id>').hold
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>';
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).member(mpcSourceNo).hold().then(function (result) {
console.log('hold result -', result);
}).catch(function (err) {
console.log('hold failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for MultiParty Hold
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$memberAddress = "<member_id>";
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
$response = $multiPartyCallMember->hold();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String to = "<member_id>";
String memberId = to;
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
//Hold:
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).hold().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var MemberId = "<member_id>";
Console.WriteLine(multiPartyCallObj.Member(MemberId).Hold());
}
}
}
Was this code helpful
1
2
3
4
5
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{MemberAddress}' \
--header 'Content-Type: application/json' \
--data '{"action":"hold"}'
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const memberId = "<member_id>"
//HOLD
func main() {
testMultiPartyCallMemberHold()
}
func testMultiPartyCallMemberHold() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := MPCGet.Member(memberId).Hold()
if (err != nil) {
fmt.Println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
Removes the hold placed on a member of a multiparty call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the node, which is available in the configuration section of the corresponding multiparty call node in the PHLO. |
member_address Required |
Phone number or SIP endpoint address of the member to unhold. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always unhold. |
Returns a Member
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
member_address = '<member_id>'
response = phlo.multi_party_call(node_id).member(member_address).unhold()
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
multi_party_call = phlo.multi_party_call('<node_id>')
# member_address => phone number of the member
#
# multi_party_call.member(<member_address>).unhold
begin
response = multi_party_call.member('<member_id>').unhold
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>';
// Unhold - Phlo Member
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).member(mpcSourceNo).unhold().then(function (result) {
console.log('unhold result -', result);
}).catch(function (err) {
console.log('unhold failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for MultiParty Unhold
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$memberAddress = "<member_id>";
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
$response = $multiPartyCallMember->unhold();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String to = "<member_id>";
String memberId = to;
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
//Unhold:
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).unhold().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var MemberId = "<member_id>";
Console.WriteLine(multiPartyCallObj.Member(MemberId).Unhold());
}
}
}
Was this code helpful
1
2
3
4
5
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{MemberAddress}' \
--header 'Content-Type: application/json' \
--data '{"action":"unhold"}'
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const memberId = "<member_id>"
//Unhold
func main() {
testMultiPartyCallMemberUnHold()
}
func testMultiPartyCallMemberUnHold() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := MPCGet.Member(memberId).UnHold()
if (err != nil) {
fmt.Println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
Disconnects a member from a multiparty call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the node, which is available in the configuration section of the corresponding multiparty call node in the PHLO. |
MemberAddress Required |
Phone number or SIP endpoint address of the member to disconnect from the call. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always hangup. |
Returns a Member
object.
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
Resumes the multiparty call after a warm transfer. This action can be performed either by the initiator of the warm transfer or the recipient of the transferred call.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the node, which you can get by clicking on the multiparty call node on the PHLO canvas. |
member_address Required |
Phone number or SIP endpoint address of the member to return to the call. The member should be either initiator of the warm transfer or recipient of the transferred call. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always resume_call. |
Returns a Member
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
member_address = '<member_id>'
response = phlo.multi_party_call(node_id).member(member_address).resume_call()
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
multi_party_call = phlo.multi_party_call('<node_id>')
# agent_address => number of the agent to be added to the original multiparty call on completion of call between agents
#
# multi_party_call.member(<agent_address>).resume_call
begin
response = multi_party_call.member('<member_id>').resume_call
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>';
// Resume Call - Phlo Member
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).member(mpcSourceNo).resumeCall().then(function (result) {
console.log('resume call result', result);
}).catch(function (err) {
console.log('resume call failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for MultiParty Resume
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$memberAddress = "<member_id>";
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
$response = $multiPartyCallMember->resume_call();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String to = "<member_id>";
String memberId = to;
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).resume_call().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var MemberId = "<member_id>";
Console.WriteLine(multiPartyCallObj.Member(MemberId).ResumeCall());
}
}
}
Was this code helpful
1
2
3
4
5
6
7
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{MemberAddress}' \
--header 'Content-Type: application/json' \
--data '{"action":"resume_call"}'
#Member Address- Phone number of the agent or customer
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const memberId = "<member_id>"
func main() {
testMultiPartyCallMemberResume()
}
func testMultiPartyCallMemberResume() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := MPCGet.Member(memberId).ResumeCall()
if (err != nil) {
fmt.Println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
Aborts a call transfer.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier of the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier of the node, which is available in the configuration section of the corresponding multiparty call node in the PHLO. |
member_address Required |
Phone number or SIP endpoint address of the member initiating the transfer. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always abort_transfer. |
Returns a Member
object.
1
2
3
4
5
6
7
8
9
10
11
12
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
member_address = '<member_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
response = phlo.multi_party_call(node_id).member(member_address).abort_transfer()
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('<phlo_id>')
multi_party_call = phlo.multi_party_call('<node_id>')
# multi_party_call.member(<agent_address>).abort_transfer
begin
response = multi_party_call.member('<member_id>').abort_transfer
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>';
// Abort Transfer - multiparty call
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).abortTransfer(mpcSourceNo).then(function (result) {
console.log('abort transfer result', result);
}).catch(function (err) {
console.log('abort transfer failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for Multiparty Abort transfer
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$memberAddress = "<member_id>";
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
$response = $multiPartyCallMember->abort_transfer();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String to = "<member_id>";
String memberId = to;
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).abort_transfer().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("<node_id>");
var MemberId = "<member_id>";
Console.WriteLine(multiPartyCallObj.Member(MemberId).AbortTransfer());
}
}
}
Was this code helpful
1
2
3
4
5
6
7
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{MemberAddress}' \
--header 'Content-Type: application/json' \
--data '{"action":"abort_transfer"}'
#Member Address- Phone number of the agent or customer
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const memberId = "<member_id>"
func main() {
testMultiPartyCallAbortTransfer()
}
func testMultiPartyCallAbortTransfer() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := MPCGet.Member(memberId).AbortTransfer()
if (err != nil) {
fmt.Println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
When a call is answered by an answering machine or voicemail, this method lets you to play a prerecorded audio or text-to-speech message to the device.
POST
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}
Param | Description/Allowed Values |
phlo_idRequiredstring | Unique identifier for the PHLO. PHLO IDs are listed on the PHLO page of the console. |
node_idRequiredstring | Unique identifier for the node, which is available in the configuration section of the corresponding multiparty call node in the PHLO. |
member_address Required |
Phone number or SIP endpoint address of the member to be voicemail dropped. |
Param | Description/Allowed Values |
action Requiredstring |
Value is always voicemail_drop. |
Returns a Member
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
import plivo
auth_id = '<auth_id>'
auth_token = '<auth_token>'
phlo_id = '<phlo_id>'
node_id = '<node_id>'
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
phlo = phlo_client.phlo.get(phlo_id)
member_address = '<member_id>'
response = phlo.multi_party_call(node_id).member(member_address).voicemail_drop()
print str(response)
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'rubygems'
require 'plivo'
include Plivo
AUTH_ID = '<auth_id>'
AUTH_TOKEN = '<auth_token>'
client = Phlo.new(AUTH_ID, AUTH_TOKEN)
# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new
# provide the phlo_id in params
phlo = client.phlo.get('phlo_id')
multi_party_call = phlo.multi_party_call('<node_id>')
# member_address => customer's number/endpoint
#
# multi_party_call.member(<member_address>).voicemail_drop
begin
response = multi_party_call.member('<member_id>').voicemail_drop
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;
var authId = '<auth_id>';
var authToken = '<auth_token>';
var phloId = '<phlo_id>';
var mpcId = '<node_id>';
var phloClient = phlo = null;
var mpcSourceNo = '<member_id>';
// Voicemail drop - Phlo Member
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).member(mpcSourceNo).voicemailDrop().then(function (result) {
console.log('Voicemail drop call result -', result);
}).catch(function (err) {
console.log('Voicemail drop call failed', err);
});
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
* Example for MultiParty Voicemail Drop
*/
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$memberAddress = "<member_id>";
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
$response = $multiPartyCallMember->voicemail_drop();
print_r($response);
} catch (PlivoRestException $ex) {
print_r($ex);
}
?>
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.node.MultiPartyCall;
import com.plivo.api.models.node.MultiPartyCallActionType;
import com.plivo.api.models.node.MultiPartyCallUpdateResponse;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;
public class Example
{
privatestatic final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
private static PlivoClient client = new PlivoClient(authId, authToken);
public static void main(String[] args) throws IOException, PlivoRestException
{
String phloId = "<phlo_id>";
String nodeId = "<node_id>";
String to = "<member_id>";
String memberId = to;
Plivo.init(authId, authToken);
Phlo phlo = Phlo.getter(phloId).client(client).get();
MultiPartyCall mpc = MultiPartyCall.getter(phloId, nodeId).get();
MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).voicemail_drop().update();
}
}
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using Plivo;
namespace test_PHLO_dotnet
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var nodeID = "<node_id>";
var phlo = phloClient.Phlo.Get(phloID);
var multiPartyCallObj = phlo.MultiPartyCall("nodeID");
var MemberId = "<member_id>";
Console.WriteLine(multiPartyCallObj.Member(MemberId).VoicemailDrop());
}
}
}
Was this code helpful
1
2
3
4
5
6
7
curl --request POST \
--user AUTH_ID:AUTH_TOKEN \
--url 'https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{MemberAddress}' \
--header 'Content-Type: application/json' \
--data '{"action":"voicemail_drop"}'
#Member Address- Phone number of the agent or customer
Was this code helpful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"plivo-go"
)
// Initialize the following params with corresponding values to trigger resources
const authId = "<auth_id>"
const authToken = "<auth_token>"
const phloId = "<phlo_id>"
const nodeId = "<node_id>"
const memberId = "<member_id>"
func main() {
testMultiPartyCallMemberVoiceMailDrop()
}
func testMultiPartyCallMemberVoiceMailDrop() {
phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
phloGet, err := phloClient.Phlos.Get(phloId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
MPCGet, err := phloGet.MultiPartyCall(nodeId)
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := MPCGet.Member(memberId).VoiceMailDrop()
if (err != nil) {
fmt.Println(err)
}
fmt.Printf("Response: %#v\n", response)
}
Was this code helpful
HTTP Status Code: 201
{
"api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
"error": ""
}
A PHLO run is created when a PHLO is triggered via an incoming SMS message, incoming call, or API request. A unique identifier is generated every time a PHLO is triggered.
phlo_idstring | Unique identifier for the PHLO. |
run_idstring | Unique identifier for the PHLO run. |
call_uuidsArray of UUIDs | List of calls triggered in the PHLO run. |
message_uuidsArray of UUIDs | List of messages triggered in the PHLO run. |
recording_idsArray of IDs | List of recordings created in the PHLO run. |
{
"phlo_id": "e564a84a-7910-4447-b16f-65c541dd552c",
"run_id": "b7df01fd-1cb0-404e-a0d1-21e69a610e84",
"call_uuids": ["11e4f82c-069c-49f9-9fcb-54c6633e2cdb"],
"message_uuids": [],
"recording_ids": []
}
GET
https://phlorunner.plivo.com/v1/phlo/{phlo_id}/runs/{run_id}
phlo_idstring | Unique identifier for the PHLO. |
run_idstring | Unique identifier for the PHLO run. |
call_uuidsArray of UUIDs | List of calls triggered in the PHLO run. |
message_uuidsArray of UUIDs | List of messages triggered in the PHLO run. |
recording_idsArray of IDs | List of recordings created in the PHLO run. |
Returns a PHLO Run
object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.phlo.Phlo;
import com.plivo.api.models.phlo.PhloRunGetterResponse;
public class Example
{
private static final String authId = "<auth_id>";
private static final String authToken = "<auth_token>";
public static void main (String args[]) {
Plivo.init(authId, authToken);
try {
PhloRunGetterResponse resp = Phlo.phloRunGetter("<phlo_id>", "<run_id>").get();
System.out.println(resp);
} catch (IOException | PlivoRestException e) {
e.printStackTrace();
}
}
}
Was this code helpful
HTTP Status Code: 200
{
"api_id": "36989807-a76f-4555-84d1-9dfdccca7a80",
"phlo_id": "e564a84a-7910-4447-b16f-65c541dd552c",
"run_id": "b7df01fd-1cb0-404e-a0d1-21e69a610e84",
"call_uuids": ["11e4f82c-069c-49f9-9fcb-54c6633e2cdb"],
"message_uuids": [],
"recording_ids": []
}