add handy functions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9641 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b4ed07c5c5
commit
99ba73c4a0
|
@ -112,6 +112,9 @@ SWITCH_DECLARE(switch_call_cause_t) switch_channel_str2cause(_In_ const char *st
|
|||
*/
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause(_In_ switch_channel_t *channel);
|
||||
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_cause_q850(switch_call_cause_t cause);
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause_q850(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief return a cause string for a given cause
|
||||
\param cause the code to check
|
||||
|
|
|
@ -165,6 +165,20 @@ SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause(switch_channel_t *c
|
|||
return channel->hangup_cause;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_cause_q850(switch_call_cause_t cause)
|
||||
{
|
||||
if (cause <= SWITCH_CAUSE_INTERWORKING) {
|
||||
return cause;
|
||||
} else {
|
||||
return SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause_q850(switch_channel_t *channel)
|
||||
{
|
||||
return switch_channel_cause_q850(channel->hangup_cause);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch_channel_t *channel)
|
||||
{
|
||||
switch_channel_timetable_t *times = NULL;
|
||||
|
|
Loading…
Reference in New Issue