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 393775 New Change
[20] 4217 lines
[+20] [+] void ast_channel_set_manager_vars(size_t varc, char **vars);
4218
 */
4218
 */
4219
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4219
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4220

    
   
4220

   
4221
/*!
4221
/*!
4222
 * \since 12
4222
 * \since 12

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

    
   
4224
 *

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

    
   
4226
 *

    
   
4227
 * \param chan Channel to get variables for

    
   
4228
 * \return List of channel variables.

    
   
4229
 * \return \c NULL on error

    
   
4230
 */

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

    
   
4232

   

    
   
4233
/*!

    
   
4234
 * \since 12
4223
 * \brief A topic which publishes the events for a particular channel.
4235
 * \brief A topic which publishes the events for a particular channel.
4224
 *
4236
 *
4225
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4237
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4226
 *
4238
 *
4227
 * \param chan Channel, or \c NULL.
4239
 * \param chan Channel, or \c NULL.
[+20] [20] 166 lines
/trunk/include/asterisk/stasis_channels.h
Revision 393775 New Change
 
/trunk/main/bridging.c
Revision 393775 New Change
 
/trunk/main/channel.c
Revision 393775 New Change
 
/trunk/main/channel_internal_api.c
Revision 393775 New Change
 
/trunk/main/cli.c
Revision 393775 New Change
 
/trunk/main/manager.c
Revision 393775 New Change
 
/trunk/main/manager_bridging.c
Revision 393775 New Change
 
/trunk/main/manager_channels.c
Revision 393775 New Change
 
/trunk/main/pbx.c
Revision 393775 New Change
 
/trunk/main/stasis_channels.c
Revision 393775 New Change
 
/trunk/res/res_agi.c
Revision 393775 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.