so
$time_check_route = 'EXTENSION';
$time_check_route_value = '9999999999999999999988';
$time_check_route_context = $menu_id[$i];
}
$call_menu_ext .= "\n";
$call_menu_ext .= "; $menu_name[$i]\n";
$call_menu_ext .= "[$menu_id[$i]]\n";
$call_menu_ext .= "exten => s,1,Answer\n"; $call_menu_ext .= "exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,$tracking_group[$$
$call_menu_ext .= "exten => s,n,Set(INVCOUNT=0) \n";
$call_menu_ext .= "$menu_prompt_ext";
if ($menu_timeout[$i] > 0)
{$call_menu_ext .= "exten => s,n,WaitExten($menu_timeout[$i])\n";}
$k=0;
while ($k < $menu_repeat[$i])
{
$call_menu_ext .= "$menu_prompt_ext";
if ($menu_timeout[$i] > 0)
{$call_menu_ext .= "exten => s,n,WaitExten($menu_timeout[$i])\n";}
$k++;
}
# $call_menu_ext .= "exten => s,n,Hangup\n";
$call_menu_ext .= "\n";
$call_menu_ext .= "$call_menu_options_ext";
$call_menu_ext .= "\n";
if (length($call_menu_timeout_ext) < 1)
{
if ( (length($menu_timeout_prompt[$i])>0) && ($menu_timeout_prompt[$i] !~ /NONE/$
{
$call_menu_ext .= "exten => t,1,Playback($menu_timeout_prompt[$i])\n";
$call_menu_ext .= "exten => t,n,Goto(s,4)\n"; }
else
{
$call_menu_ext .= "exten => t,1,Goto(s,4)\n"; }
}
else
{
$call_menu_ext .= "$call_menu_timeout_ext";
}
if (length($call_menu_invalid_ext) < 1)
{
if ( (length($menu_invalid_prompt[$i])>0) && ($menu_invalid_prompt[$i] !~ /NONE/)$
{
$call_menu_ext .= "exten => i,1,Playback($menu_invalid_prompt[$i])\n";
$call_menu_ext .= "exten => i,n,Goto(s,4)\n"; }
else
{
$call_menu_ext .= "exten => i,1,Goto(s,4)\n"; }
}
else
{
$call_menu_ext .= "$call_menu_invalid_ext";
}
$call_menu_ext .= "; hangup\n";
$call_menu_ext .= 'exten => h,1,DeadAGI(
agi://127.0.0.1:4577/call_log--HVcauses--PRI-----$ if (length($custom_dialplan_entry[$i]) > 4)
{
$call_menu_ext .= "\n\n";
$call_menu_ext .= "; custom dialplan entries\n";
$call_menu_ext .= "$custom_dialplan_entry[$i]\n";
}
$call_menu_ext .= "\n\n";
$i++;
}
##### END Generate the Call Menu entries #####
**************************************CHANGE TO**************************************** $time_check_route = 'EXTENSION';
$time_check_route_value = '9999999999999999999988';
$time_check_route_context = $menu_id[$i];
}
$call_menu_ext .= "\n";
$call_menu_ext .= "; $menu_name[$i]\n";
$call_menu_ext .= "[$menu_id[$i]]\n";
$call_menu_ext .= "exten => s,2,Answer\n"; $call_menu_ext .= "exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,$tracking_group[$$
$call_menu_ext .= "exten => s,n,Set(INVCOUNT=0) \n";
$call_menu_ext .= "$menu_prompt_ext";
if ($menu_timeout[$i] > 0)
{$call_menu_ext .= "exten => s,n,WaitExten($menu_timeout[$i])\n";}
$k=0;
while ($k < $menu_repeat[$i])
{
$call_menu_ext .= "$menu_prompt_ext";
if ($menu_timeout[$i] > 0)
{$call_menu_ext .= "exten => s,n,WaitExten($menu_timeout[$i])\n";}
$k++;
}
# $call_menu_ext .= "exten => s,n,Hangup\n";
$call_menu_ext .= "\n";
$call_menu_ext .= "$call_menu_options_ext";
$call_menu_ext .= "\n";
if (length($call_menu_timeout_ext) < 1)
{
if ( (length($menu_timeout_prompt[$i])>0) && ($menu_timeout_prompt[$i] !~ /NONE/$
{
$call_menu_ext .= "exten => t,1,Playback($menu_timeout_prompt[$i])\n";
$call_menu_ext .= "exten => t,n,Goto(s,5)\n"; }
else
{
$call_menu_ext .= "exten => t,1,Goto(s,5)\n"; }
}
else
{
$call_menu_ext .= "$call_menu_timeout_ext";
}
if (length($call_menu_invalid_ext) < 1)
{
if ( (length($menu_invalid_prompt[$i])>0) && ($menu_invalid_prompt[$i] !~ /NONE/)$
{
$call_menu_ext .= "exten => i,1,Playback($menu_invalid_prompt[$i])\n";
$call_menu_ext .= "exten => i,n,Goto(s,5)\n"; }
else
{
$call_menu_ext .= "exten => i,1,Goto(s,5)\n"; }
}
else
{
$call_menu_ext .= "$call_menu_invalid_ext";
}
$call_menu_ext .= "; hangup\n";
$call_menu_ext .= 'exten => h,1,DeadAGI(
agi://127.0.0.1:4577/call_log--HVcauses--PRI-----$ if (length($custom_dialplan_entry[$i]) > 4)
{
$call_menu_ext .= "\n\n";
$call_menu_ext .= "; custom dialplan entries\n";
$call_menu_ext .= "$custom_dialplan_entry[$i]\n";
}
$call_menu_ext .= "\n\n";
$i++;
}
##### END Generate the Call Menu entries #####
Sorry that took a while to find and i'm handling support calls while I go