;context=default ; sipnat-mini-asterisk do not remove this comment
;username=usernat ; sipnat-mini-asterisk do not remove this comment
;secret=passwordnat ; sipnat-mini-asterisk do not remove this comment
+;fromdomain=fromdomainnat ; sipnat-mini-asterisk do not remove this comment
+;fromuser=fromusernat ; sipnat-mini-asterisk do not remove this comment
;host=hostnat ; sipnat-mini-asterisk do not remove this comment
;canreinvite=no ; sipnat-mini-asterisk do not remove this comment
;disallow=all ; sipnat-mini-asterisk do not remove this comment
;context=default ; sipnormal-mini-asterisk do not remove this comment
;username=usersip ; sipnormal-mini-asterisk do not remove this comment
;secret=passwordsip ; sipnormal-mini-asterisk do not remove this comment
+;fromdomain=fromdomainsip ; sipnormal-mini-asterisk do not remove this comment
+;fromuser=fromusersip ; sipnormal-mini-asterisk do not remove this comment
;host=hostsip ; sipnormal-mini-asterisk do not remove this comment
;canreinvite=no ; sipnormal-mini-asterisk do not remove this comment
;disallow=all ; sipnormal-mini-asterisk do not remove this comment
var user = "";
var host = "";
var passwd = "";
+var fromuser= "";
+var fromdomain= "";
var selection = "none";
var lastselection="";
var s = line.split(myregexp);
sipnat_host = s[1]; // save host
}
+ else if (line.indexOf("fromuser") != -1) {
+ var s = line.split(myregexp);
+ sipnat_fromuser = s[1]; // save
+ }
+ else if (line.indexOf("fromdomain") != -1) {
+ var s = line.split(myregexp);
+ sipnat_fromdomain = s[1]; // save
+ }
}
if (line.indexOf("sipnormal-mini-asterisk") != -1) {
if (line.indexOf("username") != -1) {
var s = line.split(myregexp);
sipnormal_host = s[1]; // save host
}
+ else if (line.indexOf("fromuser") != -1) {
+ var s = line.split(myregexp);
+ sipnormal_fromuser = s[1]; // save
+ }
+ else if (line.indexOf("fromdomain") != -1) {
+ var s = line.split(myregexp);
+ sipnormal_fromdomain = s[1]; // save
+ }
}
if (line.indexOf("jazmin-mini-asterisk") != -1) {
if (line.indexOf("username") != -1) {
var s = line.split(myregexp);
sipjazmin_host = s[1]; // save host
}
+ else if (line.indexOf("fromuser") != -1) {
+ var s = line.split(myregexp);
+ sipjazmin_fromuser = s[1]; // save
+ }
+ else if (line.indexOf("fromdomain") != -1) {
+ var s = line.split(myregexp);
+ sipjazmin_fromdomain = s[1]; // save
+ }
}
}
document.getElementById('user').value = "";
document.getElementById('host').value = "";
document.getElementById('pass').value = "";
+ document.getElementById('fromuser').value = "";
+ document.getElementById('fromdomain').value = "";
document.getElementById('info').textContent = sipnone_info;
document.getElementById('provider').value="none";
}
document.getElementById('user').value = sipnat_user;
document.getElementById('host').value = sipnat_host;
document.getElementById('pass').value = sipnat_secret;
+ document.getElementById('fromuser').value = sipnat_fromuser;
+ document.getElementById('fromdomain').value = sipnat_fromdomain;
document.getElementById('info').textContent = sipnat_info;
document.getElementById('provider').value="sipnat";
}
document.getElementById('user').value = sipnormal_user;
document.getElementById('host').value = sipnormal_host;
document.getElementById('pass').value = sipnormal_secret;
+ document.getElementById('fromuser').value = sipnormal_fromuser;
+ document.getElementById('fromdomain').value = sipnormal_fromdomain;
document.getElementById('info').textContent = sipnormal_info;
document.getElementById('provider').value="sipnormal";
}
document.getElementById('user').value = sipjazmin_user;
document.getElementById('host').value = sipjazmin_host;
document.getElementById('pass').value = sipjazmin_secret;
+ document.getElementById('fromuser').value = sipjazmin_fromuser;
+ document.getElementById('fromdomain').value = sipjazmin_fromdomain;
document.getElementById('info').textContent = sipjazmin_info;
document.getElementById('provider').value="jazmin";
}
user = document.getElementById('user').value;
host = document.getElementById('host').value;
passwd = document.getElementById('pass').value;
+ fromuser = document.getElementById('fromuser').value;
+ passwd = document.getElementById('fromdomain').value;
// 1. Save sip.conf
document.getElementById('user').value = sipnat_user;
document.getElementById('host').value = sipnat_host;
document.getElementById('pass').value = sipnat_secret;
+ document.getElementById('fromuser').value = sipnat_fromuser;
+ document.getElementById('fromdomain').value = sipnat_fromdomain;
document.getElementById('info').textContent = sipnat_info;
} else if (sell == "sipnormal" ) {
// fill sipnormal
document.getElementById('user').value = sipnormal_user;
document.getElementById('host').value = sipnormal_host;
document.getElementById('pass').value = sipnormal_secret;
+ document.getElementById('fromuser').value = sipnormal_fromuser;
+ document.getElementById('fromdomain').value = sipnormal_fromdomain;
document.getElementById('info').textContent = sipnormal_info;
} else if (sell == "jazmin" ) {
// fill jazmin
document.getElementById('user').value = sipjazmin_user;
document.getElementById('host').value = sipjazmin_host;
document.getElementById('pass').value = sipjazmin_secret;
+ document.getElementById('fromuser').value = sipjazmin_fromuser;
+ document.getElementById('fromdomain').value = sipjazmin_fromdomain;
document.getElementById('info').textContent = sipjazmin_info;
} else {
// something weird happened