[asterisk-dev] [Code Review] Don't play a new song for every new hold within a call with caching realtime MOH

mjordan reviewboard at asterisk.org
Wed Nov 23 10:04:12 CST 2011


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

Ship it!


Looks good!

- mjordan


On Nov. 22, 2011, 7:38 p.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1596/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2011, 7:38 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> As a result of the fix for ASTERISK-18039, realtime caching MOH no longer properly resumes playing back a file between different holds in the same call. This is because scanning for new files causes the existing file array to be emptied and we were just comparing that the saved pointer to the filename matched the pointer to the filename in a particular position in the array. An easy fix is to save the filename instead of a pointer to it and then do a strcmp instead of comparing the addresses.
> 
> 
> This addresses bug ASTERISK-18912.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18912
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/res/res_musiconhold.c 346028 
> 
> Diff: https://reviewboard.asterisk.org/r/1596/diff
> 
> 
> Testing
> -------
> 
> Tested adding and removing files from the moh directory and seeing that they were still picked up and that if we were playing a song and it still existed that we continued playing that song across multiple holds on the same call.
> 
> 
> Thanks,
> 
> Terry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111123/ad6ebd61/attachment.htm>


More information about the asterisk-dev mailing list