pari: branch 2.0 r4073 - in /branches/2.0: ./ config/ config/js/ scripts/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 7 10:40:45 CST 2008


Author: pari
Date: Fri Nov  7 10:40:45 2008
New Revision: 4073

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4073
Log:

 Merging 'AA50-2139 - g729 registration via GUI' from a temporary private branch



Added:
    branches/2.0/config/registerg729.html
      - copied, made public unchanged from r4072, team/pari/private/tmp_g729_registration/config/registerg729.html
    branches/2.0/scripts/registerg729.sh
      - copied, made public unchanged from r4072, team/pari/private/tmp_g729_registration/scripts/registerg729.sh
Modified:
    branches/2.0/   (props changed)
    branches/2.0/config/index.html
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/index.js
    branches/2.0/config/menuprompts_record.html

Propchange: branches/2.0/
------------------------------------------------------------------------------
    svnmerge-integrated = /branches/2.0:1-4071

Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=4073&r1=4072&r2=4073
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Fri Nov  7 10:40:45 2008
@@ -27,7 +27,7 @@
 var sessionData = {
 	finishedParsing : false,
 	PLATFORM: {
-		isAA50 : false, // AA50
+		isAA50 : true, // AA50
 		isABE : false, // Asterisk Business Edition
 		isOSA : false, // plain OpenSource Asterisk 
 		// also look at the 'detectPlatform' function below
@@ -201,6 +201,10 @@
 			<div class="ui-accordion-link">Networking</div>
 			<div class="ui-accordion-desc">Configures networking parameters.</div>
 		</div>
+		<div page='registerg729.html' class='forAA50'>
+			<div class="ui-accordion-link">G.729 Codec</div>
+			<div class="ui-accordion-desc">Register & Manage your G.729 Codec License Keys</div>
+		</div>
 		<div page='backup.html'>
 			<div class="ui-accordion-link">Backup</div>
 			<div class="ui-accordion-desc">Backup Management.</div>

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4073&r1=4072&r2=4073
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Fri Nov  7 10:40:45 2008
@@ -258,6 +258,10 @@
 		return this.split(X).join(Y);
 	};
 
+	String.prototype.nl2br = function(){ // replace new lines with <BR>
+		return this.split('\n').join('<BR>');
+	};
+
 	String.prototype.strip = function(){
 		try {
 			return this.replace(/^\s+|\s+$/g, "");
@@ -310,6 +314,7 @@
 		GUI_DB : 'astgui', // name of the ASTDB database used by GUI -- ASTGUI.globals.GUI_DB
 		msg_notLoggedIn: 'Message: Authentication Required',
 		configfile : 'guipreferences.conf', // will be created if the file does not exist , ASTGUI.globals.configfile
+		g729RegInfo: 'g729reginfo.conf', // ASTGUI.globals.g729RegInfo, the ASTGUI.scripts.Registerg729 script will read this file to generate tab delimited file
 		hwcfgFile: 'gui_confighw.conf', // file to store configured hardware information
 		zaptelIncludeFile: 'zaptel_guiRead.conf', // file that will be used to read zapte.conf, ASTGUI.globals.zaptelIncludeFile
 		pingInterval : 5000,
@@ -2606,6 +2611,7 @@
 ASTGUI.scripts['generatemISDN_init'] = 'sh ' + ASTGUI.paths['scripts'] + 'editmisdn.sh';
 ASTGUI.scripts['dldsoundpack'] = 'sh ' + ASTGUI.paths['scripts'] + 'dldsoundpack';
 ASTGUI.scripts['mastercsvexists'] = 'sh ' + ASTGUI.paths['scripts'] + 'mastercsvexists';
+ASTGUI.scripts['Registerg729'] = 'sh ' + ASTGUI.paths['scripts'] + 'registerg729.sh';
 
 ASTGUI.apps = {};
 ASTGUI.apps['Ztscan'] = 'ztscan > ' + ASTGUI.paths['asteriskConfig'] +'ztscan.conf' ;

Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4073&r1=4072&r2=4073
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Fri Nov  7 10:40:45 2008
@@ -447,6 +447,11 @@
 
 
 var miscFunctions = {
+	toDigiumStore: function(a){ // parent.miscFunctions.toDigiumStore('G729CODEC')
+		if(!a) return;
+		var win=window.open('','myWin');
+		win.location.href = 'http://store.digium.com/productview.php?product_code='+ a ;
+	},
 
 	listOfChannels: function() { // miscFunctions.listOfChannels() -- returns an array of current active channels
 		var raw_chan_status = makeSyncRequest ( { action :'status' } );

Modified: branches/2.0/config/menuprompts_record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/menuprompts_record.html?view=diff&rev=4073&r1=4072&r2=4073
==============================================================================
--- branches/2.0/config/menuprompts_record.html (original)
+++ branches/2.0/config/menuprompts_record.html Fri Nov  7 10:40:45 2008
@@ -208,11 +208,6 @@
 	});
 };
 
-var buynow_action = function(){
-	win=window.open('','myWin');
-	win.location.href='http://store.digium.com/productview.php?product_code=IVRPROMPT';
-};
-
 </script>
 <body bgcolor="EFEFEF">
 
@@ -232,7 +227,7 @@
 	<div STYLE="text-align: center;" class='top_buttons'>
 		<span class='guiButton' onclick='show_record_New();'>Record a new Voice Menu prompt</span>
 		<span class='guiButton' onclick='window.location.href="menuprompts_upload.html";' id='uploadVoiceMenuPrompt_Button'>Upload a Voice Menu prompt</span>
-		<span class='guiButton' style='margin-left:100px;' onclick='buynow_action();' id='whereToBuy_button' tip="en,record,90">Where to Buy</span>
+		<span class='guiButton' style='margin-left:100px;' onclick="parent.miscFunctions.toDigiumStore('IVRPROMPT');" id='whereToBuy_button' tip="en,record,90">Where to Buy</span>
 	</div>
 	<BR>
 	<div id="recfilesTable_div" style="height:370px; width=100%; overflow :auto; padding : 0">

Copied: branches/2.0/config/registerg729.html (from r4072, team/pari/private/tmp_g729_registration/config/registerg729.html)
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/registerg729.html?view=diff&rev=4073&p1=team/pari/private/tmp_g729_registration/config/registerg729.html&r1=4072&p2=branches/2.0/config/registerg729.html&r2=4073
==============================================================================
--- team/pari/private/tmp_g729_registration/config/registerg729.html (original)
+++ branches/2.0/config/registerg729.html Fri Nov  7 10:40:45 2008
@@ -1,0 +1,487 @@
+<!--
+ * Asterisk-GUI	- an Asterisk configuration interface
+ *
+ * Codec g729 registration
+ *
+ * Copyright (C) 2008, Digium, Inc.
+ *
+ * Pari Nannapaneni <pari 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.
+ *
+ * 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 src="js/jquery.js"></script>
+<script src="js/astman.js"></script>
+<script src="js/jquery.tooltip.js"></script>
+<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<style type="text/css">
+
+span.sRequired {
+	font-size: 14px;
+	font-weight :bold;
+	color : #A4251A;
+}
+
+</style>
+<script>
+
+var REGCONTEXT = 'general' ;
+
+var list_keyFiles = function(){
+	
+	ASTGUI.listSystemFiles( '/var/lib/asterisk/licenses/' , function(listOfFiles) {
+		if(listOfFiles.length){
+			$('#div_list_keysheading').show().html( "<B>License Keys:</B> " + listOfFiles.join(', '));
+		}else{
+			$('#div_list_keysheading').hide();
+		}
+	});
+};
+
+var localajaxinit = function(){
+	top.document.title = 'G.729 Codec Registration' ;
+
+	var s = ASTGUI.cliCommand('show g729'); // 0/0 encoders/decoders of 2 licensed channels are currently in use
+	s = parent.ASTGUI.parseCLIResponse(s);
+
+	if( s.contains('encoders/decoders')){
+		if( s.contains('of 0 licensed channels are currently in use') ) {
+			$('#div_list_heading').html('You do not have any G.729 Codec License Keys installed');
+		}else{
+			$('#div_list_heading').html(s);
+		}
+	}else{
+		var s1 = ASTGUI.cliCommand('module show');
+		if( !s1.contains('codec_g729a') ){
+			$('#div_list_heading').html('<font size=+1> codec_g729a  Not installed ! </font>');
+		}
+	}
+
+	list_keyFiles();
+};
+
+
+var register_New_license = function(){
+		if ( !ASTGUI.checkRequiredFields(['text_g729licensekey', 'text_first_name', 'text_last_name', 'text_address1', 'text_city', 'text_country', 'text_phone', 'text_email']) ) return ;
+		var x = new listOfActions(ASTGUI.globals.g729RegInfo);
+		x.new_action('delcat', REGCONTEXT, '', '');
+		x.new_action('newcat', REGCONTEXT, '', '');
+		x.new_action('append', REGCONTEXT, 'first_name', ASTGUI.getFieldValue('text_first_name') );
+		x.new_action('append', REGCONTEXT, 'last_name', ASTGUI.getFieldValue('text_last_name') );
+		x.new_action('append', REGCONTEXT, 'company', ASTGUI.getFieldValue('text_company') );
+		x.new_action('append', REGCONTEXT, 'address1', ASTGUI.getFieldValue('text_address1') );
+		x.new_action('append', REGCONTEXT, 'address2', ASTGUI.getFieldValue('text_address2') );
+		x.new_action('append', REGCONTEXT, 'city', ASTGUI.getFieldValue('text_city') );
+		x.new_action('append', REGCONTEXT, 'state', ASTGUI.getFieldValue('text_state') );
+		x.new_action('append', REGCONTEXT, 'post_code', ASTGUI.getFieldValue('text_post_code') );
+		x.new_action('append', REGCONTEXT, 'country', ASTGUI.getFieldValue('text_country') );
+		x.new_action('append', REGCONTEXT, 'phone', ASTGUI.getFieldValue('text_phone') );
+		x.new_action('append', REGCONTEXT, 'email', ASTGUI.getFieldValue('text_email') );
+
+		ASTGUI.dialog.waitWhile('Registering Key...');
+		x.callActions(function(){
+			ASTGUI.systemCmdWithOutput( ASTGUI.scripts['Registerg729'] + " " + ASTGUI.getFieldValue('text_g729licensekey'), function(result){
+				ASTGUI.dialog.hide();
+				if(result.contains('SUCCESS')){
+					alert('Registration Successfull ! \n Please reboot for changes to take effect');
+					window.location.reload();
+				}
+				if(result.contains('FAILED')){
+					alert('Registration FAILED ! \n' + result.withOut('FAILED'));
+					window.location.reload();
+				}
+			});
+		});
+
+
+};
+
+
+var download_eula = function(){
+	ASTGUI.dialog.waitWhile('downloading EULA for the product...');
+	ASTGUI.systemCmdWithOutput('register_tool --geteula --category 1 --product 16 --key=XX', function(TMP_EULA){
+		if( !TMP_EULA.trim() ){
+			ASTGUI.dialog.hide();
+			alert('Unable to download license from the registration server ! \n Please make sure your Asterisk Appliance is connected to the Internet.');
+			return;
+		}
+		ASTGUI.dialog.hide();
+		$('#EULA_ACCEPT_DIV').showWithBg();
+		$('#euladivpre').html(TMP_EULA.nl2br());
+	});
+};
+
+
+
+var showRegistrationForm = function(){
+	$('#EULA_ACCEPT_DIV').hideWithBg();
+	$('#REGISTER_G729_FORM_DIV').showWithBg();
+
+	ASTGUI.miscFunctions.createConfig( ASTGUI.globals.g729RegInfo, function(){
+		var c = context2json ({ filename: ASTGUI.globals.g729RegInfo , context: REGCONTEXT , usf: 1 });
+		if( c === null ){
+			var x = new listOfSynActions(ASTGUI.globals.g729RegInfo);
+			x.new_action('newcat', REGCONTEXT, '', '');
+			x.callActions();
+			return;
+		}
+	
+		ASTGUI.updateFieldToValue( 'text_first_name' , c.getProperty('first_name') );
+		ASTGUI.updateFieldToValue( 'text_last_name' , c.getProperty('last_name') );
+		ASTGUI.updateFieldToValue( 'text_company' , c.getProperty('company') );
+		ASTGUI.updateFieldToValue( 'text_address1' , c.getProperty('address1') );
+		ASTGUI.updateFieldToValue( 'text_address2' , c.getProperty('address2') );
+		ASTGUI.updateFieldToValue( 'text_city' , c.getProperty('city') );
+		ASTGUI.updateFieldToValue( 'text_state' , c.getProperty('state') );
+		ASTGUI.updateFieldToValue( 'text_post_code' , c.getProperty('post_code') );
+		ASTGUI.updateFieldToValue( 'text_country' , c.getProperty('country') );
+		ASTGUI.updateFieldToValue( 'text_phone' , c.getProperty('phone') );
+		ASTGUI.updateFieldToValue( 'text_email' , c.getProperty('email') );
+	});
+};
+
+</script>
+<body bgcolor="EFEFEF">
+<div class="iframeTitleBar"> 
+	G.729 Codec Registration
+	<span class='refresh_icon' onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+</div>
+	<div class='lite_Heading'>G.729 Codec Registration</div>
+
+	<center>
+		<div style='text-align:center; 	background-color : #FFFFFF; width: 95%; padding: 5px; margin-left: 1px; margin-top:14px; margin-bottom:20px; border:1px solid #CDCDCD; color: #575757 ' class='lite' id='div_list_heading'>
+		</div>
+		<div style='text-align:center; 	background-color : #FFFFFF; width: 95%; padding: 5px; margin-left: 1px; margin-top:14px; margin-bottom:20px; border:1px solid #CDCDCD; color: #575757; display:none; ' class='lite' id='div_list_keysheading'>
+		</div>
+	</center>
+
+	<BR>
+	<center>
+		<span class='guiButton' onclick="download_eula();">Register a G729 License Key on this Appliance</span>
+		<span class='guiButton' onclick="parent.miscFunctions.toDigiumStore('G729CODEC');">Buy new G729 Codec Licenses</span>
+	</center>
+
+
+
+<div id="EULA_ACCEPT_DIV" STYLE="width:650; height:500; display:none; " class='dialog'>
+	<TABLE width="100%" cellpadding=0 cellspacing=0>
+	<TR class="dialog_title_tr">
+		<TD class="dialog_title" onmousedown="ASTGUI.startDrag(event);">End User License Agreement for G.729 Codec</TD>
+		<TD class="dialog_title_X" onclick="ASTGUI.hideDrag(event);"> X </TD>
+	</TR>
+	</TABLE>
+	<table cellpadding=2 cellspacing=2 border=0 align=center width=95%>
+		<tr>	<td>
+				<div id='euladivpre' style='overflow :auto; height: 392px; border:1px solid #CDCDCD; color: #646A7C' class='lite'>
+				</div>
+			</td>
+		</tr>
+		<tr>	<td align=center height=60 valign=middle>
+				<span class='guiButtonCancel' onclick='ASTGUI.hideDrag(event);' style='margin-left:15px'>&nbsp;&nbsp;No. I do not Agree</span>
+				<span class='guiButton' onclick='showRegistrationForm();'>&nbsp;&nbsp;I Agree to the above License&nbsp;&nbsp;</span>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<div id="REGISTER_G729_FORM_DIV" STYLE="width:650; height:460; display:none;" class='dialog'>
+	<TABLE width="100%" cellpadding=0 cellspacing=0>
+	<TR class="dialog_title_tr">
+		<TD class="dialog_title" onmousedown="ASTGUI.startDrag(event);">Enter your License Information</TD>
+		<TD class="dialog_title_X" onclick="ASTGUI.hideDrag(event);"> X </TD>
+	</TR>
+	</TABLE>
+	<table cellpadding=2 cellspacing=2 border=0 align=center width=95%>
+		<tr>	<td align=right><span class='sRequired'>*</span> <B>G.729 License Key :</B></td>
+			<td><input type='16' id='text_g729licensekey' required='yes'></td>
+		</tr>
+
+		<tr>	<td align=right><span class='sRequired'>*</span> First Name :</td>
+			<td><input type='16' id='text_first_name' required='yes'></td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span>Last Name :</td>
+			<td><input type='16' id='text_last_name' required='yes'></td>
+		</tr>
+		<tr>	<td align=right>Company :</td>
+			<td><input type='16' id='text_company'></td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span>Address 1 :</td>
+			<td><input type='16' id='text_address1' required='yes'></td>
+		</tr>
+		<tr>	<td align=right>Address 2 :</td>
+			<td><input type='16' id='text_address2'></td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span>City :</td>
+			<td><input type='16' id='text_city' required='yes'></td>
+		</tr>
+		<tr>	<td align=right>State :</td>
+			<td><input type='16' id='text_state'></td>
+		</tr>
+		<tr>	<td align=right>Postal Code :</td>
+			<td><input type='16' id='text_post_code'></td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span> Country :</td>
+			<td>	<select id="text_country" required='yes'>
+					<option value="">Select a country</option><br />
+					<option value="US" >US &mdash; United States</option>
+					<option value="AF" >Afghanistan</option>
+					<option value="AL" >Albania</option>
+					<option value="DZ" >Algeria</option>
+					<option value="AS" >American Samoa</option>
+					<option value="AD" >Andorra</option>
+					<option value="AO" >Angola</option>
+					<option value="AI" >Anguilla</option>
+					<option value="AQ" >Antarctica</option>
+					<option value="AG" >Antigua and Barbuda</option>
+					<option value="AR" >Argentina</option>
+					<option value="AM" >Armenia</option>
+					<option value="AW" >Aruba</option>
+					<option value="AU" >Australia</option>
+					<option value="AT" >Austria</option>
+					<option value="AZ" >Azerbaijan</option>
+					<option value="BS" >Bahamas</option>
+					<option value="BH" >Bahrain</option>
+					<option value="BD" >Bangladesh</option>
+					<option value="BB" >Barbados</option>
+					<option value="BY" >Belarus</option>
+					<option value="BE" >Belgium</option>
+					<option value="BZ" >Belize</option>
+					<option value="BJ" >Benin</option>
+					<option value="BM" >Bermuda</option>
+					<option value="BT" >Bhutan</option>
+					<option value="BO" >Bolivia</option>
+					<option value="BA" >Bosnia and Herzegovina</option>
+					<option value="BW" >Botswana</option>
+					<option value="BV" >Bouvet Island</option>
+					<option value="BR" >Brazil</option>
+					<option value="IO" >British Indian Ocean Territory</option>
+					<option value="BN" >Brunei Darussalam</option>
+					<option value="BG" >Bulgaria</option>
+					<option value="BF" >Burkina Faso</option>
+					<option value="BI" >Burundi</option>
+					<option value="KH" >Cambodia</option>
+					<option value="CM" >Cameroon</option>
+					<option value="CA" >Canada</option>
+					<option value="CV" >Cape Verde</option>
+					<option value="KY" >Cayman Islands</option>
+					<option value="CF" >Central African Republic</option>
+					<option value="TD" >Chad</option>
+					<option value="CL" >Chile</option>
+					<option value="CN" >China</option>
+					<option value="CX" >Christmas Island</option>
+					<option value="CC" >Cocos (Keeling) Islands</option>
+					<option value="CO" >Colombia</option>
+					<option value="KM" >Comoros</option>
+					<option value="CG" >Congo</option>
+					<option value="CD" >Congo, the Democratic Republic of the</option>
+					<option value="CK" >Cook Islands</option>
+					<option value="CR" >Costa Rica</option>
+					<option value="CI" >Cote D'Ivoire</option>
+					<option value="HR" >Croatia</option>
+					<option value="CY" >Cyprus</option>
+					<option value="CZ" >Czech Republic</option>
+					<option value="DK" >Denmark</option>
+					<option value="DJ" >Djibouti</option>
+					<option value="DM" >Dominica</option>
+					<option value="DO" >Dominican Republic</option>
+					<option value="EC" >Ecuador</option>
+					<option value="EG" >Egypt</option>
+					<option value="SV" >El Salvador</option>
+					<option value="GQ" >Equatorial Guinea</option>
+					<option value="ER" >Eritrea</option>
+					<option value="EE" >Estonia</option>
+					<option value="ET" >Ethiopia</option>
+					<option value="FK" >Falkland Islands (Malvinas)</option>
+					<option value="FO" >Faroe Islands</option>
+					<option value="FJ" >Fiji</option>
+					<option value="FI" >Finland</option>
+					<option value="FR" >France</option>
+					<option value="GF" >French Guiana</option>
+					<option value="PF" >French Polynesia</option>
+					<option value="TF" >French Southern Territories</option>
+					<option value="GA" >Gabon</option>
+					<option value="GM" >Gambia</option>
+					<option value="GE" >Georgia</option>
+					<option value="DE" >Germany</option>
+					<option value="GH" >Ghana</option>
+					<option value="GI" >Gibraltar</option>
+					<option value="GR" >Greece</option>
+					<option value="GL" >Greenland</option>
+					<option value="GD" >Grenada</option>
+					<option value="GP" >Guadeloupe</option>
+					<option value="GU" >Guam</option>
+					<option value="GT" >Guatemala</option>
+					<option value="GN" >Guinea</option>
+					<option value="GW" >Guinea-Bissau</option>
+					<option value="GY" >Guyana</option>
+					<option value="HT" >Haiti</option>
+					<option value="HM" >Heard Island and Mcdonald Islands</option>
+					<option value="VA" >Holy See (Vatican City State)</option>
+					<option value="HN" >Honduras</option>
+					<option value="HK" >Hong Kong</option>
+					<option value="HU" >Hungary</option>
+					<option value="IS" >Iceland</option>
+					<option value="IN" >India</option>
+					<option value="ID" >Indonesia</option>
+					<option value="IE" >Ireland</option>
+					<option value="IL" >Israel</option>
+					<option value="IT" >Italy</option>
+					<option value="JM" >Jamaica</option>
+					<option value="JP" >Japan</option>
+					<option value="JO" >Jordan</option>
+					<option value="KZ" >Kazakhstan</option>
+					<option value="KE" >Kenya</option>
+					<option value="KI" >Kiribati</option>
+					<option value="KR" >Korea, Republic of</option>
+					<option value="KW" >Kuwait</option>
+					<option value="KG" >Kyrgyzstan</option>
+					<option value="LA" >Lao People's Democratic Republic</option>
+					<option value="LV" >Latvia</option>
+					<option value="LB" >Lebanon</option>
+					<option value="LS" >Lesotho</option>
+					<option value="LR" >Liberia</option>
+					<option value="LY" >Libyan Arab Jamahiriya</option>
+					<option value="LI" >Liechtenstein</option>
+					<option value="LT" >Lithuania</option>
+					<option value="LU" >Luxembourg</option>
+					<option value="MO" >Macao</option>
+					<option value="MK" >Macedonia, the Former Yugoslav Republic of</option>
+					<option value="MG" >Madagascar</option>
+					<option value="MW" >Malawi</option>
+					<option value="MY" >Malaysia</option>
+					<option value="MV" >Maldives</option>
+					<option value="ML" >Mali</option>
+					<option value="MT" >Malta</option>
+					<option value="MH" >Marshall Islands</option>
+					<option value="MQ" >Martinique</option>
+					<option value="MR" >Mauritania</option>
+					<option value="MU" >Mauritius</option>
+					<option value="YT" >Mayotte</option>
+					<option value="MX" >Mexico</option>
+					<option value="FM" >Micronesia, Federated States of</option>
+					<option value="MD" >Moldova, Republic of</option>
+					<option value="MC" >Monaco</option>
+					<option value="MN" >Mongolia</option>
+					<option value="MS" >Montserrat</option>
+					<option value="MA" >Morocco</option>
+					<option value="MZ" >Mozambique</option>
+					<option value="MM" >Myanmar</option>
+					<option value="NA" >Namibia</option>
+					<option value="NR" >Nauru</option>
+					<option value="NP" >Nepal</option>
+					<option value="NL" >Netherlands</option>
+					<option value="AN" >Netherlands Antilles</option>
+					<option value="NC" >New Caledonia</option>
+					<option value="NZ" >New Zealand</option>
+					<option value="NI" >Nicaragua</option>
+					<option value="NE" >Niger</option>
+					<option value="NG" >Nigeria</option>
+					<option value="NU" >Niue</option>
+					<option value="NF" >Norfolk Island</option>
+					<option value="MP" >Northern Mariana Islands</option>
+					<option value="NO" >Norway</option>
+					<option value="OM" >Oman</option>
+					<option value="PK" >Pakistan</option>
+					<option value="PW" >Palau</option>
+					<option value="PS" >Palestinian Territory, Occupied</option>
+					<option value="PA" >Panama</option>
+					<option value="PG" >Papua New Guinea</option>
+					<option value="PY" >Paraguay</option>
+					<option value="PE" >Peru</option>
+					<option value="PH" >Philippines</option>
+					<option value="PN" >Pitcairn</option>
+					<option value="PL" >Poland</option>
+					<option value="PT" >Portugal</option>
+					<option value="PR" >Puerto Rico</option>
+					<option value="QA" >Qatar</option>
+					<option value="RE" >Reunion</option>
+					<option value="RO" >Romania</option>
+					<option value="RU" >Russian Federation</option>
+					<option value="RW" >Rwanda</option>
+					<option value="SH" >Saint Helena</option>
+					<option value="KN" >Saint Kitts and Nevis</option>
+					<option value="LC" >Saint Lucia</option>
+					<option value="PM" >Saint Pierre and Miquelon</option>
+					<option value="VC" >Saint Vincent and the Grenadines</option>
+					<option value="WS" >Samoa</option>
+					<option value="SM" >San Marino</option>
+					<option value="ST" >Sao Tome and Principe</option>
+					<option value="SA" >Saudi Arabia</option>
+					<option value="SN" >Senegal</option>
+					<option value="CS" >Serbia and Montenegro</option>
+					<option value="SC" >Seychelles</option>
+					<option value="SL" >Sierra Leone</option>
+					<option value="SG" >Singapore</option>
+					<option value="SK" >Slovakia</option>
+					<option value="SI" >Slovenia</option>
+					<option value="SB" >Solomon Islands</option>
+					<option value="SO" >Somalia</option>
+					<option value="ZA" >South Africa</option>
+					<option value="GS" >South Georgia and the South Sandwich Islands</option>
+					<option value="ES" >Spain</option>
+					<option value="LK" >Sri Lanka</option>
+					<option value="SR" >Suriname</option>
+					<option value="SJ" >Svalbard and Jan Mayen</option>
+					<option value="SZ" >Swaziland</option>
+					<option value="SE" >Sweden</option>
+					<option value="CH" >Switzerland</option>
+					<option value="SY" >Syrian Arab Republic</option>
+					<option value="TW" >Taiwan</option>
+					<option value="TJ" >Tajikistan</option>
+					<option value="TZ" >Tanzania, United Republic of</option>
+					<option value="TH" >Thailand</option>
+					<option value="TL" >Timor-Leste</option>
+					<option value="TG" >Togo</option>
+					<option value="TK" >Tokelau</option>
+					<option value="TO" >Tonga</option>
+					<option value="TT" >Trinidad and Tobago</option>
+					<option value="TN" >Tunisia</option>
+					<option value="TR" >Turkey</option>
+					<option value="TM" >Turkmenistan</option>
+					<option value="TC" >Turks and Caicos Islands</option>
+					<option value="TV" >Tuvalu</option>
+					<option value="UG" >Uganda</option>
+					<option value="UA" >Ukraine</option>
+					<option value="AE" >United Arab Emirates</option>
+					<option value="GB" >United Kingdom</option>
+					<option value="UM" >United States Minor Outlying Islands</option>
+					<option value="UY" >Uruguay</option>
+					<option value="UZ" >Uzbekistan</option>
+					<option value="VU" >Vanuatu</option>
+					<option value="VE" >Venezuela</option>
+					<option value="VN" >Viet Nam</option>
+					<option value="VG" >Virgin Islands, British</option>
+					<option value="VI" >Virgin Islands, U.S.</option>
+					<option value="WF" >Wallis and Futuna</option>
+					<option value="EH" >Western Sahara</option>
+					<option value="YE" >Yemen</option>
+					<option value="ZM" >Zambia</option>
+					<option value="ZW" >Zimbabwe</option>
+				</select>
+			</td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span> Phone :</td>
+			<td><input type='16' id='text_phone' required='yes'></td>
+		</tr>
+		<tr>	<td align=right><span class='sRequired'>*</span> E-Mail :</td>
+			<td><input type='16' id='text_email' required='yes'></td>
+		</tr>
+		<tr>	<td align=center height=60 valign=middle colspan=2>
+				<span class='guiButtonCancel' onclick='ASTGUI.hideDrag(event);'>Cancel</span>
+				<span class='guiButton' onclick='register_New_license();' style='margin-left:15px'>&nbsp;&nbsp;Register&nbsp;&nbsp;</span>
+			</td>
+		</tr>
+	</table>
+</div>
+
+
+</body>
+

Copied: branches/2.0/scripts/registerg729.sh (from r4072, team/pari/private/tmp_g729_registration/scripts/registerg729.sh)
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/scripts/registerg729.sh?view=diff&rev=4073&p1=team/pari/private/tmp_g729_registration/scripts/registerg729.sh&r1=4072&p2=branches/2.0/scripts/registerg729.sh&r2=4073
==============================================================================
--- team/pari/private/tmp_g729_registration/scripts/registerg729.sh (original)
+++ branches/2.0/scripts/registerg729.sh Fri Nov  7 10:40:45 2008
@@ -1,0 +1,25 @@
+#!/bin/sh
+
+####################################################################
+####    Author Brandon Kruse <bkruse at digium.com>                ####
+####	Copyright 2008, Digium Inc                              ####
+####################################################################
+
+# script for generating regtool compatible tab delimited file from a gui config file.
+INPUTFILE="/etc/asterisk/g729reginfo.conf"
+OUTPUTFILE="/etc/asterisk/g729reginfo_tabs.conf"
+rm ${OUTPUTFILE}
+
+TABBEDVALUES=`grep -v '\;' ${INPUTFILE} | sed 's/\[general\]//g' | sed 's/ = /\\t/g'`
+echo -e "${TABBEDVALUES}" > ${OUTPUTFILE}
+
+register_tool --register --category 1 --product 16 --key $1  < ${OUTPUTFILE}
+
+STATUS=$?
+if [ "${STATUS}" = "0" ]; then
+	echo "SUCCESS"
+else
+	echo "FAILED"
+fi
+ 
+




More information about the asterisk-gui-commits mailing list