]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add 'direction' chan var
authorMichael Jerris <mike@jerris.com>
Mon, 26 Apr 2010 09:18:46 +0000 (05:18 -0400)
committerMichael Jerris <mike@jerris.com>
Mon, 26 Apr 2010 09:18:46 +0000 (05:18 -0400)
src/switch_channel.c

index acefec30dcbdaceedf4053ee891df0445d6087fe..e08bc4f63a4277da92b13b632c4355f4b2caf678 100644 (file)
@@ -241,6 +241,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel,
        (*channel)->hangup_cause = SWITCH_CAUSE_NONE;
        (*channel)->name = "";
        (*channel)->direction = direction;
+       switch_channel_set_variable(*channel, "direction", switch_channel_direction(*channel) == SWITCH_CALL_DIRECTION_OUTBOUND ? "outbound" : "inbound");
 
        return SWITCH_STATUS_SUCCESS;
 }