diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java index ab277b6c9987..f2764d4f3da2 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationAsyncClient.java @@ -34,7 +34,6 @@ import com.azure.communication.callautomation.implementation.models.TranscriptionTransportTypeInternal; import com.azure.communication.callautomation.models.AnswerCallOptions; import com.azure.communication.callautomation.models.AnswerCallResult; -import com.azure.communication.callautomation.models.AudioFormat; import com.azure.communication.callautomation.models.CallInvite; import com.azure.communication.callautomation.models.CallLocator; import com.azure.communication.callautomation.models.CallLocatorKind; @@ -325,9 +324,9 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp MediaStreamingTransportTypeInternal.fromString(mediaStreamingOptions.getTransportType().toString())) .setStartMediaStreaming(mediaStreamingOptions.isStartMediaStreamingEnabled()) .setEnableBidirectional(mediaStreamingOptions.isEnableBidirectional()) - .setAudioFormat(mediaStreamingOptions.getAudioFormat() != null - ? AudioFormatInternal.fromString(mediaStreamingOptions.getAudioFormat().toString()) - : AudioFormatInternal.fromString(AudioFormat.PCM_24K_MONO.toString())); + .setAudioFormat(AudioFormatInternal.fromString(mediaStreamingOptions.getAudioFormat() != null + ? mediaStreamingOptions.getAudioFormat().toString() + : null)); } private TranscriptionOptionsInternal getTranscriptionOptionsInternal(TranscriptionOptions transcriptionOptions) {