diff options
Diffstat (limited to 'main/rtp.c')
-rw-r--r-- | main/rtp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c index dcd6807b2..de50a0397 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -181,6 +181,7 @@ struct ast_rtp { struct sockaddr_in strict_rtp_address; /*!< Remote address information for strict RTP purposes */ int set_marker_bit:1; /*!< Whether to set the marker bit or not */ + unsigned int constantssrc:1; struct rtp_red *red; }; @@ -2604,12 +2605,19 @@ int ast_rtp_setqos(struct ast_rtp *rtp, int type_of_service, int class_of_servic return ast_netsock_set_qos(rtp->s, type_of_service, class_of_service, desc); } +void ast_rtp_set_constantssrc(struct ast_rtp *rtp) +{ + rtp->constantssrc = 1; +} + void ast_rtp_new_source(struct ast_rtp *rtp) { if (rtp) { rtp->set_marker_bit = 1; + if (!rtp->constantssrc) { + rtp->ssrc = ast_random(); + } } - return; } void ast_rtp_set_peer(struct ast_rtp *rtp, struct sockaddr_in *them) |