⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfgbasic.html.svn-base

📁 asterisk-gui asterisk网关接口编程 控制asterisk的接口
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<!-- * Asterisk-GUI	-	an Asterisk configuration interface * * Top level for configuration file * * Copyright (C) 2006-2007, Digium, Inc. * * Mark Spencer <markster@digium.com> * Pari Nannapaneni <pari@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. * * 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. *--><script>var browser_alert = "Your browser is not supported by this version of GUI !<BR><A href='http://www.getfirefox.com' style='font-size: 13px; font-family:arial,sans-serif,Helvetica,Trebuchet MS; color : #6C74A3;' target='_blank'>We recommend using Firefox</A>";</script><script src="scripts/prototype.js"></script><script src="scripts/astman.js"></script><link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" /><script>var FXO_PORTS_DETECTED = []; // so that we donot have to parse ztscan output each time where we want this listvar FXS_PORTS_DETECTED = []; // so that we donot have to parse ztscan output each time where we want this list// note that the above FXO_PORTS_DETECTED, FXS_PORTS_DETECTED are the actual 'analog FXS, FXO' ports // and NOT the channels on a digital span with FXS or FXO signallingvar hwcfgfile = 'gui_confighw.conf'; // file to store configured hardware informationvar CONFIGURED_FXOPORTS = '';var CONFIGURED_FXSPORTS = '';var REQUIRE_RESTART = false; // this flag is used to know if there are any updates in zapchan settings// like if a FXS is assigned to a user or an analog trunk is created or something // if this flag is true - we want to throw alert 'on ApplySettings' saying that a restart is requiredvar eventeater = new Object;var loggedon = -1;var accordion;var tooltip_default = "Move the mouse over to a field to see tooltips";var asterisk_guitools_inextconf = 0;eventeater.pingstatus = false;var keepPinging;var has_digital = 0;var needs_reloadzap = 0;var int_handle;var MainScreenPanels = [];var newMSpanel = function(s){	var r = {};	r.PanelName = s[0];	r.FileName = s[1];	r.PanelDesc = s[2];	MainScreenPanels.push(r);};var ABOUT_TORELOAD_GUI = false ; // If the gui is being reloaded from some where else, this flag is used in some setTimeout functions to know whether to proceed or abort actions.function get_FXOFXSPORTS(c){	var y;	FXO_PORTS_DETECTED = [];	FXS_PORTS_DETECTED = [];	for( var d in c ){ if (c.hasOwnProperty(d) ) {		c[d].each( 			function( item ) {				if( item.beginsWith('port') && item.contains('FXO') && !item.contains('FAILED') ){ // we are looking for item if it is in the format 'port=4,FXO'					y = item.split('=')[1].split(',')[0];					FXO_PORTS_DETECTED.push(y);				}				if( item.beginsWith('port') && item.contains('FXS') && !item.contains('FAILED') ){ // we are looking for item if it is in the format 'port=4,FXO'					y = item.split('=')[1].split(',')[0];					FXS_PORTS_DETECTED.push(y);				}			}		);	}}	var hwcfgfile_parse = function(n){		if( n == "ERROR: CONFIG FILE NOT FOUND"){			// hwcfgfile does not exist, proceed to Ztscan			CONFIGURED_FXSPORTS = '';			CONFIGURED_FXOPORTS = '';		}else{			for( var l in n ){ if(n.hasOwnProperty(l)){ // l is location				if(l=='ANALOGPORTS'){					CONFIGURED_FXSPORTS = n[l]['FXS'];					CONFIGURED_FXOPORTS = n[l]['FXO'];				}else{ }			}}		}		if( CONFIGURED_FXOPORTS != FXO_PORTS_DETECTED.join(',') || CONFIGURED_FXSPORTS != FXS_PORTS_DETECTED.join(',') ){			if( !ABOUT_TORELOAD_GUI ){			alert('Changes detected in your Analog Hardware !! \n\n' +				'You have to reconfigure any previously assigned \n'				+ ' FXS stations or Analog Service Providers. \n\n'				+ "Note: Your Analog Hardware will not work properly until\n " 				+ " you click 'Apply Changes' button in the 'Setup Hardware' panel" );			}		}	};	config2json(hwcfgfile, 1, hwcfgfile_parse);}function fit_toScreen(){	var t = ASTGUI.displayHeight();	var minimumheight = 150;	var c =_$('configpanel'); 	c.WIH = t;	_$('TOP_MAINTABLE').rows[1].cells[0].height = (t - 70) ;	var pnameheight = 22;	c.pnameheight = pnameheight;	var panels = returnpanels();	var pheight = (( t - 70)  - (pnameheight*panels.length) ) ;	if(pheight > minimumheight){		c.pheight = pheight;	}else{		pheight = minimumheight;		c.pheight = minimumheight ;	}	if( c.childNodes.length ){		var s;		for( var r=0; r < panels.length; r++ ){			s = panels[r].page.split(".html")[0];			if( _$(s+"_U").style.visibility == "visible" ){				_$(s+"_U").style.height = pheight;			}		}	}	setTimeout( function(){_$('mainscreen').style.height = (panels.length * 22) + pheight ;}, 1500 );}function createpanels(){	var t,u,v;	var a = _$('configpanel');//	ASTGUI.events.add(a, 'mouseover', my_tooltip);//	ASTGUI.events.add(a, 'mouseout', default_tooltip);	ASTGUI.events.add(a, 'click', fghjhhs);	var panels = returnpanels();	var this_id ;	for( var r=0; r < panels.length; r++ ){		this_id = panels[r].page.split(".html")[0];		t = document.createElement("div");		t.className = "accordionTabTitleBar";		t.style.visibility = "hidden";		t.setAttribute('id', this_id );		t.height = a.pnameheight;		t.innerHTML = "<nobr><img style='vertical-align: middle;' src='images/accordion-icon.gif'><span style='margin-left: 0px; font-weight: bold;'>&nbsp;" + panels[r].caption + "</span></nobr>";		u = document.createElement("div");		u.className = "accordionTabContentBox";		u.style.borderStyle = "solid";		u.style.borderColor = "#1F669B";		u.style.borderWidth = "0px 1px";		u.style.margin = "0px";		u.style.overflow = "hidden";		u.style.backgroundImage = "url(images/panel.png)";		u.style.height = "1px";		u.style.visibility = "hidden";		u.setAttribute('id', this_id+"_U" );		u.innerHTML =panels[r].desc; 		a.appendChild(t);		a.appendChild(u);	}	_$( "home" ).style.visibility = "visible";	_$( "home_U" ).style.visibility = "visible";	_$( "home_U" ).style.height = a.pheight;}function my_tooltip(event){	var s = (event.srcElement)?event.srcElement:this;	show_Acctooltip(_$(s.id+"_U").innerHTML );}function default_tooltip(event){	var s = (event.srcElement)?event.srcElement:this;	_$(s.id).style.backgroundColor="#6B79A5";	_$(s.id).style.color="#CED7EF";	_$(s.id).style.fontWeight="normal";	show_Acctooltip("Move the mouse over to a field to see tooltips");}function fghjhhs(event){	var f = ASTGUI.events.getTarget(event);	var s = f;	if (f.nodeName.toLowerCase() == 'img' || f.nodeName.toLowerCase() == 'span' ){		s = f.parentNode.parentNode;	}	if ( s.className != 'accordionTabTitleBar' )return;	if( $('mainscreen').currentpage == s.id + ".html")return;	var t;	var panels = returnpanels();	for( var r=0; r < panels.length; r++ ){		t = panels[r].page.split(".html")[0];		_$( t + "_U" ).style.height = "1px";		_$( t + "_U" ).style.visibility = "hidden";	}	_$( s.id + "_U" ).style.height = _$('configpanel').pheight;	_$( s.id + "_U" ).style.visibility = "visible";	_$('AdvancedOptionsSelect').selectedIndex=-1;	_$('mainscreen').style.visibility = "hidden";	_$('mainscreen').src = s.id + ".html";	_$('mainscreen').currentpage = s.id + ".html";}function returnpanels(){	var panels = [];	var newpanel = function(s){		var r = {};		r.caption = s[0];		r.page = s[1];		r.desc = s[2];		panels.push(r);	}	newpanel( ["Home", "home.html", "Asterisk Configuration Panel - Please click on a panel to manage related features"]);	newpanel( ["Users", "users.html", "Users is a shortcut for quickly adding and removing all the necessary configuration components for any new phone."]);	newpanel( ["Conferencing", "meetme.html", "MeetMe conference bridging allows quick, ad-hoc conferences with or without security."]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -