bkruse: branch bkruse/providers r1419 - /team/bkruse/providers/config/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Aug 21 15:35:22 CDT 2007


Author: bkruse
Date: Tue Aug 21 15:35:21 2007
New Revision: 1419

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1419
Log:
Another update, big update, for trunks.html to be ready for providers.

Modified:
    team/bkruse/providers/config/trunks.html

Modified: team/bkruse/providers/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/providers/config/trunks.html?view=diff&rev=1419&r1=1418&r2=1419
==============================================================================
--- team/bkruse/providers/config/trunks.html (original)
+++ team/bkruse/providers/config/trunks.html Tue Aug 21 15:35:21 2007
@@ -1,23 +1,17 @@
 <!--
- * Asterisk-GUI	-	an Asterisk configuration interface
+ * Configuration for "Service Providers (trunks)"
  *
- * Create/Manage Service Providers (trunks)
- *
- * Copyright (C) 2006-2007, Digium, Inc.
+ * Copyright (C) 2006 - 2007, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  * Pari Nannapaneni <pari at digium.com>
  * Brandon Kruse <bkruse at digium.com>
  *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
+ * All Rights Reserved.
  *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
+ * Distribution of this file is subject to the license
+ * agreement you accepted when obtained and/or activated
+ * the Digium product containing this file.
  *
 -->
 <script src="scripts/prototype.js"></script>
@@ -28,20 +22,19 @@
 var origwidth;
 var widgets = {};
 var provwidgets = {};
-var spanwidgets = {};
 var callbacks = new Object;
 var phonecallbacks = new Object;
 var providercallbacks = new Object;
-var digitalcallbacks = new Object;
 var globalvars = new Object;
-var fieldnames =[ 'disallow','allow','callerid','cancel','contact','context','delete','dialformat','fromdomain','fromuser','group','hasexten','hasiax','hassip','host','insecure',
-		'name','new','port','provider','registeriax','registersip','save','secret','trunkname','trunkstyleanalog','trunkstylecustomvoip', 'trunkstyledigital',
+var fieldnames =[ 'disallow','allow','signalling','callerid','cancel','contact','context','delete','dialformat','fromdomain','fromuser','group','hasexten','hasiax','hassip','host','insecure',
+		'name','new','port','provider','registeriax','registersip','save','secret','trunkname','trunkstyleanalog','trunkstylecustomvoip',
 		'trunkstylevoip','username','zapchan'];
 var provfieldnames = ['providerdesc', 'providerlogo'];
+var opt_userandpass = ['voip_user', 'voip_pass', 'username', 'secret'];
+var opt_userandip = ['voip_user', 'voip_ip', 'username', 'ip'];
 var isnewtrunk;
 var dids_array = [];
 var old_trunkname;
-var has_spans;
 var used_fxos = {};
 used_fxos.oldvalue = "";
 used_fxos.newvalue = "";
@@ -94,6 +87,7 @@
 globalvars.loaded = function() {
 	parent.astmanEngine.config2list("users.conf", _$('devices'), widgets, callbacks);
 }
+			
 
 providercallbacks.loaded = function() {
 	var p = _$('provider');
@@ -116,7 +110,6 @@
 	ASTGUI.events.remove( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
 	ASTGUI.events.remove( _$('trunkstylevoip') , 'click' , activateanalogvoip );
 	ASTGUI.events.remove( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
-	ASTGUI.events.remove( _$('trunkstyledigital') , 'click' , activateanalogvoip );
 	hideSPdetails();
 }
 
@@ -131,7 +124,7 @@
 	ASTGUI.events.add( _$('new') , "click", showSPdetails ) ;
 	loadServiceProvidersintotable();
 	preparemenus();
-	parent.astmanEngine.config2list("ztscan.conf", _$('spans'), new Array(), digitalcallbacks);
+	parent.loadscreen(this);
 }
 
 callbacks.postselect = function(){
@@ -174,7 +167,6 @@
 	var _tsv = _$('trunkstylevoip');
 	var _tsa = _$('trunkstyleanalog');
 	var _tscv = _$('trunkstylecustomvoip');
-	var _dig = _$('trunkstyledigital');
 	var _cv_un = _$('customvoip_username');
 	var _name = _$('name')  ;
 	var _dvcs_v = _$('devices').value ;
@@ -183,8 +175,39 @@
 	var _msg2 = "No analog line hardware installed on the system";
 	var _msg3 = "When using Analog, at least one port must be selected.";
 	var _msg4 = "Please enter a Comment for this Service Provider";
-
-	if ( _tsv.checked && !_$('username').value.length ) { gui_alert(_msg1); return false; }
+	var _msg5 = "Please enter an IP for your NGT Sip Server!";
+
+	var provider_rl;
+	var _provider_rl = _$('provider');
+	provider_rl = _provider_rl.stored_config.catbyname[_provider_rl.value];
+
+	/* ngt and bandwidth do not require passwords, its ip based. */
+	if ( _tsv.checked && !_$('username').value.length && _$('provider').value != "bandwidth" && _$('provider').value != "ngt") { gui_alert(_msg1); return false; }
+
+	if ( _tsv.checked && !_$('ip').value.length && _$('provider').value == "ngt") { gui_alert(_msg5); return false; }
+	 /* If they chose ngt, and did not provide an IP address, error out. */
+	
+	 if(_tsv.checked && _$('provider').value == "ngt") {
+		 _$('fromuser').value = (_$('username').value) ? _$('username').value : 'NO USERNAME SPECIFIED!';
+		widgets['fromuser'] = _$('username');
+		/* Our makerequest uses this widget as its call for fromuser */
+		/* If provider is NGT, we need to change the host and IP right before we save, to our two input boxes, username and IP. */
+		 _$('host').value = (_$('ip').value.length) ? _$('ip').value : 'NO IP SPECIFIED!' ;
+	 } 
+
+	if(_$('provider').value == "simplesignal" && _tsv.checked) {	
+		if(_tsv.checked) {
+			_$('fromuser').value = _$('username').value;
+			widgets['fromuser'] = _$('username');
+			/* Our makerequest uses this widget as its call for fromuser */
+			_$('fromdomain').value = (provider_rl.fieldbyname['host']) ? provider_rl.fieldbyname['host'] : 'type make samples in the gui source directory' ;
+		}
+	} else {
+		if(_tsv.checked) {
+			_$('fromuser').value = (provider_rl.fieldbyname['fromuser']) ? provider_rl.fieldbyname['fromuser'] : '' ;
+			_$('fromdomain').value = (provider_rl.fieldbyname['fromdomain']) ? provider_rl.fieldbyname['fromdomain'] : '' ;
+		}
+	}
 
 	if ( _tsa.checked ) {
 		var _zapchan = _$('zapchan');
@@ -258,11 +281,15 @@
 			_$('callerid').value = '';
 			_$('insecure').value = (provider.fieldbyname['insecure']) ? provider.fieldbyname['insecure'] : '' ;
 			_$('port').value = (provider.fieldbyname['port']) ? provider.fieldbyname['port'] : '' ;
-			_$('fromuser').value = (provider.fieldbyname['fromuser']) ? provider.fieldbyname['fromuser'] : '' ;
-			if (_$('fromuser').value == '<DID>') { _$('fromuser').value = _$('username').value; }
+			if(_$('provider').value == "ngt" ) {
+				_$('fromuser').value = _$('username').value;
+			} else { 
+				_$('fromuser').value = (provider.fieldbyname['fromuser']) ? provider.fieldbyname['fromuser'] : '' ;
+			}
 			_$('fromdomain').value = (provider.fieldbyname['fromdomain']) ? provider.fieldbyname['fromdomain'] : '' ;
 		}
 		callbacks_savechanges_step2();
+		
 	}else{
 		if(old_trunkname != _$('name').value ){ update_didcontext(old_trunkname, _$('name').value); } // rename DID if needed
 		hideSPdetails();
@@ -320,8 +347,6 @@
 	}
 }
 
-
-
 function ifnewtrunk(){
 	var needcomma = 0;
 	var provider;
@@ -329,17 +354,22 @@
 	var _provider = _$('provider');
 	var _zapchan = _$('zapchan');
 	var _trunkname = _$('trunkname');
+	var _username2 = (_$('username').value) ? ' - ' + _$('username').value : ' - (No Username Needed)'; 
 	_$('hasexten').value = 'no';
 	_$('context').value =  asterisk_guiTDPrefix + _$('name').value  ;
 
 	if (_$('trunkstylevoip').checked) {
 		provider = _provider.stored_config.catbyname[_provider.value];
-		_trunkname.value = _provider.options[_provider.selectedIndex].innerHTML + " - " + _$('username').value;
+		_trunkname.value = _provider.options[_provider.selectedIndex].innerHTML + _username2;
+		_$('signalling').value = '';
 		_$('hassip').value = provider.fieldbyname['hassip'];
 		_$('hasiax').value = provider.fieldbyname['hasiax'];
 		_$('registeriax').value = provider.fieldbyname['registeriax'];
 		_$('registersip').value = provider.fieldbyname['registersip'];
-		_$('host').value = provider.fieldbyname['host'];
+		if(_provider.value != "ngt") {
+			_$('host').value = provider.fieldbyname['host'];
+			_$('fromuser').value = _$('username').value;
+		}
 		for (var x=0;x<_zapchan.options.length;x++){  _zapchan.options[x].selected = false; }
 		_zapchan.value = '';
 		_$('group').value = '';
@@ -361,6 +391,7 @@
 		}
 		used_fxos.newvalue = _trunkname.value; 
 		_trunkname.value = ((count > 1) ? "Ports ":"Port ") + _trunkname.value;
+		_$('signalling').value = 'fxs_ks';
 		_$('callerid').value = 'asreceived';
 		_$('hassip').value = 'no';
 		_$('hasiax').value = 'no';
@@ -371,6 +402,7 @@
 		_trunkname.value = "Custom - " + _$('customvoip_name').value;
 		provider = _$('customvoip_name').value;
 		_provider.selectedIndex  = -1;
+		_$('signalling').value = '';
 		_$('username').value = _$('customvoip_username').value;
 		_$('secret').value = _$('customvoip_secret').value;
 		var _cv_p = $('customvoip_protocol').value ;
@@ -432,51 +464,11 @@
 	ASTGUI.events.add( _$('trunkstyleanalog') , 'click' , activateanalogvoip );
 	ASTGUI.events.add( _$('trunkstylevoip') , 'click' , activateanalogvoip );
 	ASTGUI.events.add( _$('trunkstylecustomvoip') , 'click' , activateanalogvoip );
-	ASTGUI.events.add( _$('trunkstyledigital'), 'click', activateanalogvoip );
 
 	return tmp;
 }
 
 callbacks.identifier = "extension";
-
-function isInt(x) {
-	var y=parseInt(x);
-	if (isNaN(y)) return false;
-		return x==y && x.toString()==y.toString();
-} 
-
-digitalcallbacks.format = function(t) { 
-
-	if(t.name == "general") {
-		if(t.fieldbyname['continue'] == "no") {
-			has_spans = 0;
-			if(t.fieldbyname['error'].match('No Spans Found')) {
-				_$('digital_click_txt').innerHTML = "Click Here to go to the Digital Card setup Wizard";
-				_$('digital_click_txt').style.display = "";
-				ASTGUI.events.add(_$('digital_click_txt'), 'click', function() { window.location.href = "digital.html" } );
-					
-				return "No Spans/Cards Found";
-			}
-		} else {
-			if(t.fieldbyname['continue'] == "yes")
-				return null;
-		}
-	}
-	
-	var mode = (t.fieldbyname['totchans'] > 25) ? "E1" : "T1";
-	return "span: " + t.name + " Mode: " + mode;
-}
-
-digitalcallbacks.loaded = function() {
-	
-	var spans = _$('spans').stored_config.catbyname['general'].fieldbyname['totalspans'];
-	if(spans > 0)
-		has_spans = 1;
-
-	parent.loadscreen(this);
-	return true;
-
-}
 
 phonecallbacks.format = function(t) {
 	if (t.fieldbyname['port'] == 'fxs')
@@ -485,7 +477,6 @@
 }
 
 phonecallbacks.loaded = function() {
-	parent.astmanEngine.config2list("zapata.conf", _$('spans'), spanwidgets, digitalcallbacks);
 	parent.astmanEngine.config2list("providers.conf", _$('provider'), provwidgets, providercallbacks);
 }
 
@@ -510,7 +501,7 @@
 	var disablestring;
 
 	if (_$('trunkstyleanalog').checked) {
-		_$('analog').style.display = "block";
+		_$('analog').style.display = "";
 		_zcal.style.display = "";
 		if(_zapchan.options.length ==0){
 			_zcal.innerHTML = "No analog line hardware installed on the system";
@@ -533,40 +524,36 @@
 		}
 	}else if (_$('trunkstylevoip').checked) {
 		_$('voip').style.display = "";
-		_$('voip').style.height =350;
+		//_$('voip').style.height =350;
+		for(var x=0; x < opt_userandpass.length; x++) { /* 2 */
+		_$(opt_userandpass[x]).style.display = "none";
+		}
 	}else if (_$('trunkstylecustomvoip').checked) {
 		_$('customvoip').style.display = "" ;
-	}else if (_$('trunkstyledigital').checked) {
-		_$('digital').style.display = "" ;
-		_$('digital').style.height = 350;
-		_$('spans').style.display  = "";
-		//	_$('digital').innerHTML = "";
-		//	_$('digital_click').innerHTML = "No Spans Found. Click Here to go to the Digital Card setup Wizard";
-		//	_$('digital_click').style.display = "";
-		//	ASTGUI.events.add(_$('digital_click'), 'click', function() { window.location.href = "digital.html" } );
-		//check_digital();
-	}
-
+	}
 }
 
 function localajaxinit() {
-	parent.astmanEngine.run_tool(asterisk_guiZtscan, onSuccess = function() { return true; }); 
 	ASTGUI.events.add(document, 'mouseover', show_tooltip);
 
 	ASTGUI.events.add( _$('customvoip_name') , 'change' , function(){ _$('trunkname').value = _$('customvoip_name').value; } );
 	ASTGUI.events.add( _$('customvoip_protocol') , 'change' , function(){ 
-		if(_$('customvoip_protocol').value == "sip"){ _$('hassip').value = 'yes'; _$('hasiax').value = 'no'; }
+		if(_$('customvoip_protocol').value == "sip"){ _$('hassip').value = 'yes'; _$('hasiax').value = 'no';  }
 		if(_$('customvoip_protocol').value == "iax"){ _$('hassip').value = 'no' ; _$('hasiax').value = 'yes'; }
 	});
 	ASTGUI.events.add( _$('customvoip_register') , 'change' , function(){ 
 		if(_$('customvoip_register').checked){ 
 			if(_$('customvoip_protocol').value == "sip"){ _$('registersip').value = 'yes'; _$('registeriax').value = 'no';  }
 			if(_$('customvoip_protocol').value == "iax"){ _$('registersip').value = 'no' ; _$('registeriax').value = 'yes'; }
-		}else{ _$('registersip').value = 'no'; _$('registeriax').value = 'no'; }
+		}else{
+			_$('registersip').value = 'no'; _$('registeriax').value = 'no';
+		}
 	});
 	ASTGUI.events.add( _$('customvoip_host') , 'change' , function(){ _$('host').value = _$('customvoip_host').value; } );
 	ASTGUI.events.add( _$('customvoip_username') , 'change' , function(){ _$('username').value = _$('customvoip_username').value; } );
 	ASTGUI.events.add( _$('customvoip_secret') , 'change' , function(){ _$('secret').value = _$('customvoip_secret').value; } );
+
+	ASTGUI.events.add(_$('provider'), 'click', showhidefields);
 	setWindowTitle("Service Providers");
 	_$('devices').contentEditable = 'false';
 	_$('zapchan').splitchar=',';
@@ -586,17 +573,47 @@
 	) ;
 
 	for (var x =0; x< fieldnames.length; x++) {
+		if(!_$(fieldnames[x])) {
+			alert(fieldnames[x] + " does not exists.");
+		}
 		widgets[fieldnames[x]] = _$(fieldnames[x]);
 		widgets[fieldnames[x]].disabled = true;
 	}
-	for (var x =0; x < provfieldnames.length ; x++) {
+	for (var x =0; x < provfieldnames.length ; x++) { 
 		provwidgets[provfieldnames[x]] = _$(provfieldnames[x]);
 		provwidgets[provfieldnames[x]].disabled = true;
 	}
-
+	
+	
 	parent.astmanEngine.config2list("zapscan.conf", _$('zapchan'), new Array(), phonecallbacks);
 }
 
+function showhidefields() {
+	var provname = _$('provider').value;
+	if(provname == "bandwidth") {
+		for(var x=0; x < opt_userandpass.length; x++) { /* 3 */
+			_$(opt_userandpass[x]).style.display="none";	
+		}
+	return true;
+	/* we dont want to go to the next statement, if we know its bandwidth */
+	} 
+	if(provname == "ngt") {
+		for(var x=0; x < opt_userandpass.length; x++) {
+			_$(opt_userandpass[x]).style.display="none";
+		}
+
+		for(var x=0; x < opt_userandip.length; x++) {
+			_$(opt_userandip[x]).style.display="";
+		}
+	} else {
+		for(var x=0; x < opt_userandpass.length; x++) {
+			_$(opt_userandpass[x]).style.display="";
+			_$('ip').style.display="none";
+			_$('voip_ip').style.display="none";
+		}
+	}
+	
+}
 
 function loadServiceProvidersintotable(){
 	var _spt = _$('serviceproviderstable');
@@ -647,9 +664,6 @@
 		break;
 	case "voip":
 		newCell2.innerHTML =  "Voip";
-		break;
-	case "digital":
-		newCell2.innerHTML = "Digital";
 		break;
 	default : 
 		newCell2.innerHTML =  "?";
@@ -830,12 +844,13 @@
 		case 'ulaw': addtosel("u-law","ulaw",selectbox_id) ; break;
 		case 'alaw': addtosel("a-law","alaw",selectbox_id) ; break;
 		case 'gsm': addtosel("GSM","gsm",selectbox_id) ; break ;
-		case 'ilbc': addtosel("ILBC","ilbc",selectbox_id) ; break ;
-		case 'speex': addtosel("SPEEX","speex",selectbox_id) ; break ;
 		case 'g726':  addtosel("G.726","g726",selectbox_id) ; break ;
-		case 'adpcm': addtosel("ADPCM","adpcm",selectbox_id) ; break ;
-		case 'lpc10': addtosel("LPC10","lpc10",selectbox_id) ; break ;
-		case 'g729': addtosel("G.729","g729",selectbox_id) ; break ;
+
+//		case 'ilbc': addtosel("ILBC","ilbc",selectbox_id) ; break ;
+//		case 'speex': addtosel("SPEEX","speex",selectbox_id) ; break ;
+//		case 'adpcm': addtosel("ADPCM","adpcm",selectbox_id) ; break ;
+//		case 'lpc10': addtosel("LPC10","lpc10",selectbox_id) ; break ;
+//		case 'g729': addtosel("G.729","g729",selectbox_id) ; break ;
 		default: break
 	}
 
@@ -895,12 +910,13 @@
 		selectbox_add("disallowed", "ulaw");
 		selectbox_add("disallowed", "alaw");
 		selectbox_add("disallowed", "gsm");
-		selectbox_add("disallowed", "ilbc");
-		selectbox_add("disallowed", "speex");
 		selectbox_add("disallowed", "g726");
-		selectbox_add("disallowed", "adpcm");
-		selectbox_add("disallowed", "lpc10");
-		selectbox_add("disallowed", "g729");
+
+//		selectbox_add("disallowed", "ilbc");
+//		selectbox_add("disallowed", "speex");
+//		selectbox_add("disallowed", "adpcm");
+//		selectbox_add("disallowed", "lpc10");
+//		selectbox_add("disallowed", "g729");
 	}else{
 		var tmp = _$('disallow').value.split(",");
 		for(var x=0; x < tmp.length; x++){
@@ -911,12 +927,13 @@
 		selectbox_add("allowed", "ulaw");
 		selectbox_add("allowed", "alaw");
 		selectbox_add("allowed", "gsm");
-		selectbox_add("allowed", "ilbc");
-		selectbox_add("allowed", "speex");
 		selectbox_add("allowed", "g726");
-		selectbox_add("allowed", "adpcm");
-		selectbox_add("allowed", "lpc10");
-		selectbox_add("allowed", "g729");
+
+//		selectbox_add("allowed", "ilbc");
+//		selectbox_add("allowed", "speex");
+//		selectbox_add("allowed", "adpcm");
+//		selectbox_add("allowed", "lpc10");
+//		selectbox_add("allowed", "g729");
 	}else{
 		var tmp = _$('allow').value.split(",");
 		for(var x=0; x < tmp.length; x++){
@@ -950,13 +967,19 @@
 
 function showSPdetails(){
 	_$('cancel').disabled = false;
-	_$('userscontent').style.display = "block";
+	_$('userscontent').style.display = "";
 	_$('bg_transparent').style.display ='';
 	if ( isnewtrunk == 0){
 		_$('trunkstyleanalog').disabled = true;
 		_$('trunkstylevoip').disabled = true;
 		_$('trunkstylecustomvoip').disabled = true;
 		_$('provider').disabled = true;
+	} else {
+		_$('voip').style.display = "";
+		//_$('voip').style.height =350;
+		for(var x=0; x < opt_userandpass.length; x++) { /* 1 */
+			_$(opt_userandpass[x]).style.display = "none";
+		}
 	}
 }
 
@@ -1057,104 +1080,123 @@
 		<TD Height="20" width=15 align="center"  style="color:#FFFFFF; font-size: 12px; font-weight:bold;" onclick="$('cancel').click();">X</TD>
 		</TR>
 	</table>
-<table align="center" width=450>
-<tr>
-<td class="field_text" width=130 valign="top" align="left" tip="en,trunks,0">
-<!-- Provider type -->
-	<div id='cabinet' style='width:0;overflow:hidden'><select id='hiddenglobals'></select></div>
-	<fieldset  tip="en,trunks,0">
+<table align="center" width=470>
+<tr>	<td class="field_text">
+	<!-- Provider type -->
+	<fieldset  tip="en,trunks,0" style="width:460px">
+		<select id='hiddenglobals' style="display:none"></select>
+		<input id="name" size=10  style="display:none">
+
 		<legend><B>&nbsp;Provider Type:&nbsp;</B></legend>
-		<LABEL FOR="trunkstyleanalog"><input name='trunkstyle' type='radio' id='trunkstyleanalog' value='analog'>Analog</LABEL><BR>
-		<LABEL FOR="trunkstylevoip"><input name='trunkstyle' type='radio' id='trunkstylevoip' value='voip'>VoIP</LABEL><BR>
+		<LABEL FOR="trunkstyleanalog"><input name='trunkstyle' type='radio' id='trunkstyleanalog' value='analog'>Analog</LABEL>
+		<LABEL FOR="trunkstylevoip"><input name='trunkstyle' type='radio' id='trunkstylevoip' value='voip'>VoIP</LABEL>
 		<LABEL FOR="trunkstylecustomvoip"><input name='trunkstyle' type='radio' id='trunkstylecustomvoip' value='customvoip'>Custom VoIP</LABEL>
-		<LABEL FOR="trunkstyledigital"><input name='trunkstyle' type='radio' id='trunkstyledigital' tip="en,trunks,5" value='digital'>(BETA!) Digital Cards(T1/E1/J1)</LABEL>
 	</fieldset>
-	<div id="div_providername" style="display:none">
-		<BR><BR><B>Provider Name:</B><BR><input id="name" size=10 class='input8'>
-	</div>
-<!-- Provider type -->
-</td>
-<td>
-<!-- Provider options -->
-<div id='analogvoipcontainer' style='height:350;overflow:hidden' align="center">
-<div id='analog' style='overflow:hidden' align="center">
-	<table align="center">
-	<tr><td style='width:80px' valign='top' class="field_text"  tip="en,trunks,2">Lines:</td>
-		<td>	<select size="12" multiple='true' id='zapchan' style='width:200px' class="input8"></select>
-			<div id="zapchan_analoglines" style='height:110px; width: 200px; overflow :auto; display:none'></div>
-		</td>
-	</tr>
-	<tr><td colspan='2' style='width:80px' valign='top' align='center'></td></tr>
-	</table>
-</div>
-<div id='digital' style='height:0;overflow:hidden' align="center">
-	<table align="center">
-		<td style='width:120px' valign='top' class='field_text' tip="en,trunks,5">Spans:</td>
-		<td><select size='12' style="display:none" id='spans' style='width:240px' class='input8'><option name="blah" value="blah"></option></select></td>
-		<td style='display:none;color:#0000FF' valign='bottom' id='digital_click_txt' class='field_text' tip="en,trunks,5"></td>
-	</tr>
-	</table>
-</div>
-<div id='voip' style='height:0;overflow:hidden' align="center">
-	<table align="center">
-	<tr>	<td style='width:80px' valign='top' class="field_text" tip="en,trunks,1">Provider:</td>
-		<td><select size='6' id='provider' style='width:200px' class="input8"></select></td>
-	</tr>
-	<tr><td colspan='2' align='center'><A href="#" id="providerlink"><img id='providerlogo' style='visibility:hidden;' border=0></A></td></tr>
-	<tr><td colspan='2' align='center'><div id='providerdesc' align='left' style='width:230px;height:100px; font-size:10px'></div></td></tr>
-	<tr>	<td class="field_text" tip="en,trunks,3">Username:</td>
-		<td><input size='20' id='username' class="input8"></td>
-	</tr>
-	<tr>	<td class="field_text" tip="en,trunks,4">Password:</td>
-		<td><input type="password" size='20' id='secret' class="input8"></td>
-	</tr>
-	</table>
-</div>
-<div id='customvoip' align="center" style='display:none' align="center">
-	<table align="center" cellpadding=2 cellspacing=1>
-		<input id="trunkname" type="hidden">
-		<input id="hasiax" type="hidden">
-		<input id="hassip" type="hidden">
-		<input id="hasexten" type="hidden">
-		<input id="registeriax" type="hidden">
-		<input id="registersip" type="hidden">
-		<input id="host" type="hidden">
-		<input id="dialformat" type="hidden">
-		<input id="context" type="hidden">
-		<input id="group" type="hidden">
-		<tr>	<td height=10></td>
-			<td></td>
-		</tr>
-		<tr>	<td class="field_text">Comment:</td>
-			<td><input type="text" id="customvoip_name" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
-		</tr>
-		<tr>	<td class="field_text">Protocol:</td>
-			<td><select id="customvoip_protocol" onchange=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8">
-				<option value="iax">IAX</option>
-				<option value="sip">SIP</option>
-				</select>
+	<!-- Provider type -->
+	</td>
+</tr>
+<tr id='analog' style='display:none; height:280px'>
+	<td align="center">
+		<table align="center">
+		<tr>	<td style='width:80px' valign='top' class="field_text"  tip="en,trunks,2">
+				Lines:
 			</td>
-		</tr>
-		<tr>	<td class="field_text">Register:</td>
-			<td><input type="checkbox" id="customvoip_register" onchange="flip_register();"  class="input8"></td>
-		</tr>
-		<tr>	<td class="field_text">Host:</td>
-			<td><input type="text" id="customvoip_host" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
-		</tr>
-		<tr>	<td class="field_text">Username:</td>
-			<td><input type="text" id="customvoip_username" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
-		</tr>
-		<tr>	<td class="field_text">Password:</td>
-			<td><input type="password" id="customvoip_secret" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
-		</tr>
-	</table>
-</div>
-</div>
-<!-- Provider options -->
-</td>
+			<td>	<select multiple='true' id='zapchan' style='display:none'></select>
+				<div id="zapchan_analoglines" style='height:110px; width: 200px; overflow :auto; display:none'></div>
+			</td>
+		</tr>
+		</table>
+	</td>
 </tr>
-<tr><td></td><td align="center"><input type='button' id='save' value='Save' class="buttonbold">&nbsp;<input type='button' id='cancel' value='Cancel' class="buttonbold"></td></tr>
+
+<tr id='voip' style='display:none; height:280px'>
+	<td align="center" valign="top">
+		<table align="center" width="96%">
+		<tr>	<td valign='top' class="field_text" tip="en,trunks,1">
+				Provider:<BR>
+				<select size='6' id='provider' style='width:200px' class="input8"></select>
+			</td>
+			<td>
+				<A href="#" id="providerlink"><img id='providerlogo' style='visibility:hidden;' border=0></A>
+			</td>
+		</tr>
+		<tr>
+			<td colspan=2 align="center">
+				<div id='providerdesc' style='margin-left: 5px; margin-bottom: 5px; margin-top: 10px; font-size:10px'></div>
+
+				<div>
+				<table align="center">
+				<tr>	<td id='voip_user' class="field_text" tip="en,trunks,3">
+					Username:</td>
+					<td><input size='20' id='username' class="input8"></td>
+				</tr>
+				<tr>	<td id='voip_pass' class="field_text" tip="en,trunks,4">
+					Password:</td>
+					<td><input type="password" size='20' id='secret' class="input8"></td>
+				</tr>
+				<tr> <td style='display:none' id='voip_ip' class="field_text" tip="en,trunks,6">
+					 NGT Host:</td>
+				<td><input style="display:none" size='20' id='ip' class="input8"></td>
+				</tr>
+				</table>
+				</div>
+			</td>
+		</tr>
+		</table>
+	</td>
+</tr>
+
+<tr id='customvoip' style='display:none; height:280px'>
+	<td align="center">
+		<table align="center" cellpadding=2 cellspacing=1>
+			<input id="trunkname" type="hidden">
+			<input id="hasiax" type="hidden">
+			<input id="hassip" type="hidden">
+			<input id="hasexten" type="hidden">
+			<input id="registeriax" type="hidden">
+			<input id="registersip" type="hidden">
+			<input id="host" type="hidden">
+			<input id="dialformat" type="hidden">
+			<input id="context" type="hidden">
+			<input id="group" type="hidden">
+			<input id="signalling" type="hidden">
+			<tr>	<td height=10></td>
+				<td></td>
+			</tr>
+			<tr>	<td class="field_text">Comment:</td>
+				<td><input type="text" id="customvoip_name" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
+			</tr>
+			<tr>	<td class="field_text">Protocol:</td>
+				<td><select id="customvoip_protocol" onchange=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8">
+					<option value="iax">IAX</option>
+					<option value="sip">SIP</option>
+					</select>
+				</td>
+			</tr>
+			<tr>	<td class="field_text">Register:</td>
+				<td><input type="checkbox" id="customvoip_register" onchange="flip_register();"  class="input8"></td>
+			</tr>
+			<tr>	<td class="field_text">Host:</td>
+				<td><input type="text" id="customvoip_host" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
+			</tr>
+			<tr>	<td class="field_text">Username:</td>
+				<td><input type="text" id="customvoip_username" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
+			</tr>
+			<tr>	<td class="field_text">Password:</td>
+				<td><input type="password" id="customvoip_secret" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;"  class="input8"></td>
+			</tr>
+		</table>
+	</td>
+</tr>
+
+<tr>	<td align="center">
+		<input type='button' id='save' value='Save' class="buttonbold">&nbsp;
+		<input type='button' id='cancel' value='Cancel' class="buttonbold">
+	</td>
+</tr>
+
 </table>
+
 </div>
 <!-- Users content DIV -->
 <!-- Codecs content DIV -->




More information about the asterisk-gui-commits mailing list