FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: escape recording IDs in API paths to support special characters by fvieira-alb · Pull Request #192 · CyCoreSystems/ari · GitHub

Repository navigation

fix: escape recording IDs in API paths to support special characters - #192

Open
fvieira-alb wants to merge 1 commit into
CyCoreSystems:mainfrom
fvieira-alb:bugfix/fix-recordings-operations
Open

fvieira-alb wants to merge 1 commit into
CyCoreSystems:mainfrom
fvieira-alb:bugfix/fix-recordings-operations

Conversation

fvieira-alb commented May 5, 2026 •
edited by Ulexus
Loading

Copy link
Copy Markdown

This PR adds URL path escaping to the LiveRecording methods. Currently, the key.ID is being concatenated directly into the API endpoint strings. If a recording ID contains special characters (like slashes), the resulting URL becomes malformed, leading to 405 errors.

Changes:

  • Imported the net/url package.
  • Wrapped key.ID with url.PathEscape() in all LiveRecording methods (Data, Stop, Pause, Resume, Mute, Unmute, and Scrap).

Why this is necessary:
In many environments, recording names or IDs are dynamically generated and may contain characters that are not URL-safe. Using url.PathEscape ensures that the ARI (Asterisk REST Interface) receives the correct identifier regardless of its content, making the client more robust and preventing failed requests.


This change is 

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL