mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
first crack at multipart content in invites
This commit is contained in:
@@ -5805,10 +5805,6 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
char sip_acl_authed_by[512] = "";
|
||||
char sip_acl_token[512] = "";
|
||||
|
||||
if (sip->sip_multipart) {
|
||||
printf("W0000000t\n");
|
||||
}
|
||||
|
||||
profile->ib_calls++;
|
||||
|
||||
if (sess_count >= sess_max || !sofia_test_pflag(profile, PFLAG_RUNNING)) {
|
||||
@@ -6353,6 +6349,17 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sip->sip_multipart) {
|
||||
msg_multipart_t *mp;
|
||||
|
||||
for (mp = sip->sip_multipart; mp; mp = mp->mp_next) {
|
||||
if (mp->mp_payload && mp->mp_payload->pl_data && mp->mp_content_type && mp->mp_content_type->c_type) {
|
||||
switch_channel_set_variable_name_printf(channel, mp->mp_payload->pl_data, SOFIA_MULTIPART_PREFIX "%s", mp->mp_content_type->c_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sip->sip_max_forwards) {
|
||||
char max_forwards[32];
|
||||
switch_snprintf(max_forwards, sizeof(max_forwards), "%lu", sip->sip_max_forwards->mf_count);
|
||||
|
||||
Reference in New Issue
Block a user