I am getting the following error while creating a tcp config for PJSIP in Android.
Unable to generate suitable Contact header for registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
D/SipTag: Sun Unable to create registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
Here is my code
endpoint?.libInit(epConfig)
// configure transport layer
val transportConfig = TransportConfig()
val pathToCerts = ctx.filesDir.absolutePath
val certPath = "$pathToCerts/cl.pem"
val caPath = "$pathToCerts/ch.pem"
val keyPath = "$pathToCerts/p.key"
transportConfig.tlsConfig.certFile = certPath
transportConfig.tlsConfig.caListFile.plus(caPath)
transportConfig.tlsConfig.privKeyFile = keyPath
transportConfig.tlsConfig.verifyServer = true
endpoint?.transportCreate(PJSIP_TRANSPORT_TCP, transportConfig)
endpoint?.libStart()
I have searched a lot and tried different things but nothing works. Is there anything I am missing here?
Solved it. I was missing OpenSSL while compiling PJSIP. You have to compile openssl and add it manually while compiling PJSIP.