set rtp params in skinny for rtp flush on bridge
This commit is contained in:
parent
75e0d9d885
commit
ec67542628
|
@ -1057,7 +1057,7 @@ switch_status_t channel_receive_message(switch_core_session_t *session, switch_c
|
||||||
|
|
||||||
case SWITCH_MESSAGE_INDICATE_DISPLAY:
|
case SWITCH_MESSAGE_INDICATE_DISPLAY:
|
||||||
skinny_session_send_call_info_all(session);
|
skinny_session_send_call_info_all(session);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
break;
|
||||||
|
|
||||||
case SWITCH_MESSAGE_INDICATE_PROGRESS:
|
case SWITCH_MESSAGE_INDICATE_PROGRESS:
|
||||||
if (!switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
if (!switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
||||||
|
@ -1065,13 +1065,26 @@ switch_status_t channel_receive_message(switch_core_session_t *session, switch_c
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
|
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
|
||||||
return channel_answer_channel(session);
|
return channel_answer_channel(session);
|
||||||
}
|
}
|
||||||
return SWITCH_STATUS_SUCCESS;
|
break;
|
||||||
|
|
||||||
|
case SWITCH_MESSAGE_INDICATE_BRIDGE:
|
||||||
|
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||||
|
rtp_flush_read_buffer(tech_pvt->rtp_session, SWITCH_RTP_FLUSH_STICK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
|
||||||
|
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||||
|
rtp_flush_read_buffer(tech_pvt->rtp_session, SWITCH_RTP_FLUSH_UNSTICK);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return SWITCH_STATUS_SUCCESS;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
|
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
|
||||||
|
|
|
@ -58,6 +58,8 @@ uint32_t soft_key_template_default_textids[] = {
|
||||||
SKINNY_TEXTID_IDIVERT
|
SKINNY_TEXTID_IDIVERT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define TEXT_ID_LEN 20
|
||||||
|
|
||||||
uint32_t soft_key_template_default_events[] = {
|
uint32_t soft_key_template_default_events[] = {
|
||||||
SOFTKEY_REDIAL,
|
SOFTKEY_REDIAL,
|
||||||
SOFTKEY_NEWCALL,
|
SOFTKEY_NEWCALL,
|
||||||
|
@ -1731,6 +1733,10 @@ switch_status_t skinny_handle_open_receive_channel_ack_message(listener_t *liste
|
||||||
switch_channel_t *channel = NULL;
|
switch_channel_t *channel = NULL;
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
|
|
||||||
|
flags[SWITCH_RTP_FLAG_DATAWAIT]++;
|
||||||
|
flags[SWITCH_RTP_FLAG_AUTOADJ]++;
|
||||||
|
flags[SWITCH_RTP_FLAG_RAW_WRITE]++;
|
||||||
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
|
|
||||||
|
@ -1954,7 +1960,7 @@ switch_status_t skinny_handle_unregister(listener_t *listener, skinny_message_t
|
||||||
|
|
||||||
switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, skinny_message_t *request)
|
switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, skinny_message_t *request)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
skinny_message_t *message;
|
skinny_message_t *message;
|
||||||
|
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
|
@ -1969,7 +1975,7 @@ switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, sk
|
||||||
message->data.soft_key_template.total_soft_key_count = 21;
|
message->data.soft_key_template.total_soft_key_count = 21;
|
||||||
|
|
||||||
memset(message->data.soft_key_template.soft_key, 0, sizeof(message->data.soft_key_template));
|
memset(message->data.soft_key_template.soft_key, 0, sizeof(message->data.soft_key_template));
|
||||||
for (i=0; i<sizeof(soft_key_template_default_textids); i++) {
|
for (i=0; i< TEXT_ID_LEN; i++) {
|
||||||
char *label = skinny_textid2raw(soft_key_template_default_textids[i]);
|
char *label = skinny_textid2raw(soft_key_template_default_textids[i]);
|
||||||
strcpy(message->data.soft_key_template.soft_key[i].soft_key_label, skinny_textid2raw(soft_key_template_default_textids[i]));
|
strcpy(message->data.soft_key_template.soft_key[i].soft_key_label, skinny_textid2raw(soft_key_template_default_textids[i]));
|
||||||
switch_safe_free(label);
|
switch_safe_free(label);
|
||||||
|
|
Loading…
Reference in New Issue