Review Board 1.7.16


Use stasis cache in more places

Review Request #2645 - Created June 26, 2013 and submitted

Joshua Colp
stasis_cache_usage
ASTERISK-21883
Reviewers
asterisk-dev
Asterisk
This change moves CLI/AGI/AMI commands to accessing the Stasis cache for retrieving information instead of directly accessing the data structures. I have also added an AMI action to get bridge information, and extended the "status" action to include the same information available as "core show channel".

Stuff given up:
1. Number of frames being read and written
2. First file descriptor
3. What the channel is blocked in

An additional question:
I'm not currently storing channel trace information in the snapshot and as a result it is not displayed. Is this a feature we still want to support? How widespread is it?
Executed the changed CLI commands, AMI actions, and AGI commands and ensured that the output is as expected.
/trunk/include/asterisk/channel.h
Revision 393517 New Change
[20] 4199 lines
[+20] [+] void ast_channel_set_manager_vars(size_t varc, char **vars);
4200
 */
4200
 */
4201
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4201
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4202

    
   
4202

   
4203
/*!
4203
/*!
4204
 * \since 12
4204
 * \since 12

    
   
4205
 * \brief Gets the variables for a given channel, as set using pbx_builtin_setvar_helper().

    
   
4206
 *

    
   
4207
 * The returned variable list is an AO2 object, so ao2_cleanup() to free it.

    
   
4208
 *

    
   
4209
 * \param chan Channel to get variables for

    
   
4210
 * \return List of channel variables.

    
   
4211
 * \return \c NULL on error

    
   
4212
 */

    
   
4213
struct varshead *ast_channel_get_vars(struct ast_channel *chan);

    
   
4214

   

    
   
4215
/*!

    
   
4216
 * \since 12
4205
 * \brief A topic which publishes the events for a particular channel.
4217
 * \brief A topic which publishes the events for a particular channel.
4206
 *
4218
 *
4207
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4219
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4208
 *
4220
 *
4209
 * \param chan Channel, or \c NULL.
4221
 * \param chan Channel, or \c NULL.
[+20] [20] 158 lines
/trunk/include/asterisk/stasis_channels.h
Revision 393517 New Change
 
/trunk/main/bridging.c
Revision 393517 New Change
 
/trunk/main/channel.c
Revision 393517 New Change
 
/trunk/main/channel_internal_api.c
Revision 393517 New Change
 
/trunk/main/cli.c
Revision 393517 New Change
 
/trunk/main/manager.c
Revision 393517 New Change
 
/trunk/main/manager_bridging.c
Revision 393517 New Change
 
/trunk/main/manager_channels.c
Revision 393517 New Change
 
/trunk/main/pbx.c
Revision 393517 New Change
 
/trunk/main/stasis_channels.c
Revision 393517 New Change
 
/trunk/res/res_agi.c
Revision 393517 New Change
 
  1. /trunk/include/asterisk/channel.h: Loading...
  2. /trunk/include/asterisk/stasis_channels.h: Loading...
  3. /trunk/main/bridging.c: Loading...
  4. /trunk/main/channel.c: Loading...
  5. /trunk/main/channel_internal_api.c: Loading...
  6. /trunk/main/cli.c: Loading...
  7. /trunk/main/manager.c: Loading...
  8. /trunk/main/manager_bridging.c: Loading...
  9. /trunk/main/manager_channels.c: Loading...
  10. /trunk/main/pbx.c: Loading...
  11. /trunk/main/stasis_channels.c: Loading...
  12. /trunk/res/res_agi.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.