]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
adding content-disposition to SEND_INFO
authorBrian West <brian@freeswitch.org>
Tue, 17 Nov 2009 16:46:34 +0000 (16:46 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 17 Nov 2009 16:46:34 +0000 (16:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15495 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 0ae482a3a34d1611f681d13c13837b528d53d371..89a545a82d873881e35089455a3ffafde3002c24 100644 (file)
@@ -3454,6 +3454,7 @@ static void general_event_handler(switch_event_t *event)
                {
                        const char *profile_name = switch_event_get_header(event, "profile");
                        const char *ct = switch_event_get_header(event, "content-type");
+                       const char *cd = switch_event_get_header(event, "content-disposition");
                        const char *to_uri = switch_event_get_header(event, "to-uri");
                        const char *local_user_full = switch_event_get_header(event, "local-user");
                        const char *from_uri = switch_event_get_header(event, "from-uri");
@@ -3496,30 +3497,27 @@ static void general_event_handler(switch_event_t *event)
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Call-ID %s\n", call_id);
                                        goto done;
                                }
-                       }
-
-                       else {
+                       } else {
                                if (local_user_full) {
                                        local_dup = strdup(local_user_full);
                                        local_user = local_dup;
                                        if ((local_host = strchr(local_user, '@'))) {
                                                *local_host++ = '\0';
                                        }
-
+                                       
                                        if (!local_user || !local_host || !sofia_reg_find_reg_url(profile, local_user, local_host, buf, sizeof(buf))) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't find local user\n");
                                                goto done;
                                        }
-
+                                       
                                        to_uri = sofia_glue_get_url_from_contact(buf, 0);
                                        
                                        if ((p = strstr(to_uri, ";fs_"))) {
                                                *p = '\0';
                                        }
-
+                                       
                                }
 
-
                                nh = nua_handle(profile->nua, 
                                                                NULL, 
                                                                NUTAG_URL(to_uri), 
@@ -3534,6 +3532,7 @@ static void general_event_handler(switch_event_t *event)
                        nua_info(nh,
                                         NUTAG_WITH_THIS(profile->nua),
                                         TAG_IF(ct, SIPTAG_CONTENT_TYPE_STR(ct)),
+                                        TAG_IF(cd, SIPTAG_CONTENT_DISPOSITION_STR(cd)),
                                         TAG_IF(alert_info, SIPTAG_ALERT_INFO_STR(alert_info)),
                                         TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)),
                                         TAG_IF(!zstr(body), SIPTAG_PAYLOAD_STR(body)),