mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-18 01:04:13 +00:00
rtp timeout
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6093 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
0ec397f003
commit
b97f786f0f
6 files changed
+45
-5
No files matched your search
@@ -937,6 +937,8 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
switch_rtp_flag_t flags;
|
||||
switch_status_t status;
|
||||
char tmp[50];
|
||||
uint32_t rtp_timeout_sec = tech_pvt->profile->rtp_timeout_sec;
|
||||
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
|
||||
@@ -1061,6 +1063,20 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
}
|
||||
|
||||
|
||||
if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_timeout_sec"))) {
|
||||
int v = atoi(val);
|
||||
if (v >= 0) {
|
||||
rtp_timeout_sec = v;
|
||||
}
|
||||
}
|
||||
|
||||
if (rtp_timeout_sec) {
|
||||
uint32_t packets;
|
||||
packets = (tech_pvt->read_codec.implementation->samples_per_second * rtp_timeout_sec) /
|
||||
tech_pvt->read_codec.implementation->samples_per_frame;
|
||||
|
||||
switch_rtp_set_max_missed_packets(tech_pvt->rtp_session, packets);
|
||||
}
|
||||
|
||||
if (tech_pvt->te) {
|
||||
switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
|
||||
|
||||
Reference in new issue
Block a user