Ticket #3549: page.zapchandids.php.patch

File page.zapchandids.php.patch, 5.2 kB (added by Nick_Lewis, 3 years ago)
  • old/module.xml

    old new  
    5454    <users needsenginedb="yes" sort="-3">Users</users> 
    5555    <devices needsenginedb="yes" sort="-4">Devices</devices> 
    5656    <did category="Inbound Call Control" sort="-5">Inbound Routes</did> 
    57     <zapchandids category="Inbound Call Control" sort="-5">Zap Channel DIDs</zapchandids> 
     57    <zapchandids category="Inbound Call Control" sort="-5">Channel DIDs</zapchandids> 
    5858    <routing>Outbound Routes</routing> 
    5959    <trunks>Trunks</trunks> 
    6060    <general>General Settings</general> 
  • old/page.zapchandids.php

    old new  
    7171  $channel     = $row['channel']; 
    7272  $did         = $row['did']; 
    7373 
    74   echo "<h2>"._("Edit Zap Channel: ").$channel."</h2>"; 
     74  echo "<h2>"._("Edit Channel: ").$channel."</h2>"; 
    7575} else { 
    76   echo "<h2>"._("Add Zap Channel")."</h2>"; 
     76  echo "<h2>"._("Add Channel")."</h2>"; 
    7777} 
    7878 
    79 $helptext = _("Zap Channel DIDs allow you to assign a DID to specific Zap Channels. You can supply the same DID to multiple channels. This would be a common scenario if you have multiple POTS lines that are on a hunt group from your provider. You MUST assign the channel's context to from-zaptel for these settings to have effect. It will be a line that looks like:<br /><br />context = from-zaptel<br /><br />in your zapata.conf configuration effecting the specified channel(s). Once you have assigned DIDs you can use standard Inbound Routes with the specified DIDs to route your calls."); 
     79$helptext = _("Channel DIDs allow you to assign a DID to specific Channels. You can supply the same DID to multiple channels. This would be a common scenario if you have multiple POTS lines that are on a hunt group from your provider. For DAHDI/ZAP channels, you MUST assign the channel's context to from-zaptel for these settings to have effect. It will be a line that looks like:<br /><br />context = from-zaptel<br /><br />in your zapata.conf configuration effecting the specified channel(s). For sip trunk channels you MUST set the channel's context to from-trunk-sip-TRUNKNAME. Once you have assigned DIDs you can use standard Inbound Routes with the specified DIDs to route your calls."); 
    8080echo "<p>".$helptext."</p>\n"; 
    8181?> 
    8282<form name="editZapchandid" action="<?php  $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkZapchandid(editZapchandid);"> 
     
    8989  if ($extdisplay == '') { 
    9090?> 
    9191  <tr> 
    92     <td><a href="#" class="info"><?php echo _("Channel")?>:<span><?php echo _("The Zap Channel number to map to a DID")?></span></a></td> 
    93     <td><input size="5" type="text" name="channel" value="<?php  echo $channel; ?>" tabindex="<?php echo ++$tabindex;?>"></td> 
     92    <td><a href="#" class="info"><?php echo _("Channel")?>:<span><?php echo _("The Channel to map to a DID")?></span></a></td> 
     93    <td><input size="40" type="text" name="channel" value="<?php  echo $channel; ?>" tabindex="<?php echo ++$tabindex;?>"></td> 
    9494  </tr> 
    9595<?php 
    9696  } 
     
    100100    <td><input size="40" type="text" name="description" value="<?php  echo $description; ?>" tabindex="<?php echo ++$tabindex;?>"></td> 
    101101  </tr> 
    102102  <tr> 
    103     <td><a href="#" class="info"><?php echo _("DID")?>:<span><?php echo _("The DID that this channel represents. The incoming call on this channel will be treated as if it came in with this DID and can be managed with Inbound Routing on DIDs")?></span></a></td> 
     103    <td><a href="#" class="info"><?php echo _("DID")?>:<span><?php echo _("The DID that this channel represents. The incoming call on this channel will be treated as if it came in with this DID and can be managed with Inbound Routing on DIDs. For SIP channels you may use the magic string 'siptoheader' if you want the DID to be retrieved dynamically from the To: header of the SIP message.")?></span></a></td> 
    104104    <td><input size="40" type="text" name="did" value="<?php echo $did; ?>"  tabindex="<?php echo ++$tabindex;?>"/></td> 
    105105  </tr> 
    106106 
     
    120120var actionDelete = false; 
    121121 
    122122function checkZapchandid(theForm) { 
    123   var msgInvalidChannel = "<?php echo _('Invalid Channel Number, must be numeric and not blank'); ?>"; 
     123  var msgInvalidChannel = "<?php echo _('Invalid Channel Number, must not be blank'); ?>"; 
    124124  var msgInvalidDID = "<?php echo _('Invalid DID, must be a non-blank DID'); ?>"; 
    125125  var msgConfirmDIDNonStd = "<?php echo _('DID information is normally just an incoming telephone number.\n\nYou have entered a non standard DID pattern.\n\nAre you sure this is correct?'); ?>"; 
    126126  var msgConfirmConvertDID = "<?php echo _('You appear to be using a converted DID in the form of zapchanNN that was automatically generated during an upgrade. You should consider assigning the DID that is normally associated with this channel to take full advantage of the inbound routing abilities. Changing the DID here will require you to make changes in the Inbound Routes tab. Do you want to continue?'); ?>"; 
     
    134134  // form validation 
    135135 
    136136  defaultEmptyOK = false; 
    137   if (!isInteger(theForm.channel.value)) { 
     137  if (isEmpty(theForm.channel.value)) { 
    138138    return warnInvalid(theForm.channel, msgInvalidChannel); 
    139139  } 
    140140  if (isEmpty(theForm.did.value)) {