diff --git a/src/switch_rtp.c b/src/switch_rtp.c index d625d18abd..5e4d1536c4 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -127,6 +127,7 @@ struct switch_rtp { uint32_t autoadj_tally; uint16_t seq; + uint32_t ssrc; uint8_t sending_dtmf; switch_payload_t payload; switch_payload_t rpayload; @@ -537,6 +538,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activating Secure RTP!\n"); } + rtp_session->ssrc = ssrc; rtp_session->seq = (uint16_t) rand(); rtp_session->send_msg.header.ssrc = htonl(ssrc); rtp_session->send_msg.header.ts = 0; @@ -1300,6 +1302,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session, if (flags && *flags & SFF_RFC2833) { send_msg->header.pt = rtp_session->te; } + send_msg->header.ssrc = htonl(rtp_session->ssrc); } else { uint8_t m = 0;