Wasim Mirza
Wasim Mirza

Reputation: 57

How to make Video call in Ios using pjsip 2.5.5 or 2.6?

I am working on audio and video call feature in my application I got success to make call as a audio but I am stuck on video calling. For video calling I am using following code.

    pjsua_call_setting opt;
    pjsua_call_setting_default(&opt);

    opt.aud_cnt = 1;
    opt.vid_cnt = 1;

    char *destUri = "sip:XXXXXX@sipserver";
    pj_status_t status;
    pj_str_t uri = pj_str(destUri);

    status = pjsua_call_make_call(voipManager._sip_acc_id, &uri,&opt, 
    NULL, NULL, NULL);
    if (status != PJ_SUCCESS)
        NSLog(@"%d",status);
    else
        NSLog(@"%d",status);

When the pjsua_call_make_call function is perform it shows me the error which is:

Assertion failed: (opt->vid_cnt == 0), function apply_call_setting, file ../src/pjsua-lib/pjsua_call.c, line 606.

Upvotes: 2

Views: 913

Answers (1)

Alex Morrison
Alex Morrison

Reputation: 405

You must build the lib for video support. To enable video, append this into config_site.h: #define PJMEDIA_HAS_VIDEO 1

What you are getting is assertion error for checking video support

Upvotes: 2

Related Questions