]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add event header
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 5 Aug 2011 03:32:06 +0000 (22:32 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 5 Aug 2011 03:32:06 +0000 (22:32 -0500)
src/switch_channel.c

index 72aa68ea7fbfe18c322b843513d34b43719faf12..7dd43672a96580520d27f47839c5b982ea907656 100644 (file)
@@ -1847,6 +1847,10 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_running_state(
                                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Call-Direction",
                                                                                           channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
 
+                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-HIT-Dialplan", 
+                                                                                          switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND ||
+                                                                                          switch_channel_test_flag(channel, CF_DIALPLAN) ? "true" : "false");
+                               
                                if (switch_channel_down(channel)) {
                                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Answer-State", "hangup");
                                } else if (switch_channel_test_flag(channel, CF_ANSWERED)) {
@@ -2113,6 +2117,11 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Call-Direction",
                                                                   channel->direction == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
 
+       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-HIT-Dialplan", 
+                                                                  switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND ||
+                                                                  switch_channel_test_flag(channel, CF_DIALPLAN) ? "true" : "false");
+
+
        if ((v = switch_channel_get_variable(channel, "presence_id"))) {
                switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-ID", v);
        }