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

index c26001d59ebbbf359d5415eecac28bd29d7ab189..67271a4e86330d5311dbc60358b215498dcdcbd0 100644 (file)
@@ -810,7 +810,7 @@ qualify=yes
 ;qualify=yes        ; sipnormal-mini-asterisk do not remove this comment
 
 ;[userjazmin]                     ; jazmin-mini-asterisk do not remove this comment
-; <a href="http://www.jazmin.com.au/">Jazmin</a> are a South Australian ITSP
+;  a South Australian ITSP
 ;host=hostjaz                  ; jazmin-mini-asterisk do not remove this comment
 ;secret=passwordjaz            ; jazmin-mini-asterisk do not remove this comment
 ;username=userjaz              ; jazmin-mini-asterisk do not remove this comment
@@ -827,6 +827,7 @@ qualify=yes
 ;nat=yes                       ; jazmin-mini-asterisk do not remove this comment
 
 [usertrev]               ; usertrev-mini-asterisk do not remove this comment
+; a test sip provider
 type=friend             ; usertrev-mini-asterisk do not remove this comment
 context=default         ; usertrev-mini-asterisk do not remove this comment
 username=trev        ; usertrev-mini-asterisk do not remove this comment
index aca715130c3f39c2f03d28c1ed53c3e2528e6fc0..aba5382c459a4c7fa9dc996a3b553b40bce26e42 100644 (file)
@@ -109,18 +109,22 @@ function loadSipConf(doc,status) {
                                     registerflag = 0;
                                }
                        }
+                       
+                       var myregexp = /\s|=/;       // whitespace or equals .... for splitting out user,secret,host
+                       
                        if (line.indexOf("sipnat-mini-asterisk") != -1) {
                                if (line.indexOf("username") != -1) {
-                                       var myregexp = /\s|=/;
+
                                        var s = line.split(myregexp);
-                                       //var t = s[1].split[' '); 
-                                       sipnat_user = s[0]; //  save user1
+                                       sipnat_user = s[1]; //  save user
                                } 
                                else if (line.indexOf("secret") != -1) {
-                                       sipnat_secret = ""; //  save secret
+                                       var s = line.split(myregexp);
+                                       sipnat_secret = s[1]; //  save secret
                                } 
                                else if (line.indexOf("host") != -1) {
-                                       sipnat_host = ""; //  save host
+                                       var s = line.split(myregexp);
+                                       sipnat_host = s[1]; //  save host
                                }
                        }
                        if (line.indexOf("sipnormal-mini-asterisk") != -1) {