summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_cli.c
AgeCommit message (Collapse)Author
2017-12-10pjsip: Improve CLI completion performanceSean Bright
Use the new ast_cli_completion_add() function to improve completion performance for commands like 'pjsip show endpoint.' Change-Id: I76d802294d2ac1766110dc75f7d117c8541ce348
2017-02-20pjproject cli: Add object count after object listsGeorge Joseph
When listing a container, we now print the number of objects in the container at the end of the list. Change-Id: I791cbc3ee9da9a2af9adc655164b5d32953df812
2016-03-29chan_pjsip: Add 'pjsip show channelstats'George Joseph
Added the ability to show channel statistics to chan_pjsip (cli_functions.c) Moved the existing 'pjsip show channel(s)' functionality from pjsip_configuration to cli_functions.c. The stats needed chan_pjsip's private header so it made sense to move the existing channel commands as well. Now using stasis_cache_dump to get the channel snapshots rather than retrieving all endpoints, then getting each one's channel snapshots. Much more efficient. Change-Id: I03b114522126d27434030b285bf6d531ddd79869
2015-10-24res_pjsip: Add "like" processing to pjsip list and show commandsGeorge Joseph
Add the ability to filter output from pjsip list and show commands using the "like" predicate like chan_sip. For endpoints, aors, auths, registrations, identifyies and transports, the modification was a simple change of an ast_sorcery_retrieve_by_fields call to ast_sorcery_retrieve_by_regex. For channels and contacts a little more work had to be done because neither of those objects are true sorcery objects. That was just removing the non-matching object from the final container. Of course, a little extra plumbing in the common pjsip_cli code was needed to parse the "like" and pass the regex to the get_container callbacks. Some of the get_container code in res_pjsip_endpoint_identifier was also refactored for simplicity. ASTERISK-25477 #close Reported by: Bryant Zimmerman Tested by: George Joseph Change-Id: I646d9326b778aac26bb3e2bcd7fa1346d24434f1
2015-02-15res_pjsip: Add "pjsip show version" CLI command.Joshua Colp
When debugging things it can be useful to know absolutely what version of pjproject res_pjsip is running against. This change adds a "pjsip show version" CLI command which can be used to query for this. ASTERISK-24685 #close Reported by: Joshua Colp Review: https://reviewboard.asterisk.org/r/4424/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-02res_pjsip_endpoint_identifier_ip: Add 'show identify(ies)' cli commandsGeorge Joseph
While troubleshooting other things I realized there were no pjsip cli commands for identify. This patch adds them. It also also fixes a reference leak when a 'show endpoint' displayed identifies and properly sets the return code if load_module can't allocate a cli formatter structure. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4212/ ........ Merged revisions 428725 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29pjsip_cli: Suppress header print on error or no objectsGeorge Joseph
If there's an error on the pjsip command line or there are no objects, don't print the column headers. ASTERISK-24350 #close Reported-by: Brad Latus Tested-by: George Joseph Tested-by: Brad Latus Review: https://reviewboard.asterisk.org/r/4025/ ........ Merged revisions 424128 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-08pjsip_cli: Create pjsip show channel and contact, and general cli code cleanup.George Joseph
Created the 'pjsip show channel' and 'pjsip show contact' commands. Refactored out the hated ast_hashtab. Replaced with ao2_container. Cleaned up function naming. Internal only, no public name changes. Cleaned up whitespace and brace formatting in cli code. Changed some NULL checking from "if"s to ast_asserts. Fixed some register/unregister ordering to reduce deadlock potential. Fixed ast_sip_location_add_contact where the 'name' buffer was too short. Fixed some self-assignment issues in res_pjsip_outbound_registration. (closes issue ASTERISK-23276) Review: http://reviewboard.asterisk.org/r/3283/ ........ Merged revisions 410287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20pjsip_cli: Fix memory leak in ast_sip_cli_print_sorcery_objectset.George Joseph
Fixed memory leaks in ast_sip_cli_print_sorcery_objectset and ast_variable_list_sort. (closes issue ASTERISK-23266) Review: http://reviewboard.asterisk.org/r/3200/ ........ Merged revisions 408520 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06res_pjsip: Updates and adds more PJSIP CLI commands.Richard Mudgett
* Adds identify, transport, and registration support to the PJSIP CLI. * Creates three additional callbacks, one for an iterator, one for a comparator, and one for a container. This eliminates the link dependency from higher level modules to lower level ones. * Eliminates duplicate sorting in PJSIP CLI commands. * Cleans up PJSIP CLI output formatting. * Pushes CLI command registration down to the implementing source file. * Adds several ast_sip_destroy_sorcery functions to complement existing ast_sip_sorcery_initialize functions. The destroy functions unregister PJSIP CLI commands and PJSIP CLI formatters. Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3104/ ........ Merged revisions 407568 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13res_pjsip: Fix CLI tab completion issuesKinsey Moore
This fixes several issues with the new res_pjsip CLI tab completion such as output of headers during tab completion and being able to tab-complete more items than the code actually handled (further items would simply be ignored). (closes issue ASTERISK-23081) Review: https://reviewboard.asterisk.org/r/3115/ Reported by: xrobau ........ Merged revisions 405338 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-21res_pjsip/pjsip_cli: fix compilation error caused by passing ast_freeMatthew Jordan
When wanting to pass *free as a function pointer, ast_free_ptr has to be used instead of ast_free. This allows it to be compiled with MALLOC_DEBUG enabled. ........ Merged revisions 404531 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20res_pjsip: Add PJSIP CLI commandsMatthew Jordan
Implements the following cli commands: pjsip list aors pjsip list auths pjsip list channels pjsip list contacts pjsip list endpoints pjsip show aor(s) pjsip show auth(s) pjsip show channels pjsip show endpoint(s) Also... Minor modifications made to the AMI command implementations to facilitate reuse. New function ast_variable_list_sort added to config.c and config.h to implement variable list sorting. (issue ASTERISK-22610) patches: pjsip_cli_v2.patch uploaded by george.joseph (License 6322) ........ Merged revisions 404480 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404507 65c4cc65-6c06-0410-ace0-fbb531ad65f3