Changeset 5452

Show
Ignore:
Timestamp:
12/11/07 12:02:52 (4 years ago)
Author:
p_lindheimer
Message:

fixes to Zap Channel DIDs validation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.4/core/module.xml

    r5451 r5452  
    88  <canuninstall>no</canuninstall> 
    99  <changelog> 
    10     *2.4.0beta1.1* moved all sip.conf and iax.conf settings into _general_additional.conf files for auto-generation 
     10    *2.4.0beta1.1* moved all sip.conf and iax.conf settings into _general_additional.conf files for auto-generation, fixes to Zap Channel DIDs validation 
    1111    *2.4.0beta1.0* addition of zapchandids page and removal of Channel in inbound routes, Extension/Destination Registry support, Adhoc Device 
    1212                   and login/out improvments. Added ringing to Terminate Call Destinations,  #2493, #1974, #2470, #1697, #2357, #2393 pinless dialing 
  • modules/branches/2.4/core/page.zapchandids.php

    r5304 r5452  
    123123  var msgInvalidChannel = "<?php echo _('Invalid Channel Number, must be numeric and not blank'); ?>"; 
    124124  var msgInvalidDID = "<?php echo _('Invalid DID, must be a non-blank DID'); ?>"; 
     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  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?'); ?>"; 
     127 
    125128 
    126129  // If deleting we don't care what is in the elements 
     
    135138    return warnInvalid(theForm.channel, msgInvalidChannel); 
    136139  } 
    137   if (isEmpty(theForm.did.value) || !isDialpattern(theForm.did.value)) { 
     140  if (isEmpty(theForm.did.value)) { 
    138141    return warnInvalid(theForm.did, msgInvalidDID); 
     142  } 
     143  if (theForm.did.value.substring(0,7) == "zapchan") { 
     144    if (!confirm(msgConfirmConvertDID)) { 
     145      return false; 
     146    } 
     147 
     148  } else if (!isDialpattern(theForm.did.value)) { 
     149    if (!confirm(msgConfirmDIDNonStd)) { 
     150      return false; 
     151    } 
    139152  } 
    140153