]> git.ipfire.org Git - thirdparty/asterisk.git/commit
MoH: Don't restart stream on repeated start calls
authorKinsey Moore <kmoore@digium.com>
Tue, 17 Jun 2014 16:26:10 +0000 (16:26 +0000)
committerKinsey Moore <kmoore@digium.com>
Tue, 17 Jun 2014 16:26:10 +0000 (16:26 +0000)
commitc24b062fd90a2d569686160e52e7149eec3363cc
tree43919b055182be5f7dc0f3a2cdc91dbdecbc027c
parent81d6ceb57dd9cdf05a3acaead3a7a8c220619bf6
MoH: Don't restart stream on repeated start calls

Currently, music on hold will stop and then start again from the
beginning if ast_moh_start() is called multiple times. This can happen
if a call is put on hold repeatedly (the channel receives multiple
HOLD control frames) and can be triggered from ARI by starting MoH on a
channel multiple times. This is fairly jarring/annoying to users.

This change prevents MoH from being restarted if the requested music
class is the same as the one currently playing.

This includes an extra check to prevent the errors previously
experienced in the testsuite and has 100+ test runs behind it.

Review: https://reviewboard.asterisk.org/r/3615/
........

Merged revisions 416439 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 416440 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@416441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_musiconhold.c