Azure-Samples / Azure-Samples/communication-services-javascript-quickstarts
Direct Routing JS sample broken: Unsupported API version / 405 errors
- Dominant language
- JavaScript
- Stars
- 108
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
**Observed errors:**
- First, `UnsupportedApiVersion` is thrown because the sample uses API version `2021-05-01-preview`, which is no longer supported. Supported versions for my ACS resource are `2023-03-01`, `2023-04-01-preview`, and `2024-11-15-preview`.
- After attempting adjustments, the sample throws `405 Method Not Allowed` because the JavaScript SDK `@azure/communication-phone-numbers` does not support SIP Routing endpoints (`/trunks` and `/routes`).
**Problem:**
The sample cannot run in Node.js as-is due to the JS SDK not supporting SIP Routing and the outdated API version.
Contributor guide
Research direction
Start by locating the Direct Routing JavaScript sample and reviewing its use of @azure/communication-phone-numbers, the /trunks and /routes endpoints, and the configured API version. Verify which Azure Communication Services API versions and access path support SIP Routing. Done means the Node.js sample no longer uses an unsupported version and avoids the reported 405 errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100