[asterisk-commits] kmoore: branch kmoore/cel_cleanup r392314 - in /team/kmoore/cel_cleanup: apps...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 20 09:02:00 CDT 2013


Author: kmoore
Date: Thu Jun 20 09:01:56 2013
New Revision: 392314

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392314
Log:
Some cleanup before posting

Modified:
    team/kmoore/cel_cleanup/apps/app_dial.c
    team/kmoore/cel_cleanup/apps/app_queue.c
    team/kmoore/cel_cleanup/include/asterisk/stasis_channels.h
    team/kmoore/cel_cleanup/main/cdr.c
    team/kmoore/cel_cleanup/main/cel.c
    team/kmoore/cel_cleanup/main/manager_channels.c
    team/kmoore/cel_cleanup/main/stasis_channels.c

Modified: team/kmoore/cel_cleanup/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/apps/app_dial.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/apps/app_dial.c (original)
+++ team/kmoore/cel_cleanup/apps/app_dial.c Thu Jun 20 09:01:56 2013
@@ -1002,8 +1002,8 @@
 			ast_channel_unlock(c);
 
 			ast_channel_lock_both(original, in);
-			ast_channel_publish_dial_forward(in, original, ast_channel_call_forward(c));
-			ast_channel_publish_dial(in, original, NULL, "CANCEL");
+			ast_channel_publish_dial_forward(in, original, NULL, "CANCEL",
+				ast_channel_call_forward(c));
 			ast_channel_unlock(in);
 			ast_channel_unlock(original);
 

Modified: team/kmoore/cel_cleanup/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/apps/app_queue.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/apps/app_queue.c (original)
+++ team/kmoore/cel_cleanup/apps/app_queue.c Thu Jun 20 09:01:56 2013
@@ -4542,8 +4542,8 @@
 					ast_channel_unlock(qe->chan);
 
 					ast_channel_lock_both(qe->chan, original);
-					ast_channel_publish_dial_forward(qe->chan, original, ast_channel_call_forward(original));
-					ast_channel_publish_dial(qe->chan, original, NULL, "CANCEL");
+					ast_channel_publish_dial_forward(qe->chan, original, NULL, "CANCEL",
+						ast_channel_call_forward(original));
 					ast_channel_unlock(original);
 					ast_channel_unlock(qe->chan);
 					/* Hangup the original channel now, in case we needed it */

Modified: team/kmoore/cel_cleanup/include/asterisk/stasis_channels.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/include/asterisk/stasis_channels.h?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/include/asterisk/stasis_channels.h (original)
+++ team/kmoore/cel_cleanup/include/asterisk/stasis_channels.h Thu Jun 20 09:01:56 2013
@@ -462,10 +462,14 @@
  *
  * \param caller The channel performing the dial operation
  * \param peer The channel being dialed
+ * \param dialstring The information passed to the dialing application when beginning a dial
+ * \param dialstatus The current status of the dial operation
  * \param forward The call forward string provided by the dialed channel
  */
 void ast_channel_publish_dial_forward(struct ast_channel *caller,
 		struct ast_channel *peer,
+		const char *dialstring,
+		const char *dialstatus,
 		const char *forward);
 
 /*!

Modified: team/kmoore/cel_cleanup/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/main/cdr.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/main/cdr.c (original)
+++ team/kmoore/cel_cleanup/main/cdr.c Thu Jun 20 09:01:56 2013
@@ -1692,7 +1692,6 @@
 	struct cdr_object_snapshot *party_b;
 	struct cdr_object *it_cdr;
 	struct ast_json *dial_status_blob;
-	struct ast_json *dial_forward_blob;
 	const char *dial_status = NULL;
 	int res = 1;
 
@@ -1707,11 +1706,6 @@
 	dial_status_blob = ast_json_object_get(ast_multi_channel_blob_get_json(payload), "dialstatus");
 	if (dial_status_blob) {
 		dial_status = ast_json_string_get(dial_status_blob);
-	}
-
-	dial_forward_blob = ast_json_object_get(ast_multi_channel_blob_get_json(payload), "forward");
-	if (dial_forward_blob && !ast_strlen_zero(ast_json_string_get(dial_forward_blob))) {
-		return;
 	}
 
 	/* Figure out who is running this show */

Modified: team/kmoore/cel_cleanup/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/main/cel.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/main/cel.c (original)
+++ team/kmoore/cel_cleanup/main/cel.c Thu Jun 20 09:01:56 2013
@@ -1414,7 +1414,6 @@
 		}
 
 		report_event_snapshot(caller, AST_CEL_FORWARD, NULL, get_blob_variable(blob, "forward"), NULL);
-		return;
 	}
 
 	if (ast_strlen_zero(get_blob_variable(blob, "dialstatus"))) {

Modified: team/kmoore/cel_cleanup/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/main/manager_channels.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/main/manager_channels.c (original)
+++ team/kmoore/cel_cleanup/main/manager_channels.c Thu Jun 20 09:01:56 2013
@@ -1150,7 +1150,6 @@
 	struct ast_multi_channel_blob *obj = stasis_message_data(message);
 	const char *dialstatus;
 	const char *dialstring;
-	const char *forward;
 	struct ast_channel_snapshot *caller;
 	struct ast_channel_snapshot *peer;
 	RAII_VAR(struct ast_str *, caller_event_string, NULL, ast_free);
@@ -1172,13 +1171,7 @@
 
 	dialstatus = ast_json_string_get(ast_json_object_get(ast_multi_channel_blob_get_json(obj), "dialstatus"));
 	dialstring = ast_json_string_get(ast_json_object_get(ast_multi_channel_blob_get_json(obj), "dialstring"));
-	forward = ast_json_string_get(ast_json_object_get(ast_multi_channel_blob_get_json(obj), "forward"));
-	if (!ast_strlen_zero(forward)) {
-		/* Handle forward during dialing */
-		return;
-	}
-	
-	if (!ast_strlen_zero(dialstring)) {
+	if (ast_strlen_zero(dialstatus)) {
 		manager_event(EVENT_FLAG_CALL, "DialBegin",
 				"%s"
 				"%s"
@@ -1186,10 +1179,7 @@
 				caller_event_string ? ast_str_buffer(caller_event_string) : "",
 				ast_str_buffer(peer_event_string),
 				S_OR(dialstring, "unknown"));
-		return;
-	}
-	
-	if (!ast_strlen_zero(dialstatus)) {
+	} else {
 		manager_event(EVENT_FLAG_CALL, "DialEnd",
 				"%s"
 				"%s"
@@ -1197,8 +1187,8 @@
 				caller_event_string ? ast_str_buffer(caller_event_string) : "",
 				ast_str_buffer(peer_event_string),
 				S_OR(dialstatus, "unknown"));
-		return;
-	}
+	}
+
 }
 
 static void channel_hold_cb(void *data, struct stasis_subscription *sub,

Modified: team/kmoore/cel_cleanup/main/stasis_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_cleanup/main/stasis_channels.c?view=diff&rev=392314&r1=392313&r2=392314
==============================================================================
--- team/kmoore/cel_cleanup/main/stasis_channels.c (original)
+++ team/kmoore/cel_cleanup/main/stasis_channels.c Thu Jun 20 09:01:56 2013
@@ -210,7 +210,7 @@
 	ast_json_unref(event->blob);
 }
 
-static void publish_dial_full(struct ast_channel *caller, struct ast_channel *peer,
+void ast_channel_publish_dial_forward(struct ast_channel *caller, struct ast_channel *peer,
 	const char *dialstring, const char *dialstatus, const char *forward)
 {
 	RAII_VAR(struct ast_multi_channel_blob *, payload, NULL, ao2_cleanup);
@@ -257,13 +257,7 @@
 void ast_channel_publish_dial(struct ast_channel *caller, struct ast_channel *peer,
 	const char *dialstring, const char *dialstatus)
 {
-	publish_dial_full(caller, peer, dialstring, dialstatus, NULL);
-}
-
-void ast_channel_publish_dial_forward(struct ast_channel *caller, struct ast_channel *peer,
-	const char *forward)
-{
-	publish_dial_full(caller, peer, NULL, NULL, forward);
+	ast_channel_publish_dial_forward(caller, peer, dialstring, dialstatus, NULL);
 }
 
 static struct stasis_message *create_channel_blob_message(struct ast_channel_snapshot *snapshot,




More information about the asterisk-commits mailing list