diff --git a/lib/src/ua.dart b/lib/src/ua.dart index 36eddc94..67d65a48 100644 --- a/lib/src/ua.dart +++ b/lib/src/ua.dart @@ -880,8 +880,14 @@ class UA extends EventManager { // User no_answer_timeout. _configuration.no_answer_timeout *= 1000; + //Default transport initialization String transport = _configuration.transportType?.name ?? 'WS'; + //Override transport from socket + if(transport == 'WS' && _socketTransport != null){ + transport = _socketTransport!.via_transport; + } + // Via Host. if (_configuration.contact_uri != null) { _configuration.via_host = _configuration.contact_uri.host;