Add ability to choose uuid from originate string (use at your own risk)

[origination_uuid=someid]sofia/default/100@dom.com

it's only valid in [], cannot be used on 2 existing calls at once and is not
reccommended if you don't need it.

event_socket users can use it to do

api create_uuid   
#### (then save uuid into a local variable say $uuid) ###
filter unique-id $uuid
events all
originate [origination_uuid=$uuid]sofia/default/100@dom.com

Then you can get all the events in anticipation on that channel.

Anything people do to cause problems misusing this will not be supported.




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10239 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-11-04 16:46:33 +00:00
parent 807bef81ed
commit c9a24dd36e
8 changed files with 88 additions and 8 deletions
+4 -2
View File
@@ -502,9 +502,11 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(_In_ switch_
\param pool the pool to use for the allocation (a new one will be used if NULL)
\return the newly created session
*/
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(_In_ const switch_endpoint_interface_t *endpoint_interface,
_Inout_opt_ switch_memory_pool_t **pool);
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(_In_ const switch_endpoint_interface_t *endpoint_interface,
_Inout_opt_ switch_memory_pool_t **pool, _In_ const char *use_uuid);
#define switch_core_session_request(_ep, _p) switch_core_session_request_uuid(_ep, _p, NULL)
SWITCH_DECLARE(switch_status_t) switch_core_session_set_uuid(switch_core_session_t *session, const char *use_uuid);
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);
+2
View File
@@ -1038,6 +1038,7 @@ typedef uint32_t switch_io_flag_t;
SWITCH_EVENT_CHANNEL_UNPARK - A channel has been unparked
SWITCH_EVENT_CHANNEL_APPLICATION- A channel has called and event from an application
SWITCH_EVENT_CHANNEL_ORIGINATE - A channel has been originated
SWITCH_EVENT_CHANNEL_UUID - A channel has changed uuid
SWITCH_EVENT_API - An API call has been executed
SWITCH_EVENT_LOG - A LOG event has been triggered
SWITCH_EVENT_INBOUND_CHAN - A new inbound channel has been created
@@ -1095,6 +1096,7 @@ typedef enum {
SWITCH_EVENT_CHANNEL_UNPARK,
SWITCH_EVENT_CHANNEL_APPLICATION,
SWITCH_EVENT_CHANNEL_ORIGINATE,
SWITCH_EVENT_CHANNEL_UUID,
SWITCH_EVENT_API,
SWITCH_EVENT_LOG,
SWITCH_EVENT_INBOUND_CHAN,