Skip to content

chan_websocket: Allow additional URI parameters to be added to the outgoing URI. #1361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gtjoseph
Copy link
Member

@gtjoseph gtjoseph commented Aug 13, 2025

  • Added a new option to the WebSocket dial string to capture the additional
    URI parameters.
  • Added a new API ast_uri_verify_encoded() that verifies that a string
    either doesn't need URI encoding or that it has already been encoded.
  • Added a new API ast_websocket_client_add_uri_params() to add the params
    to the client websocket session.
  • Added XML documentation that will show up with core show application Dial
    that shows how to use it.

Resolves: #1352

UserNote: A new WebSocket channel driver option v has been added to the
Dial application that allows you to specify additional URI parameters on
outgoing connections. Run core show application Dial from the Asterisk CLI
to see how to use it.

@gtjoseph
Copy link
Member Author

cherry-pick-to: 20
cherry-pick-to: 21
cherry-pick-to: 22
cherry-pick-to: 23

Copy link

Workflow PRCheck completed successfully

Copy link

Workflow PRCheck completed successfully

Copy link
Contributor

@InterLinked1 InterLinked1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of opinionated... but some of the line wrapping in this seems a bit excessive... I see a lot of lines wrapped at 60-70 characters? Even if unrolled onto a single line, most of them would be under 90 chars, which is the (I believe obsolete) formatting rule mentioned in the documentation.

@gtjoseph
Copy link
Member Author

@InterLinked1 Are you talking about the commit message/PR description or the source files themselves?

@asterisk asterisk deleted a comment from github-actions bot Aug 14, 2025
@gtjoseph gtjoseph removed the has-pr-checklist A PR Checklist is present on the PR label Aug 14, 2025
@InterLinked1
Copy link
Contributor

@InterLinked1 Are you talking about the commit message/PR description or the source files themselves?

I'm talking about the source code itself

@gtjoseph
Copy link
Member Author

Hmmm. I'm going to add a check to make sure the parameters are in fact encoded (or don't need encoding).

@gtjoseph gtjoseph marked this pull request as draft August 15, 2025 13:01
…tgoing URI.

* Added a new option to the WebSocket dial string to capture the additional
  URI parameters.
* Added a new API ast_uri_verify_encoded() that verifies that a string
  either doesn't need URI encoding or that it has already been encoded.
* Added a new API ast_websocket_client_add_uri_params() to add the params
  to the client websocket session.
* Added XML documentation that will show up with `core show application Dial`
  that shows how to use it.

Resolves: asterisk#1352

UserNote: A new WebSocket channel driver option `v` has been added to the
Dial application that allows you to specify additional URI parameters on
outgoing connections. Run `core show application Dial` from the Asterisk CLI
to see how to use it.
@gtjoseph gtjoseph marked this pull request as ready for review August 15, 2025 14:48
@gtjoseph
Copy link
Member Author

I've added validation to the uri params to make sure each name and value either doesn't need to be encoded or is already encoded.

Copy link

Workflow PRCheck completed successfully

@gtjoseph gtjoseph added the cherry-pick-test Trigger dry run of cherry-picks label Aug 18, 2025
@github-actions github-actions bot added cherry-pick-testing-in-progress Cherry-Pick tests in progress cherry-pick-checks-failed Cherry-Pick checks failed and removed cherry-pick-test Trigger dry run of cherry-picks cherry-pick-testing-in-progress Cherry-Pick tests in progress labels Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[improvement]: Websocket channel with custom URI
3 participants