Skip to content

Commit d5a48f7

Browse files
authored
Update audio-streaming-quickstart-python.md
update for enabledtmftones
1 parent 79eb436 commit d5a48f7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

articles/communication-services/how-tos/call-automation/includes/audio-streaming-quickstart-python.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ Enable automatic audio streaming when the call is established by setting the fla
3434
This setting ensures that audio streaming starts automatically as soon as the call is connected.
3535

3636
``` python
37-
media_streaming_configuration = MediaStreamingOptions(
38-
transport_url=TRANSPORT_URL,
39-
transport_type=MediaStreamingTransportType.WEBSOCKET,
37+
media_streaming_options = MediaStreamingOptions(
38+
transport_url=WEBSOCKET_URI_HOST,
39+
transport_type=StreamingTransportType.WEBSOCKET,
4040
content_type=MediaStreamingContentType.AUDIO,
4141
audio_channel_type=MediaStreamingAudioChannelType.MIXED,
4242
start_media_streaming=True,
4343
enable_bidirectional=True,
44-
audio_format=AudioFormat.PCM24_K_MONO,
44+
enable_dtmf_tones=True,
45+
audio_format=AudioFormat.PCM24_K_MONO
4546
)
4647
answer_call_result = call_automation_client.answer_call(
4748
incoming_call_context=incoming_call_context,
@@ -56,13 +57,14 @@ When Azure Communication Services receives the URL for your WebSocket server, it
5657
To start media streaming during the call, you can use the API. To do so, set the `startMediaStreaming` parameter to `false` (which is the default), and later in the call, you can use the start API to enable media streaming.
5758

5859
``` python
59-
media_streaming_configuration = MediaStreamingOptions(
60-
transport_url=TRANSPORT_URL,
61-
transport_type=MediaStreamingTransportType.WEBSOCKET,
60+
media_streaming_options = MediaStreamingOptions(
61+
transport_url=WEBSOCKET_URI_HOST,
62+
transport_type=StreamingTransportType.WEBSOCKET,
6263
content_type=MediaStreamingContentType.AUDIO,
6364
audio_channel_type=MediaStreamingAudioChannelType.MIXED,
64-
start_media_streaming=False,
65+
start_media_streaming=True,
6566
enable_bidirectional=True,
67+
enable_dtmf_tones=True,
6668
audio_format=AudioFormat.PCM24_K_MONO
6769
)
6870

0 commit comments

Comments
 (0)