[svn-commits] file: branch file/originate_dial r387575 - /team/file/originate_dial/main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri May 3 11:03:39 CDT 2013
Author: file
Date: Fri May 3 11:03:37 2013
New Revision: 387575
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387575
Log:
Use DialBegin and DialEnd for originated calls as well.
Modified:
team/file/originate_dial/main/manager_channels.c
Modified: team/file/originate_dial/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/file/originate_dial/main/manager_channels.c?view=diff&rev=387575&r1=387574&r2=387575
==============================================================================
--- team/file/originate_dial/main/manager_channels.c (original)
+++ team/file/originate_dial/main/manager_channels.c Fri May 3 11:03:37 2013
@@ -793,33 +793,30 @@
return;
}
- if (caller) {
- caller_event_string = ast_manager_build_channel_state_string(caller);
- if (!caller_event_string) {
- return;
- }
- 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"));
- if (ast_strlen_zero(dialstatus)) {
- manager_event(EVENT_FLAG_CALL, "DialBegin",
- "%s"
- "%s"
- "DialString: %s\r\n",
- ast_str_buffer(caller_event_string),
- ast_str_buffer(peer_event_string),
- S_OR(dialstring, "unknown"));
- } else {
- manager_event(EVENT_FLAG_CALL, "DialEnd",
- "%s"
- "%s"
- "DialStatus: %s\r\n",
- ast_str_buffer(caller_event_string),
- ast_str_buffer(peer_event_string),
- S_OR(dialstatus, "unknown"));
- }
+ if (caller && !(caller_event_string = ast_manager_build_channel_state_string(caller))) {
+ return;
+ }
+
+ 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"));
+ if (ast_strlen_zero(dialstatus)) {
+ manager_event(EVENT_FLAG_CALL, "DialBegin",
+ "%s"
+ "%s"
+ "DialString: %s\r\n",
+ caller_event_string ? ast_str_buffer(caller_event_string) : "",
+ ast_str_buffer(peer_event_string),
+ S_OR(dialstring, "unknown"));
} else {
- /* TODO: If we don't have a caller, this should be treated as an Originate */
- }
+ manager_event(EVENT_FLAG_CALL, "DialEnd",
+ "%s"
+ "%s"
+ "DialStatus: %s\r\n",
+ caller_event_string ? ast_str_buffer(caller_event_string) : "",
+ ast_str_buffer(peer_event_string),
+ S_OR(dialstatus, "unknown"));
+ }
+
}
static void manager_channels_shutdown(void)
More information about the svn-commits
mailing list