Index: main/tdd.c =================================================================== --- main/tdd.c (revision 244040) +++ main/tdd.c (working copy) @@ -88,6 +88,7 @@ void tdd_init(void) { +/* Initialise only 0,1 missing 2,3 ? */ /* Initialize stuff for inverse FFT */ dr[0] = cos(TDD_SPACE * 2.0 * M_PI / 8000.0); di[0] = sin(TDD_SPACE * 2.0 * M_PI / 8000.0); Index: res/res_rtp_asterisk.c =================================================================== --- res/res_rtp_asterisk.c (revision 244040) +++ res/res_rtp_asterisk.c (working copy) @@ -484,8 +484,8 @@ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); struct sockaddr_in remote_address = { 0, }; int hdrlen = 12, res = 0, i = 0, payload = 101; - char data[256]; - unsigned int *rtpheader = (unsigned int*)data; + unsigned int data[64]; + unsigned int *rtpheader = data; ast_rtp_instance_get_remote_address(instance, &remote_address); @@ -553,8 +553,8 @@ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); struct sockaddr_in remote_address = { 0, }; int hdrlen = 12, res = 0; - char data[256]; - unsigned int *rtpheader = (unsigned int*)data; + unsigned int data[64]; /* why char 256? = uint 64 */ + unsigned int *rtpheader = data; ast_rtp_instance_get_remote_address(instance, &remote_address); @@ -564,11 +564,11 @@ } /* Actually create the packet we will be sending */ - rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno)); + rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno)); /* why set twice */ rtpheader[1] = htonl(rtp->lastdigitts); rtpheader[2] = htonl(rtp->ssrc); rtpheader[3] = htonl((rtp->send_digit << 24) | (0xa << 16) | (rtp->send_duration)); - rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno)); + rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno)); /* why set twice */ /* Boom, send it on out */ res = sendto(rtp->s, (void *) rtpheader, hdrlen + 4, 0, (struct sockaddr *) &remote_address, sizeof(remote_address)); @@ -596,8 +596,8 @@ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); struct sockaddr_in remote_address = { 0, }; int hdrlen = 12, res = 0, i = 0; - char data[256]; - unsigned int *rtpheader = (unsigned int*)data; + unsigned int data[64]; + unsigned int *rtpheader = data; ast_rtp_instance_get_remote_address(instance, &remote_address); @@ -625,12 +625,12 @@ rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000)); /* Construct the packet we are going to send */ - rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno)); + rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno)); /* twice? */ rtpheader[1] = htonl(rtp->lastdigitts); rtpheader[2] = htonl(rtp->ssrc); rtpheader[3] = htonl((digit << 24) | (0xa << 16) | (rtp->send_duration)); rtpheader[3] |= htonl((1 << 23)); - rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno)); + rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno)); /* twice? */ /* Send it 3 times, that's the magical number */ for (i = 0; i < 3; i++) {