Latest Legacy

Resume call on warm transfer

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.

API Endpoint

POST https://phlorunner.plivo.com/v1/phlo/{phlo_id}/multi_party_call/{node_id}/members/{member_address}

Arguments

URL Params

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.

Payload

Param Description/Allowed Values
action
Requiredstring

Value is always resume_call.

Returns

Returns a Member object.

Response

HTTP Status Code: 201

{
    "api_id": "11d8c251-d7bf-4aba-9763-985f21bcb455",
    "error": ""
}

Example Request

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)
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
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);
});
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);
}
?>
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();
    }
}
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());
        }
    }
}
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
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)

}