Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: compsos on June 19, 2011, 07:16:03 AM
-
Hi Jeff
Just had a run in with Snom M9s. This system also has a Snom MP which is being provisioned by a htm file and worked almost out of the box. But the M9s are xml provisioned and somewhat different.
It appears the file generator is reading the 1st line ["snom-m9-$MAC.xml" OK to generate the file but enters a blank line at the beginning of the file. The M9 refuses to read an XML file starting with a blank line. Other phones using cfg files do not notice the blank line.
Is there a patch or work around to stop this happening on every commit?
-
Basically the problem is that when the files are dreated or updated in the tftpboot directory the first line is blank
<?xml version="1.0" encoding="utf-8"?>
So far have not found the cause. The field in the sark.db is fine. It particularly affects phones working on xml files as they do not comply.
Any clues on where the extra "/n" could be?
-
Here is a fix for you to try...
grab /opt/sark/generator/tftpSQL.php using your favourite editor.
At or around line 110 find
$row['provision'] = preg_replace ( ' /\["(.*)"/ ',"", $row['provision'] );
replace it with
$row['provision'] = preg_replace ( ' /\["(.*)"\n/ ',"", $row['provision'] );
Save it back, issue a commit and then let me know if it worked for you.
Kind Regards
S
-
Well done. That appears to have cured it.
-
Thanks for letting me know; I'll commit it to svn so that you get it in the next out.
Best
jeff