MUSIC ON HOLD

Hi,
I have installed the new version of vicidial (2.0.4.rc3).
My goal is to play files in a specific order in the music on hold portion.
What I did is modify the agi-script for the inbound call.
file: agi-VDAD_ALL_inboundlui1.agi
---part of the script START---
if ($hold_message_counter > $prompt_interval)
{
# $AGI->stream_file('sip-silence'); # stop music-on-hold process
# $AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long
$hold_message_counter = 0;
$start_moh=1;
if ($drop_timer > 3) {$drop_timer = ($drop_timer + 5);} # add propmt play time to total queue time
}
else {$hold_message_counter++;}
if ($hold_tone_counter > 3)
{
$hold_tone_counter = 0;
}
else {$hold_tone_counter++;}
if ($drop_timer < 3)
{
### sleep for 23 hundredths of a second
usleep(1*230*1000);
$drop_timer = ($drop_timer + 0.25);
}
else
{
if ($start_moh > 0)
{
$start_moh=1;
print "SET MUSIC ON $moh_context\n";
checkresult($result);
}
### sleep for 99 hundredths of a second
usleep(1*990*1000);
$drop_timer++;
}
---part of the script END--
Modification:
1. I removed the generic_hold part so that it will only play the music on hold files I made.
Questions:
1. How will I know the order of the native music on hold context? Is it alphabetically? Is it by date modified? Is it by file size?
[native]
mode=files
directory=/var/lib/asterisk/moh-native
- its playing my list but i don't know the specific order.
THANKS!!
-
I have installed the new version of vicidial (2.0.4.rc3).
My goal is to play files in a specific order in the music on hold portion.
What I did is modify the agi-script for the inbound call.
file: agi-VDAD_ALL_inboundlui1.agi
---part of the script START---
if ($hold_message_counter > $prompt_interval)
{
# $AGI->stream_file('sip-silence'); # stop music-on-hold process
# $AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long
$hold_message_counter = 0;
$start_moh=1;
if ($drop_timer > 3) {$drop_timer = ($drop_timer + 5);} # add propmt play time to total queue time
}
else {$hold_message_counter++;}
if ($hold_tone_counter > 3)
{
$hold_tone_counter = 0;
}
else {$hold_tone_counter++;}
if ($drop_timer < 3)
{
### sleep for 23 hundredths of a second
usleep(1*230*1000);
$drop_timer = ($drop_timer + 0.25);
}
else
{
if ($start_moh > 0)
{
$start_moh=1;
print "SET MUSIC ON $moh_context\n";
checkresult($result);
}
### sleep for 99 hundredths of a second
usleep(1*990*1000);
$drop_timer++;
}
---part of the script END--
Modification:
1. I removed the generic_hold part so that it will only play the music on hold files I made.
Questions:
1. How will I know the order of the native music on hold context? Is it alphabetically? Is it by date modified? Is it by file size?
[native]
mode=files
directory=/var/lib/asterisk/moh-native
- its playing my list but i don't know the specific order.
THANKS!!
-