Summary:ASTERISK-28892: res_musiconhold: Module res_musiconhold throws false warning
Reporter:Nicholas John Koch (aviator)Labels:
Date Opened:2020-05-13 11:50:28Date Closed:2020-05-20 07:18:00
Versions:16.9.0 Frequency of
Environment:Linux 3.16.0-042stab139.1 x86_64 GNU/Linux Debian GNU/Linux 9 (stretch)Attachments:( 0) patch.txt
( 1) patch.txt
Description:A warning is triggered that there may be a problem regarding file extension (which is correct and should not be set anyway). The warning also appears if there is a dot within the path itself.


The music plays correctly but you get a warning message.
Comments:By: Asterisk Team (asteriskteam) 2020-05-13 11:50:28.987-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Nicholas John Koch (aviator) 2020-05-13 11:52:32.335-0500

This patch checks for the position of last dot character and checks on its position. If it is behind the last slash we see a file extension. Otherwise is is in the path specification which ist ok then.

By: Joshua C. Colp (jcolp) 2020-05-13 12:02:38.459-0500

Do you plan on putting this up on Gerrit for inclusion?

By: Nicholas John Koch (aviator) 2020-05-13 12:08:32.824-0500

Have not done it before but I can give it a try (https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage).

By: Joshua C. Colp (jcolp) 2020-05-13 12:13:51.197-0500

If you run into any problems post a comment and we'll help to find the problem!

By: Nicholas John Koch (aviator) 2020-05-13 13:47:23.466-0500

I have done the changes and testing successfully and now ran into this ....

nicholas@server1:~/Asterisk-dev/asterisk-16$ git review 16
Could not connect to gerrit.
Enter your gerrit username: aviator
Trying again with ssh://aviator@gerrit.asterisk.org:29418/asterisk.git
Creating a git remote called "gerrit" that maps to:

This repository is now set up for use with git-review. You can set the
default username for future repositories with:
 git config --global --add gitreview.username "aviator"

Your change was committed before the commit hook was installed.
Amending the commit to add a gerrit change id.
remote: error: branch refs/publish/16/ASTERISK-28892:        
remote: You need 'Create' rights to create new references.        
remote: User: aviator        
remote: Contact an administrator to fix the permissions        
remote: Processing changes: refs: 1, done            
To ssh://gerrit.asterisk.org:29418/asterisk.git
! [remote rejected]       HEAD -> refs/publish/16/ASTERISK-28892 (prohibited by Gerrit: not permitted: create)
error: failed to push some refs to 'ssh://aviator@gerrit.asterisk.org:29418/asterisk.git'

By: Joshua C. Colp (jcolp) 2020-05-13 13:52:35.204-0500

What version of git-review are you using? You can check using "git review --version". You must ensure you are using at least 1.27.0. If you are not you can install a newer version using the Python package manager, pip using "pip install git-review". You must also ensure you have signed into https://gerrit.asterisk.org/ and set up your account with username and SSH key so that Gerrit knows who you are.

By: Nicholas John Koch (aviator) 2020-05-13 13:58:39.742-0500

Great stuff! I was on 26 and now on 28. git review worked now.

remote: commit 73c0384: warning: subject >50 characters; use shorter first paragraph        
remote: SUCCESS        
remote:   https://gerrit.asterisk.org/c/asterisk/+/14407 res_musiconhold: Added check for dot character in path of playlist entries ... [NEW]        
To ssh://gerrit.asterisk.org:29418/asterisk.git
* [new branch]            HEAD -> refs/for/16%topic=ASTERISK-28892

And an email came to say that the build has started ....

By: Nicholas John Koch (aviator) 2020-05-14 05:46:00.990-0500

This second patch takes into account some improvements suggested by Sean Bright

By: Friendly Automation (friendly-automation) 2020-05-20 07:18:00.833-0500

Change 14432 merged by Friendly Automation:
res_musiconhold: Added check for dot character in path of playlist entries to avoid warnings


By: Friendly Automation (friendly-automation) 2020-05-20 07:18:33.010-0500

Change 14435 merged by Friendly Automation:
res_musiconhold: Added check for dot character in path of playlist entries to avoid warnings


By: Friendly Automation (friendly-automation) 2020-05-20 07:20:10.229-0500

Change 14407 merged by Friendly Automation:
res_musiconhold: Added check for dot character in path of playlist entries to avoid warnings