move code from uuid_kill into core

This commit is contained in:
Anthony Minessale
2011-10-25 11:53:22 -05:00
parent babe955160
commit 3c9551ee90
3 changed files with 21 additions and 10 deletions

View File

@@ -3201,6 +3201,20 @@ SWITCH_DECLARE(char *) switch_ivr_check_presence_mapping(const char *exten_name,
}
SWITCH_DECLARE(switch_status_t) switch_ivr_kill_uuid(const char *uuid, switch_call_cause_t cause)
{
switch_core_session_t *session;
if (zstr(uuid) || !(session = switch_core_session_locate(uuid))) {
return SWITCH_STATUS_FALSE;
} else {
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_hangup(channel, cause);
switch_core_session_rwunlock(session);
return SWITCH_STATUS_SUCCESS;
}
}
/* For Emacs:
* Local Variables: