git-svn-id: https://svn.code.sf.net/p/freetel/code@993 01035d8c-6547-0410-b346-abe4f9...
authorhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Nov 2012 23:29:24 +0000 (23:29 +0000)
committerhorse69 <horse69@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Nov 2012 23:29:24 +0000 (23:29 +0000)
mini-asterisk-gui2/voiplines.js

index aba5382c459a4c7fa9dc996a3b553b40bce26e42..f7bc3993fb21dd6417e5499754efa2dac2a438b1 100644 (file)
@@ -129,24 +129,30 @@ function loadSipConf(doc,status) {
                        }
                        if (line.indexOf("sipnormal-mini-asterisk") != -1) {
                                if (line.indexOf("username") != -1) {
-                                       sipnormal_user = ""; //  save user
+                                       var s = line.split(myregexp);
+                                       sipnormal_user = s[1]; //  save user
                                }
-                               if (line.indexOf("secret") != -1) {
-                                       sipnormal_secret = ""; //  save secret
+                               else if (line.indexOf("secret") != -1) {
+                                       var s = line.split(myregexp);
+                                       sipnormal_secret = s[1]; //  save secret
                                }
-                               if (line.indexOf("host") != -1) {
-                                       sipnormal_host = ""; //  save host
+                               else if (line.indexOf("host") != -1) {
+                                       var s = line.split(myregexp);
+                                       sipnormal_host = s[1]; //  save host
                                }
                        }
                        if (line.indexOf("jazmin-mini-asterisk") != -1) {
                                if (line.indexOf("username") != -1) {
-                                       sipjazmin_user = ""; //  save user
-                               } else
-                               if (line.indexOf("secret") != -1) {
-                                       sipjazmin_secret = ""; //  save secret
-                               } else
-                               if (line.indexOf("host") != -1) {
-                                       sipjazmin_host = ""; //  save host
+                                       var s = line.split(myregexp);
+                                       sipjazmin_user = s[1]; //  save user
+                               } 
+                               else if (line.indexOf("secret") != -1) {
+                                       var s = line.split(myregexp);
+                                       sipjazmin_secret = s[1]; //  save secret
+                               }
+                               else if (line.indexOf("host") != -1) {
+                                       var s = line.split(myregexp);
+                                       sipjazmin_host = s[1]; //  save host
                                }
                        }
                }