[asterisk-dev] RTCP (SR) message is not scheduled to send back to UAC in case 2 UACs are the same codec.
Minh Duong
dtminh at tma.com.vn
Thu Jun 4 23:45:13 CDT 2009
Hi all,
RTCP (SR) message is not scheduled to send back to UAC in case 2 UACs are
the same codec.
I implemented a solution as below, please take a look and give your ideas.
In bridge_p2p_rtp_write function of rtp.c: add schedule sending RTCP into
else condition.
static int bridge_p2p_rtp_write(...)
....
res = sendto(...)
if (res < 0) {
} else if (rtp_debug_test_addr(&bridged->them)) {
ast_verbose(...);
// My code added begin
rtp->txcount++;
rtp->txoctetcount +=(res - hdrlen);
/* Do not schedule SR if RTCP isn't run */
if (rtp->rtcp && rtp->rtcp->them.sin_addr.s_addr &&
rtp->rtcp->schedid < 1) {
rtp->rtcp->schedid = ast_sched_add(rtp->sched,
ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
}
// My code added end
}
return 0;
}
Regards,
Minh Duong
Senior Consultant
TMA Solutions, 111 Nguyen Dinh Chinh, Phu Nhuan District, HCM City, Vietnam
Work: +84-8-3990-3848
Email: dtminh at tma.com.vn
Web: www.tmasolutions.com
More information about the asterisk-dev
mailing list