我已成功为所有架构编译pjsip并能够注册sip。但是当我尝试使用pjsua_call_make_call
拨打电话时,应用程序崩溃了。
在我用来打电话的方法之下。
- (void)makeCallTo:(char*)destUri
{
pj_status_t status;
pj_str_t uri = pj_str(destUri);
status = pjsua_verify_sip_url(destUri);
if (status != PJ_SUCCESS)
{
PJ_LOG(1,(THIS_FILE, "Invalid URL \"%s\".", uri));
pjsua_perror(THIS_FILE, "Invalid URL", status);
return;
}
status = pjsua_call_make_call(_acc_id, &uri, 0, NULL, NULL, NULL);
if (status != PJ_SUCCESS) {
error_exit("Error making call", status);
}
}
下面是sip trace,
13:15:21.513 pjsua_call.c !Making call with acc #0 to sip:9876543210@myserver.com
13:15:21.513 pjsua_aud.c .Set sound device: capture=-1, playback=-2
13:15:21.513 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@16000/1/20ms
13:15:21.514 coreaudio_dev. ...Using VoiceProcessingIO audio unit
13:15:23.655 coreaudio_dev. !...core audio stream started
13:15:23.656 pjsua_media.c .Call 0: initializing media..
13:15:23.656 pjsua_media.c ..RTP socket reachable at 192.168.0.103:4000
13:15:23.656 pjsua_media.c ..RTCP socket reachable at 192.168.0.103:4001
13:15:23.657 pjsua_media.c ..RTP socket reachable at 192.168.0.103:4002
13:15:23.657 pjsua_media.c ..RTCP socket reachable at 192.168.0.103:4003
13:15:23.657 pjsua_media.c ..Media index 0 selected for audio call 0
Assertion failed: ((status=pjmedia_sdp_validate(local))==PJ_SUCCESS), function pjmedia_sdp_neg_create_w_local_offer, file ../src/pjmedia/sdp_neg.c, line 111.
非常感谢任何帮助!
答案 0 :(得分:0)