Fix/start continuous dtmf recognition (start_continuous_dtmf_recognition)#47936
Fix/start continuous dtmf recognition (start_continuous_dtmf_recognition)#47936komayama wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an optional operation_callback_url keyword parameter to the start_continuous_dtmf_recognition operation in both the synchronous and asynchronous CallConnectionClient classes for azure-communication-callautomation. This lets callers override the default callback URL (set during CreateCall/AnswerCall) on a per-operation basis, bringing start_continuous_dtmf_recognition in line with the already-supported stop_continuous_dtmf_recognition method. The change is correct: the underlying ContinuousDtmfRecognitionRequest model exposes the operation_callback_uri field, and the new parameter is wired through consistently.
Changes:
- Added
operation_callback_urlkeyword param (with docstring) tostart_continuous_dtmf_recognitionin the sync and async clients, mapping it to the request'soperation_callback_uri. - Updated
api.mdfor both sync and async namespaces. - Expanded sync and async unit tests to pass and assert the new parameter (and
operation_context).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
azure/communication/callautomation/_call_connection_client.py |
Adds operation_callback_url param + docstring; sets operation_callback_uri on the request. |
azure/communication/callautomation/aio/_call_connection_client_async.py |
Same change for the async client. |
api.md |
Documents the new keyword arg in sync and async namespaces. |
tests/test_call_media_client.py |
Extends sync test to pass/assert operation_callback_url and operation_context. |
tests/test_call_media_client_async.py |
Extends async test equivalently. |
| target_participant: "CommunicationIdentifier", | ||
| *, | ||
| operation_context: Optional[str] = None, | ||
| operation_callback_url: Optional[str] = None, |
|

Description
This pull request adds support for specifying a custom callback URL for the
start_continuous_dtmf_recognitionoperation in both the synchronous and asynchronousCallConnectionClientclasses. This allows users to override the default callback URL set during call creation or answering on a per-operation basis. The changes also update the API documentation and expand test coverage to ensure the new parameter is handled correctly.API and SDK enhancements:
operation_callback_urlparameter to thestart_continuous_dtmf_recognitionmethod in both the synchronous (_call_connection_client.py) and asynchronous (_call_connection_client_async.py) clients, allowing users to specify a custom callback URL for this operation. [1] [2]ContinuousDtmfRecognitionRequestconstruction to set theoperation_callback_urifield using the new parameter. [1] [2]Documentation updates:
api.md) for both sync and async namespaces to include the newoperation_callback_urlparameter and its behavior. [1] [2]Test improvements:
test_call_media_client.py) and async (test_call_media_client_async.py) test suites to cover the newoperation_callback_urlparameter, verifying that it is correctly passed and set in the request object. [1] [2] [3] [4]All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines