pari: trunk r312 - /trunk/config/meetme.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 31 23:46:31 MST 2007


Author: pari
Date: Thu Feb  1 00:46:30 2007
New Revision: 312

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=312
Log:
Fix: When a 'New' Conference Bridge is clicked, the new Extension's number is not being calculated properly (always returning 6000)

Modified:
    trunk/config/meetme.html

Modified: trunk/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/meetme.html?view=diff&rev=312&r1=311&r2=312
==============================================================================
--- trunk/config/meetme.html (original)
+++ trunk/config/meetme.html Thu Feb  1 00:46:30 2007
@@ -135,10 +135,21 @@
 		var x;
 		var gen;
 		gen = $('hiddenusers').stored_config.catbyname['general'];
-		if (gen)
+		if (gen){
 			x = gen.fieldbyname['userbase'];
-		if (x)
-			tmp['name'] = first_free_exten($('extensions'), x);
+			for( var f=0; f < $('extensions').options.length ; f++ ){
+					if( x < $('extensions').options[f].innerHTML.split(' -- ')[0] )
+						break;
+					x++;
+			}
+		}else{
+				try{ 
+					x = ( parseInt($('extensions').options[$('extensions').options.length - 1 ].innerHTML.split(' -- ')[0] ) ) + 1; 
+				}catch(err){
+					x = 6000; // a default value if one is not defined in users.conf's general context
+				}
+		}
+		tmp['name'] = x ;
 		tmp['pin'] = '';
 		tmp['pinadmin'] = '';
 		tmp['music'] = 'yes';



More information about the asterisk-gui-commits mailing list