问题描述
我正在为IOS创建VoIP应用程序.我正在为此使用pjsip开源库.当我将pjsip配置为UDP时,我能够连接.但是我总是收到错误代码171060 [创建传输时出错:不支持的传输(PJSIP_EUNSUPTRANSPORT)[状态= 171060]]
I am creating a VoIP application for IOS.i am using the pjsip open source libraries for this .I am able to connect when i configure the pjsip to UDP .But i always get error code 171060 [Error creating transport: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]]
我发现在配置TLS的文件设置时我犯了一个错误.这就是我在做什么.
I get it that somewhere I am making mistake while configuring the file settings for TLS.This is what i am doing.
pjsua_transport_config cfg;
pjsua_transport_config_default(&cfg);
cfg.port = 5061;
cfg.tls_setting.ca_list_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"ca_list" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); // location of cacert.pem
cfg.tls_setting.cert_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"certificate" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); // location of cacert.pem
cfg.tls_setting.privkey_file = pj_str((char*)[[[NSBundle mainBundle] pathForResource:@"pvkey" ofType:@"pem"] cStringUsingEncoding:NSUTF8StringEncoding]); //
cfg.tls_setting.password = pj_str("myPassword");
cfg.tls_setting.verify_client = PJ_TRUE;
cfg.tls_setting.verify_server = PJ_TRUE;
cfg.tls_setting.method = PJSIP_TLSV1_METHOD;
//
NSLog(@"******TLS********");
//pjsua_transport_id transport_id = 1;
status = pjsua_transport_create(PJSIP_TRANSPORT_TLS , &cfg, NULL);
if (status != PJ_SUCCESS) error_exit("Error creating transport", status);
我在Google上搜索了如何解决此问题的方法,但到目前为止,我还没有遇到任何具体的解决方案.如果有人知道,请您帮我吗?
I have searched up and down on google on how to resolve this issue but i haven't come across any concrete solution thus far.Please if anyone knows can you help me??
推荐答案
已解决.新创建的框架未添加.而且不是FAT库,因此问题就出现了.
Solved it.The newly created frameworks were not getting added.And were not FAT libs so the problem rose.
这篇关于如何将TLS支持应用于iOS的PJSIP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!