Skip to content
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

Header editing feature #3857

Closed
wants to merge 6 commits into from
Closed

Conversation

goodicus
Copy link
Contributor

@goodicus goodicus commented Feb 8, 2024

Allow headers edition

The purpose of this PR is to edit headers in outgoing messages.

@goodicus goodicus marked this pull request as ready for review February 8, 2024 22:16
@andreas-wehrmann
Copy link
Contributor

I'm not entirely sure what this PR is supposed to do.
I mean, if you want the ability to manipulate incoming/outgoing messages, this can be implemented via modules.
Wouldn't this be the cleaner solution? To have a separate module for header manipulation only?
That way you'd also keep responsibilities nicely separated and can avoid changes to PJSUA itself.

But maybe I'm just not understanding something.
This PR seems to introduce a significant number of changes;
Can you elaborate on what problem you're trying to solve?

@goodicus
Copy link
Contributor Author

Hi, @andreas-wehrmann @sauwming!
I would like to introduce one more useful feature to PjSUA tool. It's a "header modification feature".
It allows to extend an original and to emulate non-standard PJSUA behaviour, like:

  • add an optional header to outgoing messages or an optional tag in a header field (many cases during registration);
  • remove necessary and optional headers in outgoing messages;
  • substitute headers by another value ( "User-Agent: PJSUA v2.14" -> "User-Agent: Yealink SIP-T42S").

@sauwming
Copy link
Member

We already have such features via configs such as pjsua_acc_config.reg_hdr_list, pjsua_msg_data.hdr_list, pjsua_config.user_agent. While it's true that not all headers can be modified using those configs, but it has proven to be sufficient for most use cases of our users. And if custom modification is required, as @andreas-wehrmann stated above, user can implement their own pjsip module.

@sauwming sauwming closed this Feb 16, 2024
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.

4 participants