MOH upload fail {Solved}

I’m trying to upload a MOH file and keep getting the following error:

Symfony\Component\Process\Exception\ProcessTimedOutException
The process “/usr/sbin/asterisk -rx ‘file convert ‘/var/spool/asterisk/tmp/temp.1479311349214.sln48’ ‘/var/spool/asterisk/tmp/temp.1479311349214.ulaw’’” exceeded the timeout of 60 seconds.
File:/var/www/html/admin/libraries/Composer/vendor/symfony/process/Symfony/Component/Process/Process.php:1219

any ideas?

“exceeded the timeout of 60 seconds” means the PHP script running the file conversion was forced to quit after running for more then 60 seconds.

How to Fix (Linux experience required):

  1. Log into Linux Shell on the FreePBX server

  2. cp /etc/php.ini ./php.ini.org

  3. nano /etc/php.ini

  4. Locate max_execution_time

  5. Adjust value from 60 to 120

  6. Exit editor saving file changes

  7. service httpd restart

Then try the MOH upload again. FYI step 2 is a cover your butt step, by creating a copy of the php.ini before modifying the production file.

good luck

I made the change and actually changed it to 240. I tried to upload the wav file and it gave an error after 145s.

Were you successful after changing to 240? If not look in the php file for “max_input_time” and match that value of “max_execution_time”. Do not forget to save changes and restart the httpd service.

cheers

Since “we” generally recommend against starting and stopping individual services on distro-based system, there should be an “fwconsole” sub command for this.

I haven’t even looked at it, but it might be a good feature request…

I tried 240 and 480, with a restart httpd after each. I get the same error listed above after 1:53 no matter what I change the max times to in php.ini

I tried a fwconsole r but that didn’t seem to extend my download time at all either

No, I wouldn’t expect it to. I was simply talking about the MySQL restart.

Now that I’m in the discussion, there are several timeouts that this can be stopping you. One minute and fifty-three seconds is 113 seconds (round to 110). There’s something in your system that’s timing out. Also, look around and make sure there isn’t another php.ini file that needs to be modified. I seem to recall a discussion a few months ago where the “standard” ini file wasn’t the one that the system was actually using.

An alternative to doing your upload this way is to upload the file using sftp and putting the file into the file system where it belongs.

We set the time manually in the freepbx code. You can’t override this.

Fair enough. So my options are using the sftp system that cynjut mentioned or…?

If I want to just add the file via winscp what are the exact specifications for the wav file? Will this even work?

Solution: Went into the /var/spool/asterisk/tmp folder and found the halted conversion between sln and ulaw. I was able to move the sln copy to the asterisk/moh folder and it works. Probably a better solution would be to take the long recording and break it into 4-5 smaller ones.