Changeset 3495

Show
Ignore:
Timestamp:
01/02/07 23:01:59 (5 years ago)
Author:
gregmac
Message:

Fix #1473

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.routing.php

    r3262 r3495  
    145145        // we do the loops separately so patterns are grouped together 
    146146         
    147         // always drop 1 prefix 
    148         $dialpattern[] = '1|NXXNXXXXXX'; 
    149          
     147        // match 1+NPA+NXX (dropping 1) 
     148        foreach ($xmldata['lca-data']['prefix'] as $prefix) { 
     149          $dialpattern[] = '1|'.$prefix['npa'].$prefix['nxx'].'XXXX'; 
     150        } 
    150151        // match NPA+NXX 
    151152        foreach ($xmldata['lca-data']['prefix'] as $prefix) { 
    152153          $dialpattern[] = $prefix['npa'].$prefix['nxx'].'XXXX'; 
    153154        } 
    154         // add NPA to 7-digits 
     155        // match 7-digits 
    155156        foreach ($xmldata['lca-data']['prefix'] as $prefix) { 
    156           $dialpattern[] = $prefix['npa'].'+'.$prefix['nxx'].'XXXX'; 
     157          $dialpattern[] = $prefix['nxx'].'XXXX'; 
    157158        } 
    158159 
     
    393394    </tr> 
    394395    <tr> 
    395       <td><?php echo _("Insert:")?></td> 
     396      <td> 
     397      <a href=# class="info"><?php echo _("Dial patterns wizards")?><span> 
     398          <strong><?php echo _("These options provide a quick way to add outbound dialing rules. Follow the prompts for each.")?><br> 
     399          <strong><?php echo _("Lookup local prefixes")?></strong> <?php echo _("This looks up your local number on www.localcallingguide.com (NA-only), and sets up so you can dial either 7, 10 or 11 digits (5551234, 6135551234, 16135551234) to access this route.")?><br> 
     400          </span></a>: 
    396401      <input id="npanxx" name="npanxx" type="hidden" /> 
    397402      <script language="javascript"> 
     
    403408        //var npanxx = prompt("What is your areacode + prefix (NPA-NXX)?", document.getElementById('areacode').value); 
    404409        do { 
    405           var npanxx = <?php echo 'prompt("'._("What is your areacode + prefix (NPA-NXX)?\\n\\n(Note: this database contains North American numbers only, and is not guaranteed to be 100% accurate. You will still have the option of modifying results.)\\n\\nThis may take a few seconds.").'")'?>; 
     410          var npanxx = <?php echo 'prompt("'._("What is your areacode + prefix (NPA-NXX)?\\n\\n(Note: this database contains North American numbers only, and is not guaranteed to be 100% accurate. You will still have the option of modifying results.)\\n\\nThis may take a few seconds.").'")' ?>; 
    406411          if (npanxx == null) return; 
    407412        } while (!npanxx.match("^[2-9][0-9][0-9][-]?[2-9][0-9][0-9]$") && <?php echo '!alert("'._("Invalid NPA-NXX. Must be of the format \'NXX-NXX\'").'")'?>); 
     
    470475      <td> 
    471476        <select onChange="insertCode();" id="inscode"> 
    472       <option value=""><?php echo _("Pick pre-defined patterns")?></option> 
     477      <option value=""><?php echo _("(pick one)")?></option> 
    473478      <option value="local"><?php echo _("Local 7 digit")?></option> 
    474479      <option value="local10"><?php echo _("Local 7/10 digit")?></option> 
  • freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.trunks.php

    r3270 r3495  
    117117          // - add 1 to anything else 
    118118          $dialrules[] = $matches[1].'NXXXXXX'; 
     119          // add NPA to 7-digits 
     120          foreach ($xmldata['lca-data']['prefix'] as $prefix) { 
     121            $dialrules[] = $prefix['npa'].'+'.$prefix['nxx'].'XXXX'; 
     122          } 
    119123          foreach ($xmldata['lca-data']['prefix'] as $prefix) { 
    120124            $dialrules[] = $prefix['npa'].$prefix['nxx'].'XXXX'; 
     
    368372        <td> 
    369373          <a href=# class="info"><?php echo _("Dial rules wizards")?><span> 
    370           <strong><?php echo _("Always add prefix to local numbers")?></strong> <?php echo _("is useful for VoIP trunks, where if a number is dialed as \"5551234\", it can be converted to \"16135551234\".")?><br> 
     374          <strong><?php echo _("Always dial with prefix")?></strong> <?php echo _("is useful for VoIP trunks, where if a number is dialed as \"5551234\", it can be converted to \"16135551234\".")?><br> 
    371375          <strong><?php echo _("Remove prefix from local numbers")?></strong> <?php echo _("is useful for ZAP trunks, where if a local number is dialed as \"6135551234\", it can be converted to \"555-1234\".")?><br> 
    372           <strong><?php echo _("Setup dialing for local trunk")?></strong> <?php echo _("This looks up your local number on www.localcallingguide.com (NA-only), and sets up so you can dial either 7 or 10 digits (regardless of what your PSTN is) on a local trunk (where you have to dial 1+areacode for long distance, but only 5551234 (7-digit dialing) or 6135551234 (10-digit dialing) for local calls")?><br> 
     376          <strong><?php echo _("Lookup numbers for local trunk")?></strong> <?php echo _("This looks up your local number on www.localcallingguide.com (NA-only), and sets up so you can dial either 7 or 10 digits (regardless of what your PSTN is) on a local trunk (where you have to dial 1+areacode for long distance, but only 5551234 (7-digit dialing) or 6135551234 (10-digit dialing) for local calls")?><br> 
    373377          </span></a>: 
    374378        </td><td valign="top">&nbsp;&nbsp;<select id="autopop" name="autopop" onChange="changeAutoPop(); "> 
    375379            <option value="" SELECTED><?php echo _("(pick one)")?></option> 
    376             <option value="always"><?php echo _("Always add prefix to local numbers")?></option> 
     380            <option value="always"><?php echo _("Always dial with prefix")?></option> 
    377381            <option value="remove"><?php echo _("Remove prefix from local numbers")?></option> 
    378             <option value="lookup7"><?php echo _("Setup dialing for local trunk (7-digit dialing)")?></option> 
    379             <option value="lookup10"><?php echo _("Setup dialing for local trunk (10-digit dialing)")?></option> 
     382            <option value="lookup7"><?php echo _("Lookup numbers for local trunk (7-digit dialing)")?></option> 
     383            <option value="lookup10"><?php echo _("Lookup numbers for local trunk (10-digit dialing)")?></option> 
    380384          </select> 
    381385        </td>