You are breaking my Custom On Hold Music Category!

I don’t know when you all started this, but you have started removing my symbolic link /var/lib/asterisk/mohmp3 -> /var/lib/asterisk/moh.

I already have a custom Category set up, and now it is constantly breaking whenever I apply a module update to the box.

Why would you delete that link? Especially when it is being used! We have a Pizza Parlor hanging off our box and when you call them, it plays their advertising until they answer - with this bug, the MOH fails, so you get dead air until they answer!

Why would you delete a Symbolic Link? What did it ever do to you? And it’s a link that you were using!

We don’t delete that link.

It’s certainly not me deleting it - what script/function would delete it?

Nothing I can think of would do this. You can try to see if fwconsole chown is doing it by just running the command. There’s nothing that touches symbolic links except for that command and it’s not exclusive.

That was my thought too and I just did - it did not delete it - I am going to re-apply the MOH module and see if that is the culprit.

The module does not touch symbolic links

Re-applying the module didn’t remove the link.

Then is is not freepbx.

Andrew - I have ONLY been doing updates either via the FreePBX Module Admin or System Admin - Updates. The only script I have run recently was the Distro Version script that updated me from 6.12.65 to 10.13.66-1 - upgrade-10.13.66-1.sh.

I am reading that script now to see if I can see it.

Somewhere in all those scripts and updates, something killed that symbolic link.

Finding it may not be easy, but something removed it.

If you find it then we will fix it. But nothing has been done there. So I doubt you will find anything.

Pragmatically, why not just:-

cp -r /var/lib/asterisk/mohmp3/ /var/lib/asterisk/moh/

?

1 Like

I could certainly do that - but what if it nukes that directory? I would like to figure out what got rid of that symbolic link.

What if what nukes that directory?

You where talking about the symlink being deleted/nuked, if you cp not mv’d so they will still be in to old location :slight_smile:

No files are being deleted - just the Symbolic Link - problem is the MOH category references the /var/lib/asterisk/mohmp3/sliceparlor directory - that is what FreePBX created when we created the category.

I guess I could delete the category and then re-create it and just avoid the problem in the future - maybe that is the solution since no one will fess up to removing the link.

Ok - I was just getting rid of my sliceparlor category and then I removed the mohmp3 symbolic link and now when I try to add a category back it throws an exception!:

		return;
	}
	$sql = "INSERT INTO music (`category`, `type`) VALUES (?,?)";
	$sth = $this->db->prepare($sql);
	$sth->execute(array($name,$type));

	if(!file_exists($this->mohpath . "/" . $name)) {
		mkdir($this->mohpath . "/" . $name);
	}
	needreload();

So I finally see what is wrong - it thinks my moh directory is /var/lib/asterisk/mohmp3 - looking in Advanced Settings now…Yup - my MoH subdirectory was set to mohmp3 - fixed that and now I recreated the category, it created it under moh and now it’s good.

So I no longer need the symbolic link - worked around rather than fixed I would say.

Please give us a screen shot for errors like this instead of disregarding them

The exception is reproducible - set your MOH directory under Advanced Settings to mohmp3, make sure it doesn’t exist as a directory or a symbolic link to moh and try and create a category.

1 Like