pari: branch appliance r227 - /branches/appliance/config/users.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 10 15:29:26 MST 2007


Author: pari
Date: Wed Jan 10 16:29:25 2007
New Revision: 227

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=227
Log:
Register sip/iax devices with asterisk - this might not be the best way of doing it. The proper way is to add two DOM elements registeriax, registersip and add them in the array fieldnames, but then the GET request is running out of length, so making a new request for these two fields

Modified:
    branches/appliance/config/users.html

Modified: branches/appliance/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/users.html?view=diff&rev=227&r1=226&r2=227
==============================================================================
--- branches/appliance/config/users.html (original)
+++ branches/appliance/config/users.html Wed Jan 10 16:29:25 2007
@@ -154,6 +154,34 @@
 				}
 		}
 	}
+
+	callbacks.savechanges = function(){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onSuccess: function(t) { 									
+
+				},
+				onFailure: function(t) {
+					alert("Config Error: " + t.status + ": " + t.statusText);
+				}
+			};
+			var p =0;
+			var uri = "";
+			if(	$('hassip').checked	){
+				uri += build_action('update', p, $('devices').value ,"registersip", "yes" ); p++;
+			}else{
+				uri += build_action('update', p, $('devices').value ,"registersip", "no" ); p++;
+			}
+			if(	$('hasiax').checked	){
+				uri += build_action('update', p, $('devices').value ,"registeriax", "yes" ); p++;
+			}else{
+				uri += build_action('update', p, $('devices').value ,"registeriax", "no" ); p++;
+			}
+			opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("users.conf") + "&dstfilename=" + encodeURIComponent("users.conf") + uri;
+			var tmp = new Ajax.Request("../../rawman", opt);
+	}
+
 
 	phonecallbacks.format = function(t) {
 		if (t.fieldbyname['port'] == 'fxo')



More information about the asterisk-gui-commits mailing list