mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Fix one way audio problem with iax trunking (bug #4221)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6187,9 +6187,10 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
|
|||||||
f.data = ptr;
|
f.data = ptr;
|
||||||
else
|
else
|
||||||
f.data = NULL;
|
f.data = NULL;
|
||||||
if(trunked_ts)
|
if(trunked_ts) {
|
||||||
fr.ts = 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);
|
fr.ts = fix_peerts(&rxtrunktime, fr.callno, ts);
|
||||||
/* Don't pass any packets until we're started */
|
/* Don't pass any packets until we're started */
|
||||||
if ((iaxs[fr.callno]->state & IAX_STATE_STARTED)) {
|
if ((iaxs[fr.callno]->state & IAX_STATE_STARTED)) {
|
||||||
@@ -6207,11 +6208,22 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
|
|||||||
if (iaxs[fr.callno]->bridgecallno) {
|
if (iaxs[fr.callno]->bridgecallno) {
|
||||||
forward_delivery(&fr);
|
forward_delivery(&fr);
|
||||||
} else {
|
} 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
|
#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
|
#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 {
|
} else {
|
||||||
ast_log(LOG_WARNING, "Datalen < 0?\n");
|
ast_log(LOG_WARNING, "Datalen < 0?\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user