description |
---|
Automatically generated file. DO NOT MODIFY |
# Code snippets are only available for the latest version. Current version is 1.xfrommsgraphimportGraphServiceClientfrommsgraph.generated.communications.calls.item.answer.answer_post_request_bodyimportAnswerPostRequestBodyfrommsgraph.generated.models.modalityimportModalityfrommsgraph.generated.models.service_hosted_media_configimportServiceHostedMediaConfigfrommsgraph.generated.models.media_infoimportMediaInfo# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=pythonrequest_body=AnswerPostRequestBody( callback_uri="https://bot.contoso.com/api/calls", accepted_modalities= [ Modality.Audio, ], media_config=ServiceHostedMediaConfig( odata_type="#microsoft.graph.serviceHostedMediaConfig", pre_fetch_media= [ MediaInfo( uri="https://cdn.contoso.com/beep.wav", resource_id="1D6DE2D4-CD51-4309-8DAA-70768651088E", ), MediaInfo( uri="https://cdn.contoso.com/cool.wav", resource_id="1D6DE2D4-CD51-4309-8DAA-70768651088F", ), ], ), ) awaitgraph_client.communications.calls.by_call_id('call-id').answer.post(request_body)