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 392949 New Change
[20] 4188 lines
[+20] [+] void ast_channel_set_manager_vars(size_t varc, char **vars);
4189
 */
4189
 */
4190
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4190
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
4191

    
   
4191

   
4192
/*!
4192
/*!
4193
 * \since 12
4193
 * \since 12

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

    
   
4195
 *

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

    
   
4197
 *

    
   
4198
 * \param chan Channel to get variables for

    
   
4199
 * \return List of channel variables.

    
   
4200
 * \return \c NULL on error

    
   
4201
 */

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

    
   
4203

   

    
   
4204
/*!

    
   
4205
 * \since 12
4194
 * \brief A topic which publishes the events for a particular channel.
4206
 * \brief A topic which publishes the events for a particular channel.
4195
 *
4207
 *
4196
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4208
 * If the given \a chan is \c NULL, ast_channel_topic_all() is returned.
4197
 *
4209
 *
4198
 * \param chan Channel, or \c NULL.
4210
 * \param chan Channel, or \c NULL.
[+20] [20] 158 lines
/trunk/include/asterisk/stasis_channels.h
Revision 392949 New Change
 
/trunk/main/bridging.c
Revision 392949 New Change
 
/trunk/main/channel.c
Revision 392949 New Change
 
/trunk/main/channel_internal_api.c
Revision 392949 New Change
 
/trunk/main/cli.c
Revision 392949 New Change
 
/trunk/main/manager.c
Revision 392949 New Change
 
/trunk/main/manager_bridging.c
Revision 392949 New Change
 
/trunk/main/manager_channels.c
Revision 392949 New Change
 
/trunk/main/pbx.c
Revision 392949 New Change
 
/trunk/main/stasis_channels.c
Revision 392949 New Change
 
/trunk/res/res_agi.c
Revision 392949 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.