linphone-iphone
linphone-iphone copied to clipboard
Unable to connect with TLS and custom port
I am trying to connect with TLS and the custom port but it crash in the real device, working fine in the simulator.
Here is swift code:
do {
let from = try Factory.Instance.createAddress(addr: sip:[USERNAME]@DOMAIN.COM)
let authInfo = try Factory.Instance.createAuthInfo(username: from.username, userid: "", passwd: passwd, ha1: "", realm: "", domain: from.domain)
let accountParams = try mCore.createAccountParams()
let identity = try Factory.Instance.createAddress(addr: String("sip:" + from.username + "@" + from.domain))
let address = mCore.interpretUrl(url: "sip:[DOMAIN.COM]:[PORT]")
try! accountParams.setIdentityaddress(newValue: sip:[USERNAME]@DOMAIN.COM))
try address?.setTransport(newValue: .Tls)
accountParams.registerEnabled = true
accountParams.pushNotificationAllowed = true
try accountParams.setServeraddress(newValue: address!)
mAccount = try mCore.createAccount(params: accountParams)
mCore.addAuthInfo(info: authInfo)
try mCore.addAccount(account: mAccount!)
mCore.defaultAccount = mAccount
} catch { NSLog(error.localizedDescription) }
Anyone could help please?
Same issue.
When using interpretUrl it's crash in real device.
let address = mCore.interpretUrl(url: "sip:[DOMAIN.COM]:[PORT]")
Anyone can help?