Transfiera una llamada de punto a punto activa o una llamada de grupo.
Nota: Esto solo se admite si tanto el receptor como el destino de transferencia son usuarios de Microsoft Teams que pertenecen al mismo inquilino. La transferencia al número RTC solo se admite para la instancia de la aplicación. Para obtener más información sobre el transferor, el cesionario y el destino de transferencia, consulte RFC 5589.
Una transferencia consultiva significa que el transferible puede informar a la persona a la que desea transferir la llamada (el cesionario), antes de realizar la transferencia. Esto se opone a la transferencia directa de la llamada.
Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
},
},
AdditionalData = new Dictionary<string, object>
{
{
"endpointType" , "default"
},
},
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphcommunications.NewTransferPostRequestBody()
transferTarget := graphmodels.NewInvitationParticipantInfo()
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "550fae72-d251-43ec-868c-373732c2704f"
user.SetId(&id)
displayName := "Heidi Steen"
user.SetDisplayName(&displayName)
identity.SetUser(user)
transferTarget.SetIdentity(identity)
additionalData := map[string]interface{}{
"endpointType" : "default",
}
transferTarget.SetAdditionalData(additionalData)
requestBody.SetTransferTarget(transferTarget)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Communications().Calls().ByCallId("call-id").Transfer().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
identity.setUser(user);
transferTarget.setIdentity(identity);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("endpointType", "default");
transferTarget.setAdditionalData(additionalData);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Communications\Calls\Item\Transfer\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTargetIdentity = new IdentitySet();
$transferTargetIdentityUser = new Identity();
$transferTargetIdentityUser->setId('550fae72-d251-43ec-868c-373732c2704f');
$transferTargetIdentityUser->setDisplayName('Heidi Steen');
$transferTargetIdentity->setUser($transferTargetIdentityUser);
$transferTarget->setIdentity($transferTargetIdentity);
$additionalData = [
'endpointType' => 'default',
];
$transferTarget->setAdditionalData($additionalData);
$requestBody->setTransferTarget($transferTarget);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.transfer.transfer_post_request_body import TransferPostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TransferPostRequestBody(
transfer_target = InvitationParticipantInfo(
identity = IdentitySet(
user = Identity(
id = "550fae72-d251-43ec-868c-373732c2704f",
display_name = "Heidi Steen",
),
),
additional_data = {
"endpoint_type" : "default",
}
),
)
await graph_client.communications.calls.by_call_id('call-id').transfer.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
},
},
ReplacesCallId = "e5d39592-99bd-4db8-bca8-30fb894ec51d",
AdditionalData = new Dictionary<string, object>
{
{
"endpointType" , "default"
},
},
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphcommunications "github.com/microsoftgraph/msgraph-sdk-go/communications"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphcommunications.NewTransferPostRequestBody()
transferTarget := graphmodels.NewInvitationParticipantInfo()
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "550fae72-d251-43ec-868c-373732c2704f"
user.SetId(&id)
displayName := "Heidi Steen"
user.SetDisplayName(&displayName)
identity.SetUser(user)
transferTarget.SetIdentity(identity)
replacesCallId := "e5d39592-99bd-4db8-bca8-30fb894ec51d"
transferTarget.SetReplacesCallId(&replacesCallId)
additionalData := map[string]interface{}{
"endpointType" : "default",
}
transferTarget.SetAdditionalData(additionalData)
requestBody.SetTransferTarget(transferTarget)
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Communications().Calls().ByCallId("call-id").Transfer().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setOdataType("#microsoft.graph.invitationParticipantInfo");
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
identity.setUser(user);
transferTarget.setIdentity(identity);
transferTarget.setReplacesCallId("e5d39592-99bd-4db8-bca8-30fb894ec51d");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("endpointType", "default");
transferTarget.setAdditionalData(additionalData);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.transfer.transfer_post_request_body import TransferPostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TransferPostRequestBody(
transfer_target = InvitationParticipantInfo(
odata_type = "#microsoft.graph.invitationParticipantInfo",
identity = IdentitySet(
odata_type = "#microsoft.graph.identitySet",
user = Identity(
odata_type = "#microsoft.graph.identity",
id = "550fae72-d251-43ec-868c-373732c2704f",
display_name = "Heidi Steen",
),
),
replaces_call_id = "e5d39592-99bd-4db8-bca8-30fb894ec51d",
additional_data = {
"endpoint_type" : "default",
}
),
)
await graph_client.communications.calls.by_call_id('call-id').transfer.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
Identity = new IdentitySet
{
AdditionalData = new Dictionary<string, object>
{
{
"phone" , new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "+12345678901",
}
},
},
},
AdditionalData = new Dictionary<string, object>
{
{
"endpointType" , "default"
},
{
"languageId" , "languageId-value"
},
{
"region" , "region-value"
},
},
},
AdditionalData = new Dictionary<string, object>
{
{
"clientContext" , "9e90d1c1-f61e-43e7-9f75-d420159aae08"
},
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
IdentitySet identity = new IdentitySet();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
Identity phone = new Identity();
phone.setOdataType("#microsoft.graph.identity");
phone.setId("+12345678901");
additionalData.put("phone", phone);
identity.setAdditionalData(additionalData);
transferTarget.setIdentity(identity);
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("endpointType", "default");
additionalData1.put("languageId", "languageId-value");
additionalData1.put("region", "region-value");
transferTarget.setAdditionalData(additionalData1);
transferPostRequestBody.setTransferTarget(transferTarget);
HashMap<String, Object> additionalData2 = new HashMap<String, Object>();
additionalData2.put("clientContext", "9e90d1c1-f61e-43e7-9f75-d420159aae08");
transferPostRequestBody.setAdditionalData(additionalData2);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Ejemplo 5: Transferencia de llamadas desde una llamada de grupo
Nota: Para transferir desde una llamada de grupo, se requiere el parámetro transferee. Todos los demás parámetros son los mismos que para una transferencia de una llamada punto a punto. Una transferencia consultiva desde una llamada de grupo o una transferencia a RTC desde una llamada de grupo son similares a los ejemplos 1-4, con el parámetro transferee especificado.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
},
},
AdditionalData = new Dictionary<string, object>
{
{
"endpointType" , "default"
},
},
},
Transferee = new ParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "751f6800-3180-414d-bd94-333364659951",
AdditionalData = new Dictionary<string, object>
{
{
"tenantId" , "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
},
},
},
ParticipantId = "909c6581-5130-43e9-88f3-fcb3582cde37",
},
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
identity.setUser(user);
transferTarget.setIdentity(identity);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("endpointType", "default");
transferTarget.setAdditionalData(additionalData);
transferPostRequestBody.setTransferTarget(transferTarget);
ParticipantInfo transferee = new ParticipantInfo();
IdentitySet identity1 = new IdentitySet();
Identity user1 = new Identity();
user1.setId("751f6800-3180-414d-bd94-333364659951");
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("tenantId", "72f988bf-86f1-41af-91ab-2d7cd011db47");
user1.setAdditionalData(additionalData1);
identity1.setUser(user1);
transferee.setIdentity(identity1);
transferee.setParticipantId("909c6581-5130-43e9-88f3-fcb3582cde37");
transferPostRequestBody.setTransferee(transferee);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.communications.calls.item.transfer.transfer_post_request_body import TransferPostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
from msgraph.generated.models.participant_info import ParticipantInfo
# To initialize your graph_client, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TransferPostRequestBody(
transfer_target = InvitationParticipantInfo(
identity = IdentitySet(
user = Identity(
id = "550fae72-d251-43ec-868c-373732c2704f",
display_name = "Heidi Steen",
),
),
additional_data = {
"endpoint_type" : "default",
}
),
transferee = ParticipantInfo(
identity = IdentitySet(
user = Identity(
id = "751f6800-3180-414d-bd94-333364659951",
additional_data = {
"tenant_id" : "72f988bf-86f1-41af-91ab-2d7cd011db47",
}
),
),
participant_id = "909c6581-5130-43e9-88f3-fcb3582cde37",
),
)
await graph_client.communications.calls.by_call_id('call-id').transfer.post(request_body)