Summary:ASTERISK-15441: [patch] Announce to user when they have been muted/unmuted from the AMI
Reporter:Mark Murawski (kobaz)Labels:patch
Date Opened:2010-01-15 13:21:46.000-0600Date Closed:
Versions:Frequency of
Environment:Attachments:( 0) meetme.diff
Description:When a user does a *1, they hear 'you have been (un)muted'
When a mute or unmute command is sent over the ami, the user hears no mute notification.


I'm not sure if my handling of resuming music on hold is correct.
Comments:By: Leif Madsen (lmadsen) 2010-01-18 09:59:48.000-0600

I'm marking this as Ready for Testing. Thanks for the contribution (and all the recent contributions we've been seeing from you!)

By: Leif Madsen (lmadsen) 2010-01-18 10:01:14.000-0600

Note that I'm just adding some extra (superfluous) information to this issue before running a script on it as a test. You can ignore it.

By: Mark Murawski (kobaz) 2011-02-10 12:38:26.000-0600

Reviewboard link: https://reviewboard.asterisk.org/r/1010

By: Mark Murawski (kobaz) 2011-02-10 12:49:37.000-0600

On issue 18778, poster reported problems using the path.  Can you post your console output and any other pertinent information.

By: Mark Murawski (kobaz) 2011-02-10 12:57:30.000-0600

Updated diff.

By: Mike Little (phonetech) 2011-02-10 14:18:37.000-0600

I am using Asterisk

I am getting the following error when trying to apply the patch:

patch -p0 app_meetme.c meetme.diff

patching file app_meetme.c
Hunk #1 succeeded at 482 (offset 5 lines).
Hunk #2 succeeded at 489 (offset -7 lines).
Hunk #3 succeeded at 769 (offset -24 lines).
Hunk #4 succeeded at 985 (offset -24 lines).
Hunk ASTERISK-1 succeeded at 1976 (offset -40 lines).
Hunk ASTERISK-2 FAILED at 2272.
Hunk ASTERISK-3 succeeded at 2398 (offset -51 lines).
Hunk ASTERISK-4 succeeded at 4698 (offset -99 lines).
Hunk ASTERISK-5 succeeded at 4741 (offset -99 lines).
1 out of 9 hunks FAILED -- saving rejects to file app_meetme.c.rej

Here are the contents of app_meetme.c.rej

*** 2245,2251 ****
       ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

-       if (!(user = ao2_alloc(sizeof(*user), NULL))) {
               goto conf_run_cleanup;

--- 2272,2278 ----
       ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));

+       if (!(user = ao2_alloc(sizeof(*user), ast_conf_user_ao2_destructor))) {
               goto conf_run_cleanup;

By: Mark Murawski (kobaz) 2011-02-10 14:30:21.000-0600

This is against trunk, so no guarantees it will apply clean to any other branch.

looks like the only part that didn't apply was the destuctor
load up the patched app_meetme.c and change this line:
(!(user = ao2_alloc(sizeof(*user), NULL))) {

to this:
if (!(user = ao2_alloc(sizeof(*user), ast_conf_user_ao2_destructor))) {

Announcement is optional (in the latest patch), so make sure you pass
AnnounceToUser: yes

By: Mike Little (phonetech) 2011-02-10 15:13:52.000-0600

Thank You, kobaz. It appears to be working for mute/unmute when passing AnnounceToUser: yes.

Can the announcement of locking/unlocking a conference also be enabled, please?

By: Mark Murawski (kobaz) 2011-02-10 15:18:24.000-0600

Yeah locking/unlocking would be doable.  Please put in a new issue for it and let me know the number.

By: Mike Little (phonetech) 2011-02-10 15:25:39.000-0600

Thanks. I have opened issue 18786 for the conference locking/unlocking issue.