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
Diff Revision 2 Diff Revision 3
[20] 2593 lines
[+20] [+] struct ast_group_info {
2594
 *
2594
 *
2595
 * \since 1.8
2595
 * \since 1.8
2596
 */
2596
 */
2597
#define ast_channel_unref(c) ({ ao2_ref(c, -1); (struct ast_channel *) (NULL); })
2597
#define ast_channel_unref(c) ({ ao2_ref(c, -1); (struct ast_channel *) (NULL); })
2598

    
   
2598

   

    
   
2599
/*!

    
   
2600
 * \brief Cleanup a channel reference

    
   
2601
 *

    
   
2602
 * \param c the channel (NULL tolerant)

    
   
2603
 *

    
   
2604
 * \retval NULL always

    
   
2605
 *

    
   
2606
 * \since 12.0.0

    
   
2607
 */

    
   
2608
#define ast_channel_cleanup(c) ({ ao2_cleanup(c); (struct ast_channel *) (NULL); })

    
   
2609

   
2599
/*! Channel Iterating @{ */
2610
/*! Channel Iterating @{ */
2600

    
   
2611

   
2601
/*!
2612
/*!
2602
 * \brief A channel iterator
2613
 * \brief A channel iterator
2603
 *
2614
 *
[+20] [20] 1765 lines
/trunk/include/asterisk/stasis_channels.h
Diff Revision 2 Diff Revision 3
 
/trunk/main/bridging.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/channel.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/channel_internal_api.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/cli.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/manager.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/manager_bridging.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/manager_channels.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/pbx.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/stasis_channels.c
Diff Revision 2 Diff Revision 3
 
/trunk/res/res_agi.c
Diff Revision 2 Diff Revision 3
 
  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.