$mohsilence ?? '')); } if (function_exists('timeconditions_timegroups_drawgroupselect')){ $optionalelems .= load_view(__DIR__.'/timecond.php', array('time_group_id' => $time_group_id ?? '', 'time_mode' => $time_mode ?? '','timezone' => $timezone ?? '','calendar_id' => $calendar_id ?? '','calendar_group_id' => $calendar_group_id ?? '')); } //Notification tab email settings $emailfrom = (isset($emailInfo) && isset($emailInfo['emailfrom'])) ? $emailInfo['emailfrom'] : ''; $emailto = (isset($emailInfo) && isset($emailInfo['emailto'])) ? $emailInfo['emailto'] : ''; $emailsubject = (isset($emailInfo) && isset($emailInfo['emailsubject'])) ? $emailInfo['emailsubject'] : ''; $emailbody = (isset($emailInfo) && isset($emailInfo['emailbody'])) ? $emailInfo['emailbody'] : ''; //Hooks.... //$module_hook = moduleHook::create(); //if (!empty($module_hook->hookHtml)) { if (!empty($hooks['oldHooks'])) { $hooktab = ''; } //Dialpattern Help $dplabel = _("Dial Patterns that will use this Route"); $dphstring = array(); $dphstring[] = '
'; $dphstring[] = '
'; $dphstring[] = _("Pattern Help"); $dphstring[] = ''; $dphstring[] = '
'; $dphstring[] = '
'; $dphstring[] = '

'._("A Dial Pattern is a unique set of digits that will select this route and send the call to the designated trunks. If a dialed pattern matches this route, no subsequent routes will be tried. If Time Groups are enabled, subsequent routes will be checked for matches outside of the designated time(s).").'

'; $dphstring[] = '

'._("Rules:").'

'; $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; if($amp_conf['ENABLEOLDDIALPATTERNS']){ $dphstring[] = ' '; $dphstring[] = ' '; }else{ $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; $dphstring[] = ' '; } $dphstring[] = '
X'. _("matches any digit from 0-9").'
Z'. _("matches any digit from 1-9").'
N'. _("matches any digit from 2-9").'
[1237-9]'. _("matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)").'
.'. _("wildcard, matches one or more characters").'
|'. _("separates a dialing prefix from the number (for example, 9|NXXXXXX would match when some dialed \"95551234\" but would only pass \"5551234\" to the trunks)").'
/;'. _("appended to a dial pattern, matches a CallerID or CallerID pattern (for example, NXXXXXX/104 would match only if dialed by extension \"104\")").'
'. _("prepend:"). ''. _("Digits to prepend to a successful match. If the dialed number matches the patterns specified by the subsequent columns, then this will be prepended before sending to the trunks.").'
'. _("prefix:"). ''. _("Prefix to remove on a successful match. The dialed number is compared to this and the subsequent columns for a match. Upon a match, this prefix is removed from the dialed number before sending it to the trunks.").'
'. _("match pattern:"). ''. _("The dialed number will be compared against the prefix + this match pattern. Upon a match, the match pattern portion of the dialed number will be sent to the trunks").'
'. _("CallerID:"). ''. _("If CallerID is supplied, the dialed number will only match the prefix + match pattern if the CallerID being transmitted matches this. When extensions make outbound calls, the CallerID will be their extension number and NOT their Outbound CID. The above special matching sequences can be used for CallerID matching similar to other number matches.").'
'; $dphstring[] = '
'; $dphstring[] = '
'; $dphelp = implode(PHP_EOL, $dphstring); $pp_tit = _("prepend"); $pf_tit = _("prefix"); $mp_tit = _("match pattern"); $ci_tit = _("CallerID"); //Dialpatterns Form field(s) $dpinput = array(); if(!$amp_conf['ENABLEOLDDIALPATTERNS']) { foreach ($dialpattern_array as $idx => $pattern) { if ($idx == 50) { $dpt_title_class = 'dpt-title dpt-nodisplay'; } $dpinput[] = ''; $dpt_class = $pattern['prepend_digits'] == '' ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' ('; $dpinput[] = ' '; $dpinput[] = ' )'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = $pattern['match_pattern_prefix'] == '' ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' '; $dpinput[] = ' |'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = $pattern['match_pattern_pass'] == '' ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' ['; $dpinput[] = ' '; $dpinput[] = ' /'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = $pattern['match_cid'] == '' ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' '; $dpinput[] = ' ]'; $dpinput[] = '
'; $dpinput[] = ''; $dpinput[] = ' '; $dpinput[] = ' '; $dpinput[] = ''; $dpinput[] = ''; } //Always an empty row incase there are no patterns.... $next_idx = count($dialpattern_array); $idx = !empty($idx) ? $idx : $next_idx; if ($idx == 50) { $dpt_title_class = 'dpt-title dpt-nodisplay'; } $dpinput[] = ''; $dpt_class = (isset($pattern) && $pattern['prepend_digits'] == '') ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' ('; $dpinput[] = ' '; $dpinput[] = ' )'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = (isset($pattern) && $pattern['match_pattern_prefix'] == '') ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' '; $dpinput[] = ' |'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = (isset($pattern) && $pattern['match_pattern_pass'] == '') ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' ['; $dpinput[] = ' '; $dpinput[] = ' /'; $dpinput[] = '
'; $dpinput[] = ''; $dpt_class = (isset($pattern) && $pattern['match_cid'] == '') ? $dpt_title_class : 'dpt-value'; $dpinput[] = ''; $dpinput[] = '
'; $dpinput[] = ' '; $dpinput[] = ' ]'; $dpinput[] = '
'; $dpinput[] = ''; $dpinput[] = ' '; $dpinput[] = ' '; $dpinput[] = ''; $dpinput[] = ''; $dprows = implode(PHP_EOL, $dpinput); }else{ $dpinput = array(); $dpinput[] = ''; $dprows = implode(PHP_EOL, $dpinput); } //trunk html $trunks = array(); foreach (core_trunks_listbyid(true) as $temp) { $trunks[$temp['trunkid']] = $temp['name']; $trunkstate[$temp['trunkid']] = $temp['disabled']; $trunkdisplay[$temp['trunkid']] = isset($temp['routedisplay']) ? $temp['routedisplay'] : 'on'; } $key = -1; if (is_array($trunkpriority)) { $positions=count($trunkpriority); } $trunkhtml = ''; $trunkhtml .= ''; if(!empty($trunkpriority) && is_array($trunkpriority)) { foreach ($trunkpriority as $key=>$trunk) { $trunkhtml .= ''; $trunkhtml .= ''; $trunkhtml .= ''; } } $key += 1; $name = ""; $num_new_boxes = ($extdisplay ? 1 : ((count($trunks) > 3) ? 3 : count($trunks))); for ($i=0; $i < $num_new_boxes; $i++) { $trunkhtml .= ''; $trunkhtml .= ''; $trunkhtml .= ''; $key++; } $trunkhtml .= ''; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= ''; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= ''; $trunkhtml .= '
'; $trunkhtml .= '
'; $trunkhtml .= '
'; ?>

Format: <#######>. You can also use the format: \"hidden\" <#######> to hide the CallerID sent out over Digital lines if supported (E1/T1/J1/BRI/SIP/IAX).

If set, this will override all CIDS specified except:
  • extension/device EMERGENCY CIDs if this route is checked as an EMERGENCY Route
  • trunk CID if trunk is set to force its CID
  • Forwarded call CIDs (CF, Follow Me, Ring Groups, etc)
  • Extension/User CIDs if checked
")?>
> >

A numerical password, or the path to an Authenticate password file can be used.

Leave this field blank to not prompt for password.")?>
> >
'._("Optional: Selecting Intra-Company will treat this route as an intra-company connection, preserving the internal CallerID information instead of the outbound CID of either the extension or trunk.")?>

For Dial Patterns that match long distance numbers, for example, you'd want to pick the cheapest routes for long distance (ie, VoIP trunks first) followed by more expensive routes (POTS lines).")?>
prepend','prefix','match pattern','callerid')?>
prepend','prefix','match pattern','callerid')?>
> >
Available Variables for Email Subject and Body:
{{CALLUID}} - Call's Unique ID
{{ROUTENAME}} - Outbound Route's name
{{DIALEDNUMBER}} - Destination number as it will be sent to the trunk
{{DIALEDNUMBERRAW}} - Destination number as it was dialed
{{CALLERNAME}} - Caller's name
{{CALLERNUMBER}} - Caller's number
{{CALLERALL}} - example: \"CALLERNAME\" <CALLERNUMBER>
{{OUTGOINGCALLERIDNAME}} - Outgoing CallerID name
{{OUTGOINGCALLERIDNUMBER}} - Outgoing CallerID number
{{OUTGOINGCALLERIDALL}} - example: \"OUTGOINGCALLERIDNAME\" <OUTGOINGCALLERIDNUMBER>
{{TRUNKNAME}} - Trunk name
{{MONTH}} - 2 digit month
{{DAY}} - 2 digit day
{{YEAR}} - 4 digit year
{{TIME}} - example: 17:30:00
{{TIMEAMPM}} - example: 5:30:00 PM
{{TZFULL}} - Full Timezone. ex. America/New_York
{{TZSHORT}} - Short Timezone. ex. UTC, PST, +12 "); echo isset($hooksAdditionalContent['emailHelpText']) ? $hooksAdditionalContent['emailHelpText'] : ''; ?>
See Email Subject Help message for available variables.")?>
hookHtml; ?>