[Asterisk-code-review] ari: Implement 'debug all' and request/response logging (asterisk[13])
George Joseph
asteriskteam at digium.com
Mon Jan 23 11:03:22 CST 2017
Hello Mark Michelson, Anonymous Coward #1000019,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/4749
to look at the new patch set (#2).
Change subject: ari: Implement 'debug all' and request/response logging
......................................................................
ari: Implement 'debug all' and request/response logging
The 'ari set debug' command has been enhanced to accept 'all' as an
application name. This allows dumping of all apps even if an app
hasn't registered yet. To accomplish this, a new global_debug global
variable was added to res/stasis/app.c and new APIs were added to
set and query the value.
'ari set debug' now displays requests and responses as well as events.
This required refactoring the existing debug code.
* The implementation for 'ari set debug' was moved from stasis/cli.{c,h}
to ari/cli.{c,h}, and stasis/cli.{c,h} were deleted.
* In order to print the body of incoming requests even if a request
failed, the consumption of the body was moved from the ari stubs
to ast_ari_callback in res_ari.c and the moustache templates were
then regenerated. The body is now passed to ast_ari_invoke and then
on to the handlers. This results in code savings since that template
was inserted multiple times into all the stubs.
An additional change was made to the ao2_str_container implementation
to add partial key searching and a sort function. The existing cli
code assumed it was already there when it wasn't so the tab completion
was never working.
Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf
---
M CHANGES
M include/asterisk/ari.h
M include/asterisk/stasis_app.h
M main/strings.c
M res/ari/ari_websockets.c
M res/ari/cli.c
M res/ari/resource_events.c
M res/res_ari.c
M res/res_ari_applications.c
M res/res_ari_asterisk.c
M res/res_ari_bridges.c
M res/res_ari_channels.c
M res/res_ari_device_states.c
M res/res_ari_endpoints.c
M res/res_ari_events.c
M res/res_ari_mailboxes.c
M res/res_ari_playbacks.c
M res/res_ari_recordings.c
M res/res_ari_sounds.c
M res/res_stasis.c
M res/stasis/app.c
M res/stasis/app.h
D res/stasis/cli.c
D res/stasis/cli.h
M res/stasis/stasis_bridge.c
M rest-api-templates/param_parsing.mustache
M rest-api-templates/res_ari_resource.c.mustache
M tests/test_ari.c
28 files changed, 532 insertions(+), 1,123 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/49/4749/2
--
To view, visit https://gerrit.asterisk.org/4749
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list