Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect with TLS and custom port #893

Open
iosmoon38 opened this issue Sep 26, 2023 · 1 comment
Open

Unable to connect with TLS and custom port #893

iosmoon38 opened this issue Sep 26, 2023 · 1 comment

Comments

@iosmoon38
Copy link

iosmoon38 commented Sep 26, 2023

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?

@dikshit11
Copy link

Same issue.
When using interpretUrl it's crash in real device.
let address = mCore.interpretUrl(url: "sip:[DOMAIN.COM]:[PORT]")

Anyone can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants