aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-19 02:33:54 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-19 02:33:54 +0000
commit317ea4ac670d935dfe129e1ab4f62bfea52c8cb5 (patch)
tree143eee9b1ed74e3baa22f2dfe1f9787f7fc776d6 /rtp.c
parente05c555e974184841d6802fc63ac04adb3e40ccd (diff)
Send a few more rfc2833 events on hte "down" (bug #3339)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@4843 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rtp.c b/rtp.c
index 69685da68..9b40b7980 100755
--- a/rtp.c
+++ b/rtp.c
@@ -1032,7 +1032,7 @@ int ast_rtp_senddigit(struct ast_rtp *rtp, char digit)
rtpheader[1] = htonl(rtp->lastts);
rtpheader[2] = htonl(rtp->ssrc);
rtpheader[3] = htonl((digit << 24) | (0xa << 16) | (0));
- for (x=0;x<4;x++) {
+ for (x=0;x<6;x++) {
if (rtp->them.sin_port && rtp->them.sin_addr.s_addr) {
res = sendto(rtp->s, (void *)rtpheader, hdrlen + 4, 0, (struct sockaddr *)&rtp->them, sizeof(rtp->them));
if (res <0)
@@ -1041,14 +1041,14 @@ int ast_rtp_senddigit(struct ast_rtp *rtp, char digit)
printf("Sent %d bytes of RTP data to %s:%d\n", res, ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr), ntohs(rtp->them.sin_port));
#endif
}
- if (x ==0) {
+ if (x == 2) {
/* Clear marker bit and increment seqno */
rtpheader[0] = htonl((2 << 30) | (payload << 16) | (rtp->seqno++));
/* Make duration 800 (100ms) */
rtpheader[3] |= htonl((800));
/* Set the End bit for the last 3 */
rtpheader[3] |= htonl((1 << 23));
- } else if ( x < 3) {
+ } else if ( x < 5) {
rtpheader[0] = htonl((2 << 30) | (payload << 16) | (rtp->seqno++));
}
}