mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-11 14:51:53 +00:00
[core] Add switch_core_session_set_external_id() which lets you define an additional identifier that you can use in switch_core_session_locate().
This commit is contained in:
committed by
Andrey Volk
parent
6da4f147de
commit
c2e240d6dc
@@ -189,6 +189,7 @@ struct switch_core_session {
|
||||
switch_buffer_t *text_buffer;
|
||||
switch_buffer_t *text_line_buffer;
|
||||
switch_mutex_t *text_mutex;
|
||||
const char *external_id;
|
||||
};
|
||||
|
||||
struct switch_media_bug {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Copyright (C) 2005-2020, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
@@ -804,6 +804,8 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(_In_ sw
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_uuid(_In_ switch_core_session_t *session, _In_z_ const char *use_uuid);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_set_external_id(_In_ switch_core_session_t *session, _In_z_ const char *use_external_id);
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_destroy(_Inout_ switch_core_session_t **session,
|
||||
_In_z_ const char *file, _In_z_ const char *func, _In_ int line);
|
||||
|
||||
@@ -875,6 +877,13 @@ SWITCH_DECLARE(void) switch_core_session_signal_state_change(_In_ switch_core_se
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_core_session_get_uuid(_In_ switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the unique external identifier from a session
|
||||
\param session the session to retrieve the uuid from
|
||||
\return a string representing the uuid
|
||||
*/
|
||||
SWITCH_DECLARE(const char *) switch_core_session_get_external_id(_In_ switch_core_session_t *session);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Sets the log level for a session
|
||||
|
||||
Reference in New Issue
Block a user