mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
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:
@@ -1043,6 +1043,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
myflags |= SOF_NO_EFFECTIVE_CID_NAME;
|
||||
}
|
||||
|
||||
if (vdata && (var_begin = switch_stristr("origination_uuid=", vdata))) {
|
||||
char tmp[512] = "";
|
||||
var_begin += strlen("origination_uuid=");
|
||||
var_end = strchr(var_begin, '|');
|
||||
if (var_end) {
|
||||
strncpy(tmp, var_begin, var_end-var_begin);
|
||||
} else {
|
||||
strncpy(tmp, var_begin, strlen(var_begin));
|
||||
}
|
||||
new_profile->caller_id_name = switch_core_strdup(new_profile->pool, tmp);
|
||||
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "origination_uuid", tmp);
|
||||
}
|
||||
|
||||
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "originate_early_media", early_ok ? "true" : "false");
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user