mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-06 19:19:16 +00:00
Tweak call failure timeouts
This commit is contained in:
parent
fd111a4d1f
commit
fb6090917a
@ -347,7 +347,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#define VOMP_CODEC_CHANGEYOURCODECTO 0xff
|
#define VOMP_CODEC_CHANGEYOURCODECTO 0xff
|
||||||
|
|
||||||
/* in milliseconds of inactivity */
|
/* in milliseconds of inactivity */
|
||||||
#define VOMP_CALL_TIMEOUT 120000
|
// 20 seconds to start ringing
|
||||||
|
#define VOMP_CALL_DIAL_TIMEOUT 5000
|
||||||
|
// 60 seconds to answer
|
||||||
|
#define VOMP_CALL_RING_TIMEOUT 60000
|
||||||
|
// 2 minutes of zero network traffic
|
||||||
|
#define VOMP_CALL_NETWORK_TIMEOUT 120000
|
||||||
|
// force state packet interval
|
||||||
#define VOMP_CALL_STATUS_INTERVAL 1000
|
#define VOMP_CALL_STATUS_INTERVAL 1000
|
||||||
|
|
||||||
#define DEFAULT_MONITOR_SOCKET_NAME "org.servalproject.servald.monitor.socket"
|
#define DEFAULT_MONITOR_SOCKET_NAME "org.servalproject.servald.monitor.socket"
|
||||||
|
21
vomp.c
21
vomp.c
@ -1567,18 +1567,15 @@ static void vomp_process_tick(struct sched_ent *alarm)
|
|||||||
|
|
||||||
struct vomp_call_state *call = (struct vomp_call_state *)alarm;
|
struct vomp_call_state *call = (struct vomp_call_state *)alarm;
|
||||||
|
|
||||||
/* See if any calls need to begin expiring
|
/* See if any calls need to be expired.
|
||||||
(current timeout is set at 2 minutes) */
|
Allow VOMP_CALL_DIAL_TIMEOUT ms for the other party to ring / request ringing
|
||||||
if (call->local.state<VOMP_STATE_INCALL
|
Allow VOMP_CALL_RING_TIMEOUT ms for the ringing party to answer
|
||||||
&&((call->create_time+VOMP_CALL_TIMEOUT)<now))
|
Allow VOMP_CALL_NETWORK_TIMEOUT ms between received packets
|
||||||
{
|
*/
|
||||||
/* timeout calls that haven't reached INCALL status, e.g.,
|
|
||||||
ringing. As well as sensible UX, it also prevents our call
|
if ((call->remote.state < VOMP_STATE_RINGINGOUT && call->create_time + VOMP_CALL_DIAL_TIMEOUT < now) ||
|
||||||
slots getting full of cruft. */
|
(call->local.state < VOMP_STATE_INCALL && call->create_time + VOMP_CALL_RING_TIMEOUT < now) ||
|
||||||
vomp_call_destroy(call);
|
(call->last_activity+VOMP_CALL_NETWORK_TIMEOUT<now) ){
|
||||||
return;
|
|
||||||
} else if (call->last_activity+VOMP_CALL_TIMEOUT<now){
|
|
||||||
/* Call timed out, so just immmediately tear the call down */
|
|
||||||
vomp_call_destroy(call);
|
vomp_call_destroy(call);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user