> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Multiparty Call

> Configure multi-user calls — roles, transfers, hold music, and recording

The Multiparty Call component allows multiple users to dial in to a single call.

## Configuration parameters:

* From
* To
* Recording options
* Hold music configuration
* Transfers
* Roles
* Events

## Options:

* **Conference\_name** (required) Name of the conference bridge

* **Prompt** Announcement message to be played when a dialer is added into the conference. Speak Text and Play Audio are the types of messages. In a Speak Text message, you can configure the message to speak, language, and voice. In a Play Audio message, you can specify a URL to an audio file or upload an audio file.

* **Hold music** You can play music to users waiting for a conference to start. You can configure a URL to an audio file or upload an audio file to be played until the moderator joins the conference.

* You can play a beep or double beep when a new caller is added to or removed from the conference. Callers can be muted when joining a conference.

## States:

The Multiparty Call component is set to Completed state when there are no callers on the conference bridge. The Failed state is set when an error occurs.

## Variables:

* **from** Phone number or SIP endpoint from which the call is made
* **direction** Direction of the call can be set to `outbound` or `inbound`
* **caller\_name** Name of the caller. Defaults to the from phone number or SIP endpoint
* **to** Phone number or SIP endpoint to which the call is made
* **event** Latest triggered event in the component. Can take the values ConferenceEnter, ConferenceExit, or Redirect
* **bill\_rate** Unit rate applicable for the call
* **call\_status** Status of the call — set to `in-progress`
* **conference\_name** Name of the conference bridge
* **call\_uuid** UUID of the incoming call
* **conference\_uuid** UUID of the conference
* **member\_id** ID of a member in a conference. A unique ID is assigned to each member in a conference.
* **to\_iso2** ISO alpha-2 code of the country to which the to phone number belongs
* **from\_iso2** ISO alpha-2 code of the country to which the from phone number belongs
* **to\_country** Country to which the to phone number belongs
* **from\_country** Country to which the from phone number belongs

### Multiparty call triggers

The Multiparty Call component allows multiple users to dial in to a single call. Based on triggers, you can choose a specific action for each user on the call. These are the types of triggers:

* Call
* Hold and resume
* Transfer
* Hangup
* Resume call after warm transfer
* Abort transfer
* Voicemail drop

### Call

With the Call trigger, you can use a phone number or a SIP endpoint to make a call. When the call is received, you and the receiver are added to a conference call.

*SDK method and usage*

```shell Curl theme={null}
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 '{"trigger_source": "12025550000","to": "12025551111","role": "agent","action":"call"}'
```

```python Python theme={null}
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 = '2025550000'
to = '2025551111'
role = 'agent'

response = phlo.multi_party_call(node_id).call(trigger_source, to, role)
print str(response)
```

```java Java theme={null}
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 = "12025550000";
        String to = "12025551111";
        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).call().update();
    }
}
```

```go Go theme={null}
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"

func main() {
	testMultiPartyCallCall()
}

func testMultiPartyCallCall() {
	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{
		actionCall,
		actionTo,
		actionRole,
		actionSource,
	}

	response, _ := MPCGet.Call(callPayload)
	fmt.Printf("Response: %#v\n", response)
}
```

```php PHP theme={null}
<?php
/**
 * Example for MultiParty Call
 */
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->call($trigger_source, $to, $role);
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address
var mpcTargetNo = 'target_id'; //Trigger target address
var role = 'agent';

// Add member to multi party call
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).call(mpcSourceNo, mpcTargetNo, role).then(function (result) {
    console.log('Multiparty call result', result);
}).catch(function (err) {
    console.log('Multiparty call failed', err);
});
```

### Hold and resume

You can use the Hold trigger to place the caller on hold, during which time customer hold music is played. Once you end the hold, the customer hold music stops and the caller returns back to the conference call.

*SDK method and usage*

```shell Curl theme={null}
Hold:

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"}'

Resume:

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"}'

#Member Address- Phone number of the agent or customer
```

```python Python theme={null}
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 = '2025551111'

#Hold:
response = phlo.multi_party_call(node_id).member(member_address).hold()

#Resume:
response = phlo.multi_party_call(node_id).member(member_address).unhold()

print str(response)
```

```java Java theme={null}
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 = "12025551111";
        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();

        //Resume:
        MultiPartyCallUpdateResponse response = MultiPartyCall.updater(phloId, nodeId).member(memberId).unhold().update();
    }
}
```

```go Go theme={null}
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)

}

//Resume

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)

}
```

```php PHP theme={null}
<?php
/**
 * Example for Multiparty Hold
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;

$memberAddress = "Member_ID";

$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
    $response = $multiPartyCallMember->hold();
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>

<?php
/**
 * Example for Multiparty Unhold
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;

$memberAddress = "Member_ID";

$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
    $response = $multiPartyCallMember->unhold();
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address

// Hold - Phlo Member
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);
});


// 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);
});
```

### Warm transfer

You can use the Transfer trigger to perform either a warm or cold transfer. In a warm transfer, the caller is placed on hold while you connect to another agent. Once both of you are connected, the caller is taken off of hold and joins the conference call with you and the other agent.

*SDK method and usage*

```shell Curl theme={null}
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"}'
```

```python Python theme={null}
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 = '2025551111'
to = '2025552222'

response = phlo.multi_party_call(node_id).warm_transfer(trigger_source, to)
print str(response)
```

```java Java theme={null}
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 = "12025550000";
        String to = "12025551111";
        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();
    }
}
```

```go Go theme={null}
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() {
	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)
}
```

```php PHP theme={null}
<?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);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address
var mpcTargetNo = 'target_id'; //Trigger 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);
});
```

### Cold transfer

In a cold transfer, the customer is placed on hold while you connect to another agent. Once the other agent connects to the call, the customer is taken off the hold and joins the call with the other agent. Your call hangs up.

*SDK method and usage*

```shell Curl theme={null}
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": "12025550000","role": "agent","to":"12025551111"}'
```

```python Python theme={null}
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 = '2025550000'
to = '2025551111'

response = phlo.multi_party_call(node_id).cold_transfer(trigger_source, to)
print str(response)
```

```java Java theme={null}
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 = "12025550000";
        String to = "12025551111";
        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();
    }
}
```

```go Go theme={null}
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)
}
```

```php PHP theme={null}
<?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);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address
var mpcTargetNo = 'target_id'; //Trigger target address
var role = 'agent';

// Cold Transfer - multi party 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);
});
```

### Hangup

You can use the hangup trigger to disconnect yourself, the customer, or any other agent from the call.

*SDK method and usage*

```shell Curl theme={null}
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":"hangup"}'

  #Member Address- Phone number of the agent or customer
```

```python Python theme={null}
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)

agent1_address = '2025551111'
agent2_address = '2025552222'
customer_address = '2025553333'

#Agent 1:

response = phlo.multi_party_call(node_id).member(agent1_address).hangup()

#Agent 2:

response = phlo.multi_party_call(node_id).member(agent2_address).hangup()

#Customer:

response = phlo.multi_party_call(node_id).member(customer_address).hangup()

print str(response)
```

```java Java theme={null}
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 = "12025551111";
        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).hangup().update();
    }
}
```

```go Go theme={null}
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() {
	testMultiPartyCallMemberHangUp()
}

func testMultiPartyCallMemberHangUp() {
	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).HangUp()
	if (err != nil) {
		fmt.Println(err)
	}
	fmt.Printf("Response: %#v\n", response)

}
```

```php PHP theme={null}
<?php
/**
 * Example for multiparty hangup
 */
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->hangup();
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address

// Hangup - Phlo Member
phloClient = new PhloClient(authId, authToken);
phloClient.phlo(phloId).multiPartyCall(mpcId).member(mpcSourceNo).hangup().then(function (result) {
    console.log('hangup result - ', result);
}).catch(function (err) {
    console.log('hangup failed', err);
});
```

### Resume call after warm transfer

In a warm transfer, an agent (A1) provides the number of another agent (A2) to add to the multiparty call. The customer on the call is placed on hold. While on hold, customer hold music is played to the customer, and agents A1 and A2 are placed on the call. When agent A1 resumes the call, the customer is removed from hold and the call resumes with all of the participants.

*SDK method and usage*

```shell Curl theme={null}
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
```

```python Python theme={null}
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 = '2025551111'

response = phlo.multi_party_call(node_id).member(member_address).resume_call()
print str(response)
```

```java Java theme={null}
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 = "12025551111";
        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();
    }
}
```

```go Go theme={null}
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)

}
```

```php PHP theme={null}
<?php
/**
 * Example for multiparty resume
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;

$memberAddress = "Member_ID";

$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
    $response = $multiPartyCallMember->resume_call();
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address

// 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);
});
```

### Abort transfer

In a warm transfer, you can cancel the transfer by placing the agent back into the call with the customer.

*SDK method and usage*

```shell Curl theme={null}
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
```

```python Python theme={null}
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 = '2025551111'

response = phlo.multi_party_call(node_id).member(member_address).abort_transfer()
print str(response)
```

```java Java theme={null}
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 = "12025551111";
        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();
    }
}
```

```go Go theme={null}
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)

}
```

```php PHP theme={null}
<?php
/**
 * Example for Multiparty abort transfer
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;

$memberAddress = "Member_ID";

$client = new PhloRestClient("<auth_id>", "<auth_token>");
$phlo = $client->phlo->get("<phlo_id>");
$multiPartyCall = $phlo->multiPartyCall()->get("<node_id>");
$multiPartyCallMember = $multiPartyCall->member($memberAddress);
try {
    $response = $multiPartyCallMember->abort_transfer();
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address
var mpcTargetNo = 'target_id'; //Trigger target address
var role = 'agent';

// Abort Transfer - multi party 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);
});
```

### Voicemail drop

You can use the voicemail drop trigger to play a message when the call is answered by an answering machine (voicemail).

*SDK method and usage*

```shell Curl theme={null}
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
```

```python Python theme={null}
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 = '2025551111'

response = phlo.multi_party_call(node_id).member(member_address).voicemail_drop()
print str(response)
```

```java Java theme={null}
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 = "12025551111";
        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();
    }
}
```

```go Go theme={null}
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)

}
```

```php PHP theme={null}
<?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);
}
?>
```

```javascript Node.js theme={null}
var plivo = require('../dist/rest/client.js');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var mpcId = 'Multiparty_call_NodeID';
var phloClient = phlo = null;
var mpcSourceNo = 'member_id'; //Trigger source address

// Voice mail 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);
});
```

Read about how to install the [Plivo server SDKs](https://plivo.com/docs/sdk/server/) and set up your development environment.

You can get your Auth ID and Auth Token from the overview page of the Plivo [console](https://cx.plivo.com/home).

![](https://mintcdn.com/plivo/Ac6PoKJHHxDx1U63/images/phlo/quickstart-guides/AuthID.png?fit=max\&auto=format\&n=Ac6PoKJHHxDx1U63\&q=85\&s=d74543149c207ee5af89fc78d6f1784d)

AUTHID

You can find the PHLO\_ID on the [PHLO Listing](https://cx.plivo.com/agents) page.

![](https://mintcdn.com/plivo/GjxgkWYDEc2_LVPj/images/phlo/quickstart-guides/Phlo_listing.jpg?fit=max\&auto=format\&n=GjxgkWYDEc2_LVPj\&q=85\&s=cc02d781e67b43b495b8cba467648519)

PHLO Listing

You can get the node ID of the relevant multiparty call node from a page like this:

![](https://mintcdn.com/plivo/65CVI_jE4hodrnjj/images/phlo/quickstart-guides/multiparty_outbound.jpg?fit=max\&auto=format\&n=65CVI_jE4hodrnjj\&q=85\&s=dd02105e81a0eb6323f083d8332b8783)

Node ID
