bkruse: branch asterisknow r917 - in /branches/asterisknow: ./ config/ config...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri May 11 12:46:14 MST 2007


Author: bkruse
Date: Fri May 11 14:46:13 2007
New Revision: 917

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=917
Log:
Merged revisions 916 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r916 | bkruse | 2007-05-10 18:44:51 -0500 (Thu, 10 May 2007) | 1 line

Now, you can use the options page in the gui to make agentlogin and agentcallback login extensions availible.....The only thing left to do is to UPDATE the extension, instead of as it is now, where it just adds another extension if you change the number. I am sure there is a way to do this, pari can help me. Anyways, the basis of it is layed out now.
........

Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/localexts.html
    branches/asterisknow/config/scripts/tooltip.js

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri May 11 14:46:13 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-899,905
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-899,905,916

Modified: branches/asterisknow/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/localexts.html?view=diff&rev=917&r1=916&r2=917
==============================================================================
--- branches/asterisknow/config/localexts.html (original)
+++ branches/asterisknow/config/localexts.html Fri May 11 14:46:13 2007
@@ -27,7 +27,7 @@
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var usercallbacks = new Object;
-var fieldnames = ['allow_aliasextns', 'allow_an_extns', 'callwaiting', 'cancel', 'hasagent', 'hasdirectory', 'hasiax', 'hasmanager', 'hassip', 'hasvoicemail', 'localextenlength', 'save', 'threewaycalling', 'userbase', 'vmsecret'];
+var fieldnames = ['allow_aliasextns', 'allow_an_extns', 'callwaiting', 'cancel', 'hasagent', 'hasdirectory', 'hasiax', 'hasmanager', 'hassip', 'hasvoicemail', 'localextenlength', 'save', 'threewaycalling', 'userbase', 'vmsecret', 'login_exten', 'login_callback_exten'];
 var widgets = {};
 
 
@@ -41,7 +41,14 @@
 }
 
 usercallbacks.savechanges = function(){
-	//
+		/* Quick function to save our changes, if they exist. */
+		if ( _$('login_exten').value != "" ) {
+			add_login(_$('login_exten').value);
+		}
+		if ( _$('login_callback_exten').value != "" ) {
+			add_login(_$('login_callback_exten').value, "callbacklogin");
+		}
+		return true;
 }
 
 usercallbacks.beforeSaving= function(){
@@ -76,6 +83,49 @@
 	parent.loadscreen(this);
 }
 
+function rename_extension(a,b){
+        // rename extension 'a' in extensions.conf to 'b'
+        // change 'exten => a,1,Queue' in default to 'exten => b,1,Queue'
+        var opt0 = {
+                method: 'get',
+                asynchronous: true,
+                onSuccess: function() { 
+                        return true;    
+                },
+                onFailure: function(t) {
+                        gui_alert("Config Error: " + t.status + ": " + t.statusText);
+                        return false;
+                }
+        };
+        uri0 = build_action('update', 0, specialcontext ,'exten', b+',1,Queue(${EXTEN})', a+',1,Queue(${EXTEN})' ); 
+        opt0.parameters="action=updateconfig&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri0;
+        tmp0 = new Ajax.Request(asterisk_rawmanPath, opt0);
+}
+
+function add_login(exten, type){
+        /* add extension to let the agents login to the queue! */
+        /* if type is set, we will do AgentcallbackLogin or Agent Login */ 
+        /* add 'exten => exten,1,Agent(Callback?)Login' to default */
+	var istype = "agentlogin()";
+        var opt0 = {
+                method: 'get',
+                asynchronous: true,
+                onSuccess: function() { 
+                        return true;    
+                },
+                onFailure: function(t) {
+                        gui_alert("Config Error: " + t.status + ": " + t.statusText);
+                        return false;
+                }
+        };
+	if (type) {
+		istype = "agentcallbacklogin()";
+	} 	
+        uri0 = build_action('append', 0, specialcontext ,'exten', exten+',1,'+ istype); 
+	alert("uri0 is " + uri0);
+        opt0.parameters="action=updateconfig&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri0;
+        tmp0 = new Ajax.Request(asterisk_rawmanPath, opt0);
+}
 
 function localajaxinit(){
 	setWindowTitle("Local Extension Settings");
@@ -157,6 +207,9 @@
 			</select>&nbsp;</td>
 		</tr>
 		<tr><td class="field_text" align=left>First Extension Number : <input type=text id="userbase" size=5  class="input9"></td></tr>
+		<tr><td onmouseover="show_tooltip('en', 'users', 18);" class="field_text" align=left>Agent Login Extension :  <input type=text id="login_exten" size=5  class="input9"></td></tr>
+		<tr><td onmouseover="show_tooltip('en', 'users', 19);" class="field_text" align=left>Agent Callback Login Extension :  <input type=text id="login_callback_exten" size=5  class="input9"></td></tr>
+
 		<tr><td class="field_text" align="left"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
 		<tr><td class="field_text" align="left"><input type=checkbox id="allow_an_extns">Allow extensions to be AlphaNumeric (SIP/IAX users)</td></tr>
 		</table>

Modified: branches/asterisknow/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/tooltip.js?view=diff&rev=917&r1=916&r2=917
==============================================================================
--- branches/asterisknow/config/scripts/tooltip.js (original)
+++ branches/asterisknow/config/scripts/tooltip.js Fri May 11 14:46:13 2007
@@ -30,6 +30,8 @@
 	tooltips['users'] .en[15] = "<B>Is Agent:</B> Check this option if this User or Phone is an Call Queue Member (Agent)"; //Is Agent:
 	tooltips['users'] .en[16] = "<B>VM Password:</B> Voicemail Password for this user, Ex: \"1234\"."; //Voicemail Password
 	tooltips['users'] .en[17] = "<B>Hints:</B> If checked the phone being called will be sent a \"hint\" to light up status lamps on SIP phones."; // Hint phone before being dialed.
+	tooltips['users'] .en[18] = "<B>Agent Login Extension:</B> Extension to be dialed for the Agents to Login to the Specific Queue. <br> This is an extension that all the Agents can Call to Login to their specified Queues. ";
+	tooltips['users'] .en[19] = "<B>Agent Callback Login Extension:</B> Extension to be dialed for the Agents to Login to the Specific Queue. <br> Same as Agent Login Extension, accept you do not have to remain on the line. ";
 
 // Tooltips for Conferencing (meetme)
 	tooltips['meetme']= new Object;



More information about the asterisk-gui-commits mailing list