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

chan_pjsip: Add the same details as PJSIPShowContacts to the CLI via 'pjsip show contact' #644

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

Conversation

intellasoft
Copy link
Contributor

CLI 'pjsip show contact' does not show enough information.
One must telnet to AMI or write a script to ask Asterisk for example what the User-Agent is on a Contact
This feature adds the same details as PJSIPShowContacts to the CLI

@kobaz
Copy link

kobaz commented Mar 11, 2024

Fixes #643

Copy link

REMINDER: If this PR applies to other branches, please add a comment with the appropriate "cherry-pick-to" headers as per the Create a Pull Request process.

If you don't want it cherry-picked, please add a comment with cherry-pick-to: none so we don't keep asking.

If, after adding "cherry-pick-to" comments, you change your mind, please edit the comment to DELETE the header lines and add cherry-pick-to: none.

The currently active branches are now 18, 20, 21 and master.

Copy link
Member

@gtjoseph gtjoseph left a comment

Choose a reason for hiding this comment

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

The 'Fixes" line needs to be in the original PR description, not an additional comment, as well as in the commit message.

You also need the "cherry-pick" lines.

See:
https://docs.asterisk.org/Development/Policies-and-Procedures/Code-Contribution/
https://docs.asterisk.org/Development/Policies-and-Procedures/Commit-Messages/

…'pjsip show contact'

CLI 'pjsip show contact' does not show enough information.
One must telnet to AMI or write a script to ask Asterisk for example what the User-Agent is on a Contact
This feature adds the same details as PJSIPShowContacts to the CLI

Resolves: asterisk#643
@kobaz
Copy link

kobaz commented Mar 11, 2024

cherry-pick-to: none

@seanbright
Copy link
Contributor

That is a lot of code to change to pass a boolean down to a single callback. There is no better way?

If not, all of the header documentation needs to be updated to include the new flags argument.

Copy link
Member

@gtjoseph gtjoseph left a comment

Choose a reason for hiding this comment

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

and you still need to update the PR description and commit message with the issue.

@@ -1135,11 +1137,102 @@ static int cli_contact_print_body(void *obj, void *arg, int flags)
ast_sip_get_contact_short_status_label(status ? status->status : UNKNOWN),
(status && (status->status == AVAILABLE)) ? ((long long) status->rtt) / 1000.0 : NAN);

if (flags & AST_RETRIEVE_FLAG_ALL) { /* If we are showing list, no need do detailed */
Copy link
Member

Choose a reason for hiding this comment

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

Since AST_RETRIEVE_FLAG_ALL is part of the sorcery ast_sorcery_retrieve_flags enum, you should probably adjust the changed prototypes or no one will know what flags are supported.

@seanbright
Copy link
Contributor

Could you use one of the existing fields in struct ast_sip_cli_context? Or add a new one?

@kobaz
Copy link

kobaz commented Mar 11, 2024

Could you use one of the existing fields in struct ast_sip_cli_context? Or add a new one?

Good call. I'll look into that.

@asteriskteam
Copy link
Contributor

This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed.

@asteriskteam
Copy link
Contributor

This PR has been closed because it has been in "Changes Requested" or "submitter-action-required" state for more than 42 days.

@intellasoft
Copy link
Contributor Author

What's the process to re-open?

@jcolp
Copy link
Member

jcolp commented May 1, 2024

I clicked the reopen button.

@jcolp jcolp reopened this May 1, 2024
@github-actions github-actions bot removed the stale label May 1, 2024
@intellasoft
Copy link
Contributor Author

Yaaaay, thanks.

I don't think I have access to a reopen. I was looking for one.

Updates coming asap!

@asteriskteam
Copy link
Contributor

This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed.

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.

None yet

6 participants