diff options
-rw-r--r-- | res/res_rtp_asterisk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index ed91eaec8..3f19dbdeb 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -4184,8 +4184,7 @@ static int ast_rtp_sendcng(struct ast_rtp_instance *instance, int level) { unsigned int *rtpheader; int hdrlen = 12; - int res; - int payload; + int res, payload = 0; char data[256]; struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); struct ast_sockaddr remote_address = { {0,} }; @@ -4205,7 +4204,7 @@ static int ast_rtp_sendcng(struct ast_rtp_instance *instance, int level) /* Get a pointer to the header */ rtpheader = (unsigned int *)data; - rtpheader[0] = htonl((2 << 30) | (1 << 23) | (payload << 16) | (rtp->seqno++)); + rtpheader[0] = htonl((2 << 30) | (payload << 16) | (rtp->seqno)); rtpheader[1] = htonl(rtp->lastts); rtpheader[2] = htonl(rtp->ssrc); data[12] = level; @@ -4226,6 +4225,8 @@ static int ast_rtp_sendcng(struct ast_rtp_instance *instance, int level) AST_RTP_CN, rtp->seqno, rtp->lastdigitts, res - hdrlen); } + rtp->seqno++; + return res; } |