Working on music on hold.
This commit is contained in:
parent
1427c56634
commit
b2e1dd4b2e
|
|
@ -43,4 +43,47 @@
|
|||
$apps[$x]['permissions'][5]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][5]['groups'][] = "admin";
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_music_on_hold";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_category";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_rate";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "8000,16000,32000,48000";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_shuffle";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "true/false";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_timer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "soft";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_chime_list";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_chime_freq";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "music_on_hold_chime_max";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
|
@ -154,7 +154,7 @@ include "root.php";
|
|||
$array = array_merge($array, glob($music_on_hold_dir."/*/*", GLOB_ONLYDIR));
|
||||
}
|
||||
//list the categories
|
||||
$moh_xml = "";
|
||||
$xml = "";
|
||||
foreach($array as $moh_dir) {
|
||||
//set the directory
|
||||
$moh_dir = substr($moh_dir, strlen($music_on_hold_dir."/"));
|
||||
|
|
@ -167,14 +167,14 @@ include "root.php";
|
|||
$moh_name = "default/$moh_rate";
|
||||
}
|
||||
//build the xml
|
||||
$moh_xml .= " <directory name=\"$moh_name\" path=\"\$\${sounds_dir}/music/$moh_dir\">\n";
|
||||
$moh_xml .= " <param name=\"rate\" value=\"".$moh_rate."\"/>\n";
|
||||
$moh_xml .= " <param name=\"shuffle\" value=\"true\"/>\n";
|
||||
$moh_xml .= " <param name=\"channels\" value=\"1\"/>\n";
|
||||
$moh_xml .= " <param name=\"interval\" value=\"20\"/>\n";
|
||||
$moh_xml .= " <param name=\"timer-name\" value=\"soft\"/>\n";
|
||||
$moh_xml .= " </directory>\n";
|
||||
$this->xml = $moh_xml;
|
||||
$xml .= " <directory name=\"$moh_name\" path=\"\$\${sounds_dir}/music/$moh_dir\">\n";
|
||||
$xml .= " <param name=\"rate\" value=\"".$moh_rate."\"/>\n";
|
||||
$xml .= " <param name=\"shuffle\" value=\"true\"/>\n";
|
||||
$xml .= " <param name=\"channels\" value=\"1\"/>\n";
|
||||
$xml .= " <param name=\"interval\" value=\"20\"/>\n";
|
||||
$xml .= " <param name=\"timer-name\" value=\"soft\"/>\n";
|
||||
$xml .= " </directory>\n";
|
||||
$this->xml = $xml;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<configuration name="local_stream.conf" description="stream files from local dir">
|
||||
<!-- fallback to default if requested moh class isn't found -->
|
||||
<directory name="default" path="$${sounds_dir}/music/8000">
|
||||
<directory name="default" path="$${sounds_dir}/music/default/8000">
|
||||
<param name="rate" value="8000"/>
|
||||
<param name="shuffle" value="true"/>
|
||||
<param name="channels" value="1"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue