pari: branch asterisknow r1771 - /branches/asterisknow/config/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Sat Nov 3 13:35:51 CDT 2007
Author: pari
Date: Sat Nov 3 13:35:50 2007
New Revision: 1771
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1771
Log:
misdn support - tweaked to use misdn.conf instead of users.conf
Modified:
branches/asterisknow/config/incoming.html
branches/asterisknow/config/misdn.html
branches/asterisknow/config/numberplan.html
Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=1771&r1=1770&r2=1771
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Sat Nov 3 13:35:50 2007
@@ -109,13 +109,34 @@
for (t in didtrunks){ if( didtrunks.hasOwnProperty(t) ){
ASTGUI.selectbox.append(_$('fromprovider'),didtrunks[t].trunkname, t);
}}
- // load the object didtrunks into the table callingRulesTable
- refreshtable();
- parent.loadscreen(this);
+ load_mISDNtrunks();
}
numplan_callbacks.eachline = true;
numplan_callbacks.includecats = true;
+
+
+function load_mISDNtrunks(){
+ var parseUsersConf = function(n){
+ try{
+ if( n == "ERROR: CONFIG FILE NOT FOUND"){ } // misdn.conf not found
+ for( var l in n ){
+ if( n.hasOwnProperty(l) && l.beginsWith('trunk_m') && n[l]['hasmisdn'] =='yes' ){
+ didtrunks[l] = new Object();
+ didtrunks[l].trunkname = n[l]['trunkname'];
+ }
+ };
+ }catch(err){
+
+ }finally{
+ // load the object didtrunks into the table callingRulesTable
+ refreshtable();
+ parent.loadscreen(this);
+ }
+ };
+ config2json("misdn.conf", 1, parseUsersConf);
+}
+
function refreshtable(){
var crt = _$('callingRulesTable') ;
Modified: branches/asterisknow/config/misdn.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/misdn.html?view=diff&rev=1771&r1=1770&r2=1771
==============================================================================
--- branches/asterisknow/config/misdn.html (original)
+++ branches/asterisknow/config/misdn.html Sat Nov 3 13:35:50 2007
@@ -351,7 +351,7 @@
function load_mISDNtrunks(){
var parseUsersConf = function(n){
- if( n == "ERROR: CONFIG FILE NOT FOUND"){// users.conf not found
+ if( n == "ERROR: CONFIG FILE NOT FOUND"){// misdn.conf not found
return false;
}
@@ -366,7 +366,7 @@
showMisdnTrunksinTable();
};
- config2json("users.conf", 1, parseUsersConf);
+ config2json("misdn.conf", 1, parseUsersConf);
}
@@ -389,12 +389,12 @@
var delete_trunk = function(k){
- //delete in users.conf
+ //delete in misdn.conf
// delete in globals in extensions.conf
// delete the DID context in extensions.conf
var c = 0;
var uri = build_action('delcat', c, k, "", ""); c++;
- makerequest('u', "users.conf", uri, function(t) {
+ makerequest('u', "misdn.conf", uri, function(t) {
var c1 = 0;
var uri1 = build_action('delcat', c1, "DID_" + k , "", ""); c1++;
uri1 += build_action('delete', c1, "globals", k, '', "mISDN/g:" + k ); c1++;
@@ -441,7 +441,7 @@
uri += build_action('append' , c , newtrunkname , "ports", _$('edit_MTrunk_ports').value ) ; c++ ;
uri += build_action('append' , c , newtrunkname , "hasmisdn", 'yes') ; c++ ;
uri += build_action('append' , c , newtrunkname , "msns", '*') ; c++ ;
- makerequest('u', "users.conf", uri, function(t) {
+ makerequest('u', "misdn.conf", uri, function(t) {
var c1 = 0, uri2 ='';
uri2 += build_action('newcat', c1, "DID_"+newtrunkname, "", ""); c1++;
uri2 += build_action('append' , c1, "DID_"+newtrunkname, 'include', 'default') ; c1++ ;
@@ -467,7 +467,7 @@
var c = 0;
var uri = build_action('update', c, k, 'ports', _$('edit_MTrunk_ports').value ); c++;
uri += build_action('update', c, k, 'trunkname', _$('edit_MTrunk_trunkName').value ); c++;
- makerequest('u', "users.conf", uri, function(t) {
+ makerequest('u', "misdn.conf", uri, function(t) {
try{
mISDNTRUNKS[k]['trunkname'] = _$('edit_MTrunk_trunkName').value ;
mISDNTRUNKS[k]['ports'] = _$('edit_MTrunk_ports').value ;
Modified: branches/asterisknow/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/numberplan.html?view=diff&rev=1771&r1=1770&r2=1771
==============================================================================
--- branches/asterisknow/config/numberplan.html (original)
+++ branches/asterisknow/config/numberplan.html Sat Nov 3 13:35:50 2007
@@ -557,18 +557,35 @@
if ( c.hasOwnProperty(d) && c[d]['context'] && (c[d]['context'] == asterisk_guiTDPrefix + d ) ) {
trunks_desc[d] = new Object();
trunks_desc[d].comment = (c[d]['trunkname']) ? unescape(c[d]['trunkname']) : d ;
- var New_OPTION = document.createElement('option');
- New_OPTION.text = unescape(trunks_desc[d].comment) ;
- New_OPTION.value =d ;
- try {
- _$('trunks').add(New_OPTION, null); // W3C way
- }catch(ex) {
- _$('trunks').add(New_OPTION); // IE way
+ ASTGUI.selectbox.append(_$('trunks'), unescape(trunks_desc[d].comment) , d);
+ }
+ }
+ load_mISDNtrunks();
+}
+
+function load_mISDNtrunks(){
+ var parseUsersConf = function(n){
+ try{
+ if( n == "ERROR: CONFIG FILE NOT FOUND"){// misdn.conf not found
+
+ }
+
+ for( var l in n ){
+ if( n.hasOwnProperty(l) && l.beginsWith('trunk_m') && n[l]['hasmisdn'] =='yes' ){
+ trunks_desc[l] = new Object();
+ trunks_desc[l].comment = (n[l]['trunkname']) ? unescape(n[l]['trunkname']) : l ;
+ ASTGUI.selectbox.append(_$('trunks'), trunks_desc[l].comment , l);
}
- }
- }
- parent.astmanEngine.config2list("extensions.conf", _$('extensions'), widgets , numplan_callbacks);
-}
+ };
+ }catch(err){
+
+ }finally{
+ parent.astmanEngine.config2list("extensions.conf", _$('extensions'), widgets , numplan_callbacks);
+ }
+ };
+ config2json("misdn.conf", 1, parseUsersConf);
+}
+
function select_differentplan(){
var _extns = _$('extensions').value ;
More information about the asterisk-gui-commits
mailing list