[Asterisk-cvs] asterisk/channels chan_iax2.c,1.280,1.281

markster at lists.digium.com markster at lists.digium.com
Sat May 14 20:02:12 CDT 2005


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

Modified Files:
	chan_iax2.c 
Log Message:
Fix one way audio problem with iax trunking (bug #4221)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -d -r1.280 -r1.281
--- chan_iax2.c	14 May 2005 23:57:44 -0000	1.280
+++ chan_iax2.c	15 May 2005 00:07:42 -0000	1.281
@@ -6187,9 +6187,10 @@
 									f.data = ptr;
 								else
 									f.data = NULL;
-								if(trunked_ts)
+								if(trunked_ts) {
 									fr.ts = trunked_ts;
-								else
+									fr.ts = (iaxs[fr.callno]->last & 0xFFFF0000L) | (fr.ts & 0xffff);
+								} else
 									fr.ts = fix_peerts(&rxtrunktime, fr.callno, ts);
 								/* Don't pass any packets until we're started */
 								if ((iaxs[fr.callno]->state & IAX_STATE_STARTED)) {
@@ -6207,11 +6208,22 @@
 									if (iaxs[fr.callno]->bridgecallno) {
 										forward_delivery(&fr);
 									} else {
-										schedule_delivery(iaxfrdup2(&fr), 1, updatehistory, 1);
+										duped_fr = iaxfrdup2(&fr);
+										schedule_delivery(duped_fr, 1, updatehistory, 1);
+										fr.ts = duped_fr->ts;
 									}
 #else
-									schedule_delivery(iaxfrdup2(&fr), 1, updatehistory, 1);
+									duped_fr = iaxfrdup2(&fr);
+									schedule_delivery(duped_fr, 1, updatehistory, 1);
+									fr.ts = duped_fr->ts;
+#endif
+									if (iaxs[fr.callno]->last < fr.ts) {
+										iaxs[fr.callno]->last = fr.ts;
+#if 1
+										if (option_debug)
+											ast_log(LOG_DEBUG, "For call=%d, set last=%d\n", fr.callno, fr.ts);
 #endif
+									}
 								}
 							} else {
 								ast_log(LOG_WARNING, "Datalen < 0?\n");




More information about the svn-commits mailing list