You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
I am using "linphone sdk 5.3.100" for programming an android application.
is there any way to change the transport protocol during using a core?
i found two options:
private fun setTransport(transport: String) {
val core = getLinphoneCore() ?: return // Ensure core is not null
val transports = core.transports // Get the Transports object directly
val account: Account? = core.getDefaultAccount()
if (account != null) {
val params: AccountParams = account.getParams()
when (transport) {
"udp" -> {
transports.setUdpPort(5060)
params.setTransport(TransportType.Udp)
} // Enable UDP
"tcp" -> {
transports.setTcpPort(5060)
params.setTransport(TransportType.Tcp)
} // Enable TCP
"tls" -> {
transports.setTlsPort(5061)
params.setTransport(TransportType.Tls)
} // Enable TLS
else -> {
transports.setUdpPort(5060)
params.setTransport(TransportType.Udp)
} // Default to UDP if invalid input
}
transports.dtlsPort = 0 // Disable DTLS explicitly
core.setTransports(transports) // Apply the updated transport settings
}
}
Notes
there is always one account
the input is "udp", "tcp" or "tls"
no matter what I set the transport with this function, the application will always use UDP (confirmed with Wireshark)
I tried this before registration and after registration, both failed
to confirm that the bug is not with the input of the function, i changed the "else" in the function to connect via TCP, it used UDP again.
Questions
Is it the correct way to change transport?
is it possible to change transport protocol with an initiated core?
Does the related functions work in real time and the core use the real time set protocol?
I dont know what logs to attach here, eveything works and the code does not generate any specific log, if anything needed plz tell me
thanks.
The text was updated successfully, but these errors were encountered:
hi
I am using "linphone sdk 5.3.100" for programming an android application.
is there any way to change the transport protocol during using a core?
i found two options:
Implementation
so i use this function in kotlin:
Notes
Questions
I dont know what logs to attach here, eveything works and the code does not generate any specific log, if anything needed plz tell me
thanks.
The text was updated successfully, but these errors were encountered: