]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Add "like" processing to pjsip list and show commands 76/1476/5
authorGeorge Joseph <george.joseph@fairview5.com>
Tue, 20 Oct 2015 21:02:30 +0000 (15:02 -0600)
committerGeorge Joseph <george.joseph@fairview5.com>
Sat, 24 Oct 2015 16:02:43 +0000 (11:02 -0500)
commita8aee0bbdb09f5cfb49802f0c3c09e741814045c
tree2111b5324001ee7bc49ad38b2751eae25dff091b
parent08fe5256a90c70955110c3a64ee252b319809d35
res_pjsip:  Add "like" processing to pjsip list and show commands

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
CHANGES
include/asterisk/res_pjsip_cli.h
res/res_pjsip/config_auth.c
res/res_pjsip/config_transport.c
res/res_pjsip/location.c
res/res_pjsip/pjsip_cli.c
res/res_pjsip/pjsip_configuration.c
res/res_pjsip_endpoint_identifier_ip.c
res/res_pjsip_outbound_registration.c