[Asterisk-cvs] asterisk rtp.c,1.81,1.82
markster at lists.digium.com
markster at lists.digium.com
Sat Jul 31 16:45:09 CDT 2004
Update of /usr/cvsroot/asterisk
In directory localhost.localdomain:/tmp/cvs-serv8209
Modified Files:
rtp.c
Log Message:
Don't hard code the RTP payload type to 101 (bug #2192)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- rtp.c 19 Jul 2004 18:09:33 -0000 1.81
+++ rtp.c 31 Jul 2004 20:31:11 -0000 1.82
@@ -965,6 +965,7 @@
int res;
int ms;
int x;
+ int payload;
char data[256];
char iabuf[INET_ADDRSTRLEN];
@@ -982,7 +983,7 @@
ast_log(LOG_WARNING, "Don't know how to represent '%c'\n", digit);
return -1;
}
-
+ payload = ast_rtp_lookup_code(rtp, 0, AST_RTP_DTMF);
/* If we have no peer, return immediately */
if (!rtp->them.sin_addr.s_addr)
@@ -1001,7 +1002,7 @@
/* Get a pointer to the header */
rtpheader = (unsigned int *)data;
- rtpheader[0] = htonl((2 << 30) | (1 << 23) | (101 << 16) | (rtp->seqno++));
+ rtpheader[0] = htonl((2 << 30) | (1 << 23) | (payload << 16) | (rtp->seqno++));
rtpheader[1] = htonl(rtp->lastts);
rtpheader[2] = htonl(rtp->ssrc);
rtpheader[3] = htonl((digit << 24) | (0xa << 16) | (0));
More information about the svn-commits
mailing list