[asterisk-commits] murf: branch murf/bug6683 r70036 - in /team/murf/bug6683: ./ configs/ doc/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 19 12:26:08 CDT 2007


Author: murf
Date: Tue Jun 19 12:26:07 2007
New Revision: 70036

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70036
Log:
Merged revisions 69988,70001,70006 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r69988 | file | 2007-06-19 10:25:57 -0600 (Tue, 19 Jun 2007) | 18 lines

Merged revisions 69987 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r69987 | file | 2007-06-19 12:24:31 -0400 (Tue, 19 Jun 2007) | 10 lines

Merged revisions 69986 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69986 | file | 2007-06-19 12:21:29 -0400 (Tue, 19 Jun 2007) | 2 lines

Update BRIDGEPEER variable if set to the new channel name when a masquerade happens. (issue #9699 reported by dimas)

........

................

................
r70001 | murf | 2007-06-19 11:07:28 -0600 (Tue, 19 Jun 2007) | 1 line

These changes were submitted via bug 6683, to allow CID detection in India, with carriers that do Polarity/DTMF CID signalling.
................
r70006 | file | 2007-06-19 11:09:20 -0600 (Tue, 19 Jun 2007) | 18 lines

Merged revisions 70003 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r70003 | file | 2007-06-19 13:07:40 -0400 (Tue, 19 Jun 2007) | 10 lines

Merged revisions 69992 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r69992 | file | 2007-06-19 13:00:58 -0400 (Tue, 19 Jun 2007) | 2 lines

Handle the CC field in the RTP header. (issue #9384 reported by DoodleHu)

........

................

................

Added:
    team/murf/bug6683/doc/India-CID.txt
      - copied unchanged from r70006, trunk/doc/India-CID.txt
Modified:
    team/murf/bug6683/   (props changed)
    team/murf/bug6683/configs/zapata.conf.sample
    team/murf/bug6683/main/channel.c
    team/murf/bug6683/main/rtp.c

Propchange: team/murf/bug6683/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug6683/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jun 19 12:26:07 2007
@@ -1,1 +1,1 @@
-/trunk:1-69946
+/trunk:1-70023

Modified: team/murf/bug6683/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug6683/configs/zapata.conf.sample?view=diff&rev=70036&r1=70035&r2=70036
==============================================================================
--- team/murf/bug6683/configs/zapata.conf.sample (original)
+++ team/murf/bug6683/configs/zapata.conf.sample Tue Jun 19 12:26:07 2007
@@ -257,7 +257,9 @@
 ; What signals the start of caller ID
 ;     ring     = a ring signals the start
 ;     polarity = polarity reversal signals the start
-;     polarity_IN = polarity reversal signals the start, for India, for dtmf dialtone detection
+;     polarity_IN = polarity reversal signals the start, for India, 
+;                    for dtmf dialtone detection; using DTMF.
+;                    (see doc/India-CID.txt)
 ;
 ;cidstart=ring
 ;

Modified: team/murf/bug6683/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug6683/main/channel.c?view=diff&rev=70036&r1=70035&r2=70036
==============================================================================
--- team/murf/bug6683/main/channel.c (original)
+++ team/murf/bug6683/main/channel.c Tue Jun 19 12:26:07 2007
@@ -4088,7 +4088,13 @@
 				ast_check_hangup(c1) ? "Yes" : "No");
 			break;
 		}
-
+		
+		/* See if the BRIDGEPEER variable needs to be updated */
+		if (!ast_strlen_zero(pbx_builtin_getvar_helper(c0, "BRIDGEPEER")))
+			pbx_builtin_setvar_helper(c0, "BRIDGEPEER", c1->name);
+		if (!ast_strlen_zero(pbx_builtin_getvar_helper(c1, "BRIDGEPEER")))
+			pbx_builtin_setvar_helper(c1, "BRIDGEPEER", c0->name);
+		
 		if (c0->tech->bridge &&
 		    (config->timelimit == 0) &&
 		    (c0->tech->bridge == c1->tech->bridge) &&

Modified: team/murf/bug6683/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug6683/main/rtp.c?view=diff&rev=70036&r1=70035&r2=70036
==============================================================================
--- team/murf/bug6683/main/rtp.c (original)
+++ team/murf/bug6683/main/rtp.c Tue Jun 19 12:26:07 2007
@@ -1119,18 +1119,13 @@
 /*! \brief Perform a Packet2Packet RTP write */
 static int bridge_p2p_rtp_write(struct ast_rtp *rtp, struct ast_rtp *bridged, unsigned int *rtpheader, int len, int hdrlen)
 {
-	int res = 0, payload = 0, bridged_payload = 0, version, padding, mark, ext;
+	int res = 0, payload = 0, bridged_payload = 0, mark;
 	struct rtpPayloadType rtpPT;
-	unsigned int seqno;
-	
+	int reconstruct = ntohl(rtpheader[0]);
+
 	/* Get fields from packet */
-	seqno = ntohl(rtpheader[0]);
-	version = (seqno & 0xC0000000) >> 30;
-	payload = (seqno & 0x7f0000) >> 16;
-	padding = seqno & (1 << 29);
-	mark = (seqno & 0x800000) >> 23;
-	ext = seqno & (1 << 28);
-	seqno &= 0xffff;
+	payload = (reconstruct & 0x7f0000) >> 16;
+	mark = (((reconstruct & 0x800000) >> 23) != 0);
 
 	/* Check what the payload value should be */
 	rtpPT = ast_rtp_lookup_pt(rtp, payload);
@@ -1149,7 +1144,10 @@
 	}
 
 	/* Reconstruct part of the packet */
-	rtpheader[0] = htonl((version << 30) | (mark << 23) | (bridged_payload << 16) | (seqno));
+	reconstruct &= 0xFF80FFFF;
+	reconstruct |= (bridged_payload << 16);
+	reconstruct |= (mark << 23);
+	rtpheader[0] = htonl(reconstruct);
 
 	/* Send the packet back out */
 	res = sendto(bridged->s, (void *)rtpheader, len, 0, (struct sockaddr *)&bridged->them, sizeof(bridged->them));
@@ -1181,6 +1179,7 @@
 	int padding;
 	int mark;
 	int ext;
+	int cc;
 	unsigned int ssrc;
 	unsigned int timestamp;
 	unsigned int *rtpheader;
@@ -1259,6 +1258,7 @@
 	padding = seqno & (1 << 29);
 	mark = seqno & (1 << 23);
 	ext = seqno & (1 << 28);
+	cc = (seqno & 0xF000000) >> 24;
 	seqno &= 0xffff;
 	timestamp = ntohl(rtpheader[1]);
 	ssrc = ntohl(rtpheader[2]);
@@ -1276,10 +1276,15 @@
 		res -= rtp->rawdata[AST_FRIENDLY_OFFSET + res - 1];
 	}
 	
+	if (cc) {
+		/* CSRC fields present */
+		hdrlen += cc*4;
+	}
+
 	if (ext) {
 		/* RTP Extension present */
+		hdrlen += (ntohl(rtpheader[hdrlen/4]) & 0xffff) << 2;
 		hdrlen += 4;
-		hdrlen += (ntohl(rtpheader[3]) & 0xffff) << 2;
 		if (option_debug) {
 			int profile;
 			profile = (ntohl(rtpheader[3]) & 0xffff0000) >> 16;




More information about the asterisk-commits mailing list