;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
;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
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) {