BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)

Home Page:http://linphone.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to connect with TLS and custom port

iosmoon38 opened this issue · comments

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?