使用SIP呼叫号码时应用崩溃

时间:2014-12-12 11:23:37

标签: ios objective-c iphone xcode sip

我正在使用支持拨打号码(移动电话和固定电话)的iOS应用。关于此功能,我集成了SIP(会话发起协议)。它的工作性很好。但有时候在调用时间我的应用程序会在后续行中崩溃

status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, NULL, call_id);

以上方法以下列方法启动:

pj_status_t sip_dial_with_uri(pjsua_acc_id acc_id, const char *uri, pjsua_call_id *call_id)
{

 pj_status_t status = PJ_SUCCESS;
    pj_str_t pj_uri;

 PJ_LOG(5,(THIS_FILE,  "Calling URI \"%s\".", uri));

status = pjsua_verify_sip_url(uri);
if (status != PJ_SUCCESS)
{
    PJ_LOG(1,(THIS_FILE,  "Invalid URL \"%s\".", uri));
    pjsua_perror(THIS_FILE, "Invalid URL", status);
    return status;
}
  pj_uri = pj_str((char *)uri);

NSLog(@"***check point for assert, acc_id:%d, uri:%s, call_id:%d", (int)acc_id, uri, *call_id);
status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, NULL, call_id);

if (status != PJ_SUCCESS)
{
    pjsua_perror(THIS_FILE, "Error making call", status);
}
return status;
}

如果有人使用此API沙发,请提供您宝贵的建议!感谢

0 个答案:

没有答案