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 54 54 <users needsenginedb="yes" sort="-3">Users</users> 55 55 <devices needsenginedb="yes" sort="-4">Devices</devices> 56 56 <did category="Inbound Call Control" sort="-5">Inbound Routes</did> 57 <zapchandids category="Inbound Call Control" sort="-5"> ZapChannel DIDs</zapchandids>57 <zapchandids category="Inbound Call Control" sort="-5">Channel DIDs</zapchandids> 58 58 <routing>Outbound Routes</routing> 59 59 <trunks>Trunks</trunks> 60 60 <general>General Settings</general> -
old/page.zapchandids.php
old new 71 71 $channel = $row['channel']; 72 72 $did = $row['did']; 73 73 74 echo "<h2>"._("Edit ZapChannel: ").$channel."</h2>";74 echo "<h2>"._("Edit Channel: ").$channel."</h2>"; 75 75 } else { 76 echo "<h2>"._("Add ZapChannel")."</h2>";76 echo "<h2>"._("Add Channel")."</h2>"; 77 77 } 78 78 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."); 80 80 echo "<p>".$helptext."</p>\n"; 81 81 ?> 82 82 <form name="editZapchandid" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkZapchandid(editZapchandid);"> … … 89 89 if ($extdisplay == '') { 90 90 ?> 91 91 <tr> 92 <td><a href="#" class="info"><?php echo _("Channel")?>:<span><?php echo _("The Zap Channel numberto 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> 94 94 </tr> 95 95 <?php 96 96 } … … 100 100 <td><input size="40" type="text" name="description" value="<?php echo $description; ?>" tabindex="<?php echo ++$tabindex;?>"></td> 101 101 </tr> 102 102 <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> 104 104 <td><input size="40" type="text" name="did" value="<?php echo $did; ?>" tabindex="<?php echo ++$tabindex;?>"/></td> 105 105 </tr> 106 106 … … 120 120 var actionDelete = false; 121 121 122 122 function checkZapchandid(theForm) { 123 var msgInvalidChannel = "<?php echo _('Invalid Channel Number, must be numeric and notblank'); ?>";123 var msgInvalidChannel = "<?php echo _('Invalid Channel Number, must not be blank'); ?>"; 124 124 var msgInvalidDID = "<?php echo _('Invalid DID, must be a non-blank DID'); ?>"; 125 125 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?'); ?>"; 126 126 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?'); ?>"; … … 134 134 // form validation 135 135 136 136 defaultEmptyOK = false; 137 if ( !isInteger(theForm.channel.value)) {137 if (isEmpty(theForm.channel.value)) { 138 138 return warnInvalid(theForm.channel, msgInvalidChannel); 139 139 } 140 140 if (isEmpty(theForm.did.value)) {
