rbrindley: branch 2.0 r4721 - /branches/2.0/config/js/pbx2.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Apr 8 11:07:29 CDT 2009


Author: rbrindley
Date: Wed Apr  8 11:07:26 2009
New Revision: 4721

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4721
Log:

- lets assign the DahdiChannelString to be added to users.conf
- lets move the channels.each() after all the regular additions


Modified:
    branches/2.0/config/js/pbx2.js

Modified: branches/2.0/config/js/pbx2.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/pbx2.js?view=diff&rev=4721&r1=4720&r2=4721
==============================================================================
--- branches/2.0/config/js/pbx2.js (original)
+++ branches/2.0/config/js/pbx2.js Wed Apr  8 11:07:26 2009
@@ -1176,10 +1176,8 @@
 		trunk.signalling = '';
 		trunk.channel = '';
 		var zap_channels = ASTGUI.miscFunctions.chanStringToArray(chans);
-		zap_channels.each(function(ch) {
-			var ls = ASTGUI.cloneObject(sessionData.PORTS_SIGNALLING.ls);
-			var sg = (ls.contains(ch)) ? 'fxs_ls' : 'fxs_ks';
-		});
+
+		trunk[parent.sessionData.DahdiChannelString] = chans;
 
 		break;
 	case 'iax':
@@ -1210,7 +1208,6 @@
 	trunk.context = ct || '';
 	trunk.disallow = 'all';
 	trunk.group = group || null;
-	//DahdiChannelString ???
 	trunk.hasexten = 'no';
 	trunk.hasiax = (type === 'iax') ? 'yes' : 'no';
 	trunk.hassip = (type === 'sip') ? 'yes' : 'no';
@@ -1240,6 +1237,15 @@
 	users_conf.new_action('append', name, 'disallow', trunk['disallow']);
 	sessionData.pbxinfo.trunks[type][name]['allow'] = trunk['allow'];
 	users_conf.new_action('append', name, 'allow', trunk['allow']);
+
+	if (type === 'analog') {
+		zap_channels.each(function(ch) {
+			var ls = ASTGUI.cloneObject(sessionData.PORTS_SIGNALLING.ls);
+			var sg = (ls.contains(ch)) ? 'fxs_ls' : 'fxs_ks';
+			users_conf.new_action('append', name, 'signalling', sg);
+			users_conf.new_action('append', name, 'channel', ch);
+		});
+	}
 
 	/* TODO: get listOfActions to return a response so we know everythings ok! */
 	users_conf.callActions(function(){});




More information about the asterisk-gui-commits mailing list