[asterisk-dev] [Code Review] 3306: app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.

rmudgett reviewboard at asterisk.org
Wed Mar 5 21:38:15 CST 2014



> On March 5, 2014, 7:34 p.m., Matt Jordan wrote:
> > So this completely solves the problem in the report, and we may decide this is sufficient.
> > 
> > In general, however, this problem happens a lot - someone starts MoH on a channel, hangs it up, does something else with it... and we don't really ever stop MoH. We just kill the channel.
> > 
> > Would it be worthwhile to see if MoH was started on a channel, and stop it during ast_hangup?

Well we could do it on an ast_hangup() or before the h-exten/hangup_handlers run but if the channel is hungup then MOH has to have been stopped.  Adding it there would just increase the AMI traffic.

The verbose MOH stop message is generated whenever the MOH class is released and truly stops the MOH stream.  This is not the same as intentionally stopping MOH.  You can get two MOH start messages without a stop if a recording is played when MOH is running and MOH is then resumed.  It is a bit of a mess when the MOH start/stop messages are sent.  res_musiconhold always knows when MOH starts/stops being streamed.


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3306/#review11081
-----------------------------------------------------------


On March 5, 2014, 6:56 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3306/
> -----------------------------------------------------------
> 
> (Updated March 5, 2014, 6:56 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23311
>     https://issues.asterisk.org/jira/browse/ASTERISK-23311
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When MOH is playing to a user in a conference and the user is kicked or hangs up from the conference then the AMI MusicOnHoldSotp events didn't happen.
> 
> This patch should be done for v11+.
> 
> 
> Diffs
> -----
> 
>   /branches/12/apps/confbridge/conf_state_single_marked.c 409977 
>   /branches/12/apps/confbridge/conf_state_single.c 409977 
>   /branches/12/apps/confbridge/conf_state_inactive.c 409977 
>   /branches/12/apps/confbridge/conf_state.c 409977 
> 
> Diff: https://reviewboard.asterisk.org/r/3306/diff/
> 
> 
> Testing
> -------
> 
> Before patch the AMI MusicOnHoldStop event did not happen when the user is kicked or hangs up to leave the conference.
> With the patch the event happens.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140306/f9ba49e8/attachment.html>


More information about the asterisk-dev mailing list