Sort Trunks in FOP Panel

I am looking for a way to sort trunks in the fop panel.

Now I seems that there is no order in the trunks, I have looked in retrieve_op_config_from_mysql.php or ,pl os it should be somewhere in there. For extensions there is a way to sort to number or name but for trunks there seems to be no order.

How can I sort the trunk list somehow.

from retrieve_op_config_from_mysql.php is below:

#Next, populate trunks (sip and iax)
$trunklist=array();
$tables = array(“sip”,“iax”);
foreach ($tables as $table) {
if (table_exists($db,$table)) {
$statement = “SELECT data,id,’$table’ from $table where keyword=‘account’ and flags <> 1 and id LIKE ‘tr-%’ group by data order by id”;
$results = $db->getAll($statement);
if(DB::IsError($results)) {
die($results->getMessage());
}
if (count($results) < 1) {
print “Notice: no $table trunks defined\n”;
}
$trunklist = array_merge($trunklist,$results);
}
else { print “Table does not exist: $table \n”; }
}

It read here $statement = “SELECT data,id,’$table’ from $table where keyword=‘account’ and flags <> 1 and id LIKE ‘tr-%’ group by data order by id”;

I assume group by data order means not to group sort by name, if the is the right line to change how should I change this to sort trunks to name and not id.