Compare commits
3 Commits
3118a1f659
...
3b417ccefa
Author | SHA1 | Date |
---|---|---|
netplanetat | 3b417ccefa | |
leecher1337 | 6d4776e178 | |
leecher1337 | 52617a0a3b |
|
@ -11171,7 +11171,9 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
|||
|
||||
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) {
|
||||
char *val = switch_core_session_sprintf(session, "%s:%s", mp->mp_content_type->c_type, mp->mp_payload->pl_data);
|
||||
char *val;
|
||||
if (mp->mp_content_id) val = switch_core_session_sprintf(session, "%s:~Content-ID: %s\r\n\r\n%s", mp->mp_content_type->c_type, mp->mp_content_id->g_string, mp->mp_payload->pl_data);
|
||||
else val = switch_core_session_sprintf(session, "%s:%s", mp->mp_content_type->c_type, mp->mp_payload->pl_data);
|
||||
switch_channel_add_variable_var_check(channel, "sip_multipart", val, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3234,7 +3234,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_read_frame(switch_core_session
|
|||
|
||||
|
||||
if (type == SWITCH_MEDIA_TYPE_TEXT && !switch_test_flag((&engine->read_frame), SFF_CNG)) {
|
||||
if (engine->red_pt) {
|
||||
if (engine->red_pt == engine->read_frame.payload) {
|
||||
unsigned char *p = engine->read_frame.data;
|
||||
|
||||
*(p + engine->read_frame.datalen) = '\0';
|
||||
|
@ -5892,6 +5892,25 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||
|
||||
got_text++;
|
||||
|
||||
switch_core_media_set_rmode(smh->session, SWITCH_MEDIA_TYPE_TEXT, sdp_media_flow(m->m_mode), sdp_type);
|
||||
|
||||
if (sdp_type == SDP_TYPE_REQUEST) {
|
||||
switch(t_engine->rmode) {
|
||||
case SWITCH_MEDIA_FLOW_RECVONLY:
|
||||
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_FLOW_SENDONLY, sdp_type);
|
||||
break;
|
||||
case SWITCH_MEDIA_FLOW_SENDONLY:
|
||||
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_FLOW_RECVONLY, sdp_type);
|
||||
break;
|
||||
case SWITCH_MEDIA_FLOW_INACTIVE:
|
||||
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_FLOW_INACTIVE, sdp_type);
|
||||
break;
|
||||
default:
|
||||
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_FLOW_SENDRECV, sdp_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
||||
payload_map_t *pmap;
|
||||
|
||||
|
|
Loading…
Reference in New Issue