Ensure the gateway_uuid is lower case

This commit is contained in:
Mark Crane
2014-06-24 06:40:29 +00:00
parent 3215aa7eb9
commit 7a01104700
2 changed files with 3 additions and 3 deletions

View File

@@ -123,7 +123,7 @@
end
x = 0;
dbh:query(sql, function(field)
table.insert(xml, [[ <gateway name="]] .. field.gateway_uuid .. [[">]]);
table.insert(xml, [[ <gateway name="]] .. string.lower(field.gateway_uuid) .. [[">]]);
if (string.len(field.username) > 0) then
table.insert(xml, [[ <param name="username" value="]] .. field.username .. [["/>]]);

View File

@@ -1778,10 +1778,10 @@ function save_gateway_xml() {
$profile = "external";
}
//open the xml file
$fout = fopen($_SESSION['switch']['sip_profiles']['dir']."/".$profile."/v_".$row['gateway_uuid'].".xml","w");
$fout = fopen($_SESSION['switch']['sip_profiles']['dir']."/".$profile."/v_".strtolower($row['gateway_uuid']).".xml","w");
//build the xml
$xml .= "<include>\n";
$xml .= " <gateway name=\"" . $row['gateway_uuid'] . "\">\n";
$xml .= " <gateway name=\"" . strtolower($row['gateway_uuid']) . "\">\n";
if (strlen($row['username']) > 0) {
$xml .= " <param name=\"username\" value=\"" . $row['username'] . "\"/>\n";
}