[Asterisk-cvs] asterisk/channels chan_iax2.c,1.188.2.3,1.188.2.4
russell at lists.digium.com
russell at lists.digium.com
Thu Oct 14 18:43:15 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15180/channels
Modified Files:
Tag: v1-0
chan_iax2.c
Log Message:
fix for attended transfers (bug #2632)
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.188.2.3
retrieving revision 1.188.2.4
diff -u -d -r1.188.2.3 -r1.188.2.4
--- chan_iax2.c 12 Oct 2004 02:25:38 -0000 1.188.2.3
+++ chan_iax2.c 14 Oct 2004 22:43:35 -0000 1.188.2.4
@@ -5152,7 +5152,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)
@@ -5174,12 +5176,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)) {
@@ -5889,6 +5897,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);
@@ -5933,7 +5942,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