Skip to content

Commit 0c0531e

Browse files
committed
Add iceGatheringTimeout for UaSettings.
1 parent 2ba90bd commit 0c0531e

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

lib/src/config.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class Settings {
5959
String jssip_id;
6060

6161
String hostport_params;
62+
63+
/// ICE Gathering Timeout (in millisecond).
64+
int ice_gathering_timeout = 500;
6265
}
6366

6467
// Configuration checks.

lib/src/rtc_session.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ class RTCSession extends EventManager {
16961696
* Because trickle ICE is not defined in the sip protocol, the delay of
16971697
* initiating a call to answer the call waiting will be unacceptable.
16981698
*/
1699-
setTimeout(() => ready(), 500);
1699+
setTimeout(() => ready(), ua.configuration.ice_gathering_timeout);
17001700
}
17011701
}
17021702
};

lib/src/sip_ua_helper.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ class SIPUAHelper extends EventManager {
116116
_settings.register_extra_contact_uri_params =
117117
uaSettings.registerParams.extraContactUriParams;
118118
_settings.dtmf_mode = uaSettings.dtmfMode;
119+
_settings.session_timers = uaSettings.sessionTimers;
120+
_settings.ice_gathering_timeout = uaSettings.iceGatheringTimeout;
119121

120122
try {
121123
_ua = UA(_settings);
@@ -640,6 +642,12 @@ class UaSettings {
640642
/// DTMF mode, in band (rfc2833) or out of band (sip info)
641643
DtmfMode dtmfMode = DtmfMode.INFO;
642644

645+
/// Session Timers
646+
bool sessionTimers = true;
647+
648+
/// ICE Gathering Timeout, default 500ms
649+
int iceGatheringTimeout = 500;
650+
643651
List<Map<String, String>> iceServers = <Map<String, String>>[
644652
<String, String>{'url': 'stun:stun.l.google.com:19302'},
645653
// turn server configuration example.

0 commit comments

Comments
 (0)