[asterisk-commits] murf: trunk r46541 - in /trunk: apps/app_dial.c utils/astman.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Oct 30 16:11:56 MST 2006


Author: murf
Date: Mon Oct 30 17:11:55 2006
New Revision: 46541

URL: http://svn.digium.com/view/asterisk?rev=46541&view=rev
Log:
These changes submitted by moy via bug 6992, to add a Dial 'End' event to asterisk. I include some changes to astman to cover other events that have been added.

Modified:
    trunk/apps/app_dial.c
    trunk/utils/astman.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=46541&r1=46540&r2=46541&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Mon Oct 30 17:11:55 2006
@@ -374,6 +374,7 @@
 static void senddialevent(struct ast_channel *src, struct ast_channel *dst)
 {
 	manager_event(EVENT_FLAG_CALL, "Dial", 
+			   "SubEvent: Begin\r\n"
 			   "Source: %s\r\n"
 			   "Destination: %s\r\n"
 			   "CallerIDNum: %s\r\n"
@@ -384,6 +385,15 @@
 			   S_OR(src->cid.cid_name, "<unknown>"), src->uniqueid,
 			   dst->uniqueid);
 }
+
+static void senddialendevent(const struct ast_channel *src, const char *dialstatus)
+{
+	manager_event(EVENT_FLAG_CALL, "Dial",
+			   		"SubEvent: End\r\n"
+					"Channel: %s\r\n"
+					"DialStatus: %s\r\n",
+					src->name, dialstatus);
+}	
 
 static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_localuser *outgoing, int *to, struct ast_flags *peerflags, int *sentringing, char *status, size_t statussize, int busystart, int nochanstart, int congestionstart, int priority_jump, int *result)
 {
@@ -1635,6 +1645,7 @@
 	ast_channel_early_bridge(chan, NULL);
 	hanguptree(outgoing, NULL);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
+	senddialendevent(chan, status);
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
 	

Modified: trunk/utils/astman.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/astman.c?rev=46541&r1=46540&r2=46541&view=diff
==============================================================================
--- trunk/utils/astman.c (original)
+++ trunk/utils/astman.c Mon Oct 30 17:11:55 2006
@@ -226,6 +226,8 @@
 	{ "Unlink", event_ignore },
 	{ "StatusComplete", event_ignore },
 	{ "Dial", event_ignore },
+	{ "PeerStatus", event_ignore },
+	{ "MessageWaiting", event_ignore },
 	{ "Newcallerid", event_ignore }
 };
 



More information about the asterisk-commits mailing list