git-svn-id: https://svn.code.sf.net/p/freetel/code@910 01035d8c-6547-0410-b346-abe4f9...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 1 Nov 2012 00:33:55 +0000 (00:33 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 1 Nov 2012 00:33:55 +0000 (00:33 +0000)
mini-asterisk-gui2/voiplines.js

index 30909ce819cfdff1ff7d6eef7191b013d0da5013..fa4879cc149dc804805631135624cd987614e736 100644 (file)
@@ -157,13 +157,13 @@ function usernameReturn(doc,status) {
        }
        );
        
-       //   secret=passwordsip                   secret=password
-    //   need to switch keywords based on selection
-//     var url = '/cgi-bin/setword.cgi?file=/etc/asterisk/sip.conf&this=passwordsip&that=' + document.getElementById('pass').value ;
+       var url = '/cgi-bin/setlinekey2.cgi?file=/etc/asterisk/sip.conf'
+                               +'&this=secret='
+                               +'&that='+document.getElementById('pass').value
+                               +'&key='+selection+'-mini-asterisk';
 
-//     downloadUrl(url,passwordReturn);
+       downloadUrl(url,passwordReturn);
        
-               initialise();
 }
 
 function passwordReturn(doc,status) {
@@ -172,12 +172,13 @@ function passwordReturn(doc,status) {
        }
        );
        
-       //   host=hostsip                         host=192.168.1.30
-    //   need to switch keywords based on selection
-       var url = '/cgi-bin/setword.cgi?file=/etc/asterisk/sip.conf&this=hostsip&that=' + document.getElementById('host').value ;
+       var url = '/cgi-bin/setlinekey2.cgi?file=/etc/asterisk/sip.conf'
+                               +'&this=host='
+                               +'&that='+document.getElementById('host').value
+                               +'&key='+selection+'-mini-asterisk';
 
        downloadUrl(url,hostReturn);
-}
+       }
 
 function hostReturn(doc,status) {
     loadHtmlTextFile(doc, function(line) {