[asterisk-bugs] [JIRA] (ASTERISK-28029) [patch] res_musiconhold : music on hold will not start if previous hold just reached end of file

Friendly Automation (JIRA) noreply at issues.asterisk.org
Fri Sep 14 11:14:54 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244815#comment-244815 ] 

Friendly Automation commented on ASTERISK-28029:
------------------------------------------------

Change 10055 merged by George Joseph:
res_musiconhold.c: Restart MOH if previous hold just reached end-of-file

[https://gerrit.asterisk.org/10055|https://gerrit.asterisk.org/10055]

> [patch] res_musiconhold : music on hold will not start if previous hold just reached end of file
> ------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28029
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28029
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_musiconhold
>    Affects Versions: 13.13.0
>         Environment: Music on hold class=file
>            Reporter: Frederic LE FOLL
>            Assignee: Frederic LE FOLL
>            Severity: Minor
>
> Observed randomly when a channel is put on hold and retrieved several times, music on hold won't play and CLI will display:
>     -- Started music on hold, class '...', on channel '...'
> immediately followed by:
>     -- Stopped music on hold on ...
> Analysis:
> After adding a few logs, the problem appears to come from res_musiconhold.c moh_files_readframe() function.
> This function is called for every sample reading. When sample reading fails, it calls ast_moh_files_next() to switch to next file.
> But on MOH activation, moh_files_readframe() is called while current stream attached to channel is NULL and it calls ast_moh_files_next() immediatly, but it won't call ast_moh_files_next() again if sample reading fails. This may occur - because res_musiconhold retains last sample reading position in the channel data - if MOH during previous hold/retrieve just reached end of file (obviously, a bit of bad luck is required here).
> I will propose a fix through Gerrit.
> This problem was observed on Asterisk 13.13, but moh_files_readframe() has not changed much in time, including in more recent Asterisk versions. So, other versions should be affected too.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list