[Asterisk-cvs] asterisk/channels chan_iax2.c,1.206,1.207

markster at lists.digium.com markster at lists.digium.com
Wed Oct 13 23:58:11 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv9235/channels

Modified Files:
	chan_iax2.c 
Log Message:
Fix trasnfer issue (bug #2632)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -d -r1.206 -r1.207
--- chan_iax2.c	12 Oct 2004 19:54:54 -0000	1.206
+++ chan_iax2.c	14 Oct 2004 03:58:35 -0000	1.207
@@ -5160,7 +5160,9 @@
 			ast_mutex_unlock(&iaxsl[fr.callno]);
 		return 1;
 	}
-	if (!inaddrcmp(&sin, &iaxs[fr.callno]->addr) && !minivid)
+	if (!inaddrcmp(&sin, &iaxs[fr.callno]->addr) && !minivid &&
+		f.subclass != IAX_COMMAND_TXCNT &&		/* for attended transfer */
+		f.subclass != IAX_COMMAND_TXACC)		/* for attended transfer */
 		iaxs[fr.callno]->peercallno = (unsigned short)(ntohs(mh->callno) & ~IAX_FLAG_FULL);
 	if (ntohs(mh->callno) & IAX_FLAG_FULL) {
 		if (option_debug)
@@ -5182,12 +5184,18 @@
 		if ((iaxs[fr.callno]->iseqno != fr.oseqno) &&
 			(iaxs[fr.callno]->iseqno ||
 				((f.subclass != IAX_COMMAND_TXCNT) &&
+				(f.subclass != IAX_COMMAND_TXREADY) &&		/* for attended transfer */
+				(f.subclass != IAX_COMMAND_TXREL) &&		/* for attended transfer */
+				(f.subclass != IAX_COMMAND_UNQUELCH ) &&	/* for attended transfer */
 				(f.subclass != IAX_COMMAND_TXACC)) ||
-				(f.subclass != AST_FRAME_IAX))) {
+				(f.frametype != AST_FRAME_IAX))) {
 			if (
 			 ((f.subclass != IAX_COMMAND_ACK) &&
 			  (f.subclass != IAX_COMMAND_INVAL) &&
 			  (f.subclass != IAX_COMMAND_TXCNT) &&
+			  (f.subclass != IAX_COMMAND_TXREADY) &&		/* for attended transfer */
+			  (f.subclass != IAX_COMMAND_TXREL) &&		/* for attended transfer */
+			  (f.subclass != IAX_COMMAND_UNQUELCH ) &&	/* for attended transfer */
 			  (f.subclass != IAX_COMMAND_TXACC) &&
 			  (f.subclass != IAX_COMMAND_VNAK)) ||
 			  (f.frametype != AST_FRAME_IAX)) {
@@ -5897,6 +5905,7 @@
 				/* Send ack immediately, rather than waiting until we've changed addresses */
 				send_command_immediate(iaxs[fr.callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr.ts, NULL, 0,fr.iseqno);
 				complete_transfer(fr.callno, &ies);
+				stop_stuff(fr.callno);	/* for attended transfer to work with libiax */
 				break;	
 			case IAX_COMMAND_DPREP:
 				complete_dpreply(iaxs[fr.callno], &ies);
@@ -5941,7 +5950,7 @@
 		if (iaxs[fr.callno]->videoformat > 0) 
 			f.subclass = iaxs[fr.callno]->videoformat | (ntohs(vh->ts) & 0x8000 ? 1 : 0);
 		else {
-			ast_log(LOG_WARNING, "Received mini frame before first full voice frame\n ");
+			ast_log(LOG_WARNING, "Received mini frame before first full video frame\n ");
 			iax2_vnak(fr.callno);
 			ast_mutex_unlock(&iaxsl[fr.callno]);
 			return 1;




More information about the svn-commits mailing list