]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-2913
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 13 Dec 2010 15:36:45 +0000 (09:36 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 13 Dec 2010 17:20:23 +0000 (11:20 -0600)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 74f5d3d764468b6445da1b23a4c48c6667dc671d..65aedd34311b25c16ac35b690eff9427dd48d879 100644 (file)
@@ -5060,9 +5060,20 @@ static int recover_callback(void *pArg, int argc, char **argv, char **columnName
                const char *port = switch_channel_get_variable(channel, SWITCH_LOCAL_MEDIA_PORT_VARIABLE);
                const char *r_ip = switch_channel_get_variable(channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE);
                const char *r_port = switch_channel_get_variable(channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE);
+               const char *use_uuid;
 
                sofia_set_flag(tech_pvt, TFLAG_RECOVERING);
 
+               if ((use_uuid = switch_channel_get_variable(channel, "origination_uuid"))) {
+                       if (switch_core_session_set_uuid(session, use_uuid) == SWITCH_STATUS_SUCCESS) {
+                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s set UUID=%s\n", switch_channel_get_name(channel),
+                                                                 use_uuid);
+                       } else {
+                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "%s set UUID=%s FAILED\n",
+                                                                 switch_channel_get_name(channel), use_uuid);
+                       }
+               }
+
                if (!switch_channel_test_flag(channel, CF_PROXY_MODE) && ip && port) {
                        const char *tmp;
                        tech_pvt->iananame = tech_pvt->rm_encoding = (char *) switch_channel_get_variable(channel, "sip_use_codec_name");