[svn-commits] kharwell: trunk r406647 - /trunk/main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jan 27 15:09:35 CST 2014


Author: kharwell
Date: Mon Jan 27 15:09:33 2014
New Revision: 406647

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406647
Log:
manager: ExtensionStatus event status human readable

When an 'ExtensionStatus' event was raised it included the status as a
numerical value, but did not include a text description of the status.
Added a 'StatusText' field to the event which is a string representation
of the extension status.  Also added this to the 'Extension State' command
response.

(closes issue ASTERISK-23154)
Reported by: Jonathan Rose

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=406647&r1=406646&r2=406647
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jan 27 15:09:33 2014
@@ -4942,8 +4942,10 @@
 			   "Exten: %s\r\n"
 			   "Context: %s\r\n"
 			   "Hint: %s\r\n"
-			   "Status: %d\r\n\r\n",
-			   exten, context, hint, status);
+			   "Status: %d\r\n"
+		           "StatusText: %s\r\n\r\n",
+		      exten, context, hint, status,
+		      ast_extension_state2str(status));
 	return 0;
 }
 
@@ -6124,11 +6126,13 @@
 			"Exten: %s\r\n"
 			"Context: %s\r\n"
 			"Hint: %s\r\n"
-			"Status: %d\r\n",
+			"Status: %d\r\n"
+			"StatusText: %s\r\n",
 			exten,
 			context,
 			hint,
-			info->exten_state);
+			info->exten_state,
+			ast_extension_state2str(info->exten_state));
 		break;
 	case AST_HINT_UPDATE_PRESENCE:
 		/*** DOCUMENTATION




More information about the svn-commits mailing list