rbrindley: branch rbrindley/welcome_revamp r4283 - /team/rbrindley/welcome_re...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Dec 4 13:22:28 CST 2008


Author: rbrindley
Date: Thu Dec  4 13:22:28 2008
New Revision: 4283

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

- implemented extensionstatus case in parseOutput
- added and framed manager_events.updateExtension function


Modified:
    team/rbrindley/welcome_revamp/config/js/welcome2.js

Modified: team/rbrindley/welcome_revamp/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/welcome2.js?view=diff&rev=4283&r1=4282&r2=4283
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Thu Dec  4 13:22:28 2008
@@ -553,6 +553,10 @@
 			break;
 		case 'event: dial':
 		case 'event: extensionstatus':
+			var exten = event[2].split(' ')[1];	//Exten: SIP/6000
+			var context = event[3].split(' ')[1];	//Context: default
+			var status = event[4].split(' ')[1];	//Status: 1
+			this.updateExtension(exten, context, status);
 		case 'event: hangup':
 		case 'event: musiconhold':
 		case 'event: join':
@@ -634,6 +638,23 @@
 	}
 };
 
+manager_events.updateExtension = function(exten, context, status) {
+	switch(status) {
+	case 0:	/* Unknown */
+	case 1:	/* Not In Use */
+	case 2:	/* In Use */
+	case 3:	/* Busy */
+	case 4:	/* Invalid */
+	case 5:	/* Unavailable */
+	case 6:	/* Ringing */
+	case 7:	/* Ringing In Use */
+	case 8:	/* On Hold */
+	default:
+		alert(status);
+		break;
+	}
+};
+
 var pushRow = function(tbody, cells) {
 	var new_row = $("<tr></tr>");
 	for (var i=0; i < cells.length; i++) {




More information about the asterisk-gui-commits mailing list