Summary:ASTERISK-20827: AMI events for ConfBridge Mute,Record, start and stop
Reporter:Clint Davis (clint.davis)Labels:
Date Opened:2012-12-18 07:04:43.000-0600Date Closed:2013-02-11 21:31:58.000-0600
Versions:SVN Frequency of
Environment:Attachments:( 0) 20827.diff
( 1) asterisk-20827-confbridge-events.diff
Description:Conf bridge already sends all kinds of AMI events, but not recording or mute actions.
Comments:By: Clint Davis (clint.davis) 2012-12-18 07:06:00.648-0600

Patch for Start/Stop Record, and Mute and Unmute AMI events.

By: Michael L. Young (elguero) 2012-12-19 09:53:48.353-0600

Thank you for your code submission.

You might want to review this page https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines.  Your patch needs to be created according to the guidelines.


By: Clint Davis (clint.davis) 2012-12-20 02:45:42.173-0600

Rebuilt file.

The docs talk about a manager.txt to be updated when adding manager events, however I cant find this file.

By: Michael L. Young (elguero) 2012-12-20 10:55:41.800-0600

Clint, this file was moved to the Asterisk Wiki (https://wiki.asterisk.org/wiki/display/AST/Asterisk+Manager+Interface+%28AMI%29).  -We probably should update the Coding Guidelines to reflect that.-  I have updated the page to reflect the new location for that information.

By: Michael L. Young (elguero) 2012-12-20 15:40:36.060-0600

I was looking at your patch and looking at what apps/app_confbridge.c currently does with manager events and I think we should try to match what is currently written there.

It looks like there are functions specifically for the manager events where documentation can be added as well for that event.

For examples look at:
static void send_conf_end_event(const char *conf_name)
static void send_join_event(struct ast_channel *chan, const char *conf_name)

I would suggest following the same structure as can be seen throughout the code in that module.

Also, for:
ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeRecord",
"Conference: %s\r\n"
"Action: Stopped \n",

I would recommend:
manager_event(EVENT_FLAG_CALL, "ConfbridgeStopRecord",
"Conference: %s\r\n",

That way you do not need to have "Action" in the result.  You know what occurred based on the "ConfbridgeStopRecord" action.  Also, it is not necessary to pass in "chan" at all if you use manager_event().

By: Clint Davis (clint.davis) 2013-02-03 02:44:24.337-0600

Followed existing structure and documentation of existing manager events. Moved events above first function call.

By: Clint Davis (clint.davis) 2013-02-03 02:49:23.899-0600

Helps if I attach the correct file.

By: Michael L. Young (elguero) 2013-02-04 10:46:45.359-0600

Posting a patch with changes that I have made that were based off of the original patch uploaded [^20827.diff].