Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.53 KB

call-answer-go-snippets.md

File metadata and controls

44 lines (36 loc) · 1.53 KB
description
Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest major version. Current major version is $v1.*// Dependenciesimport ( "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.NewAnswerPostRequestBody() callbackUri:="callbackUri-value"requestBody.SetCallbackUri(&callbackUri) mediaConfig:=graphmodels.NewAppHostedMediaConfig() blob:="<Media Session Configuration Blob>"mediaConfig.SetBlob(&blob) requestBody.SetMediaConfig(mediaConfig) acceptedModalities:= []graphmodels.Modalityable { modality:=graphmodels.AUDIO_MODALITYrequestBody.SetModality(&modality) } requestBody.SetAcceptedModalities(acceptedModalities) callOptions:=graphmodels.NewIncomingCallOptions() isContentSharingNotificationEnabled:=truecallOptions.SetIsContentSharingNotificationEnabled(&isContentSharingNotificationEnabled) isDeltaRosterEnabled:=truecallOptions.SetIsDeltaRosterEnabled(&isDeltaRosterEnabled) requestBody.SetCallOptions(callOptions) participantCapacity:=int32(200) requestBody.SetParticipantCapacity(&participantCapacity) // To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=gographClient.Communications().Calls().ByCallId("call-id").Answer().Post(context.Background(), requestBody, nil) 
close