add 'direction' chan var

This commit is contained in:
Michael Jerris 2010-04-26 05:18:46 -04:00
parent 0bd2b3a9e4
commit 002896a4a2
1 changed files with 1 additions and 0 deletions

View 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;
}