saravnandm / pjsip2.5-g729codec

g729 codec integration with pjsip 2.5
19 stars 7 forks source link

420006 status code while placing a call #3

Closed meghaParmar closed 7 years ago

meghaParmar commented 8 years ago

@saravanandm I successfully build pjsip with G729 with the help of your code. Also I can see G729 integrated by the list of available codecs in my source code. While placing a call , It returns me status 420006 due to this it is not possible to make call. I am using this code to make call `pj_status_t status;

    pj_str_t uri = pj_str([dialedUser UTF8String]);
    status = pjsua_call_make_call(voipManager._sip_acc_id, &uri, 0, NULL, NULL, NULL);
    NSLog(@"status return = %i", status);
    if (status != PJ_SUCCESS)
    {
        //error_exit("Error making call", status);
        NSLog(@"Error making call...");
    }
    else
    {
        NSLog(@"Call Successfully placed...");
    }`

From pjsip sources , as per my understanding I also updated config_site.h like this

`#define PJMEDIA_HAS_G7221_CODEC 1

define PJMEDIA_HAS_G729_CODEC 1

define PJMEDIA_AUDIO_DEV_HAS_LEGACY_DEVICE 1 //updated to solve 420006

include <pj/config_site_sample.h>`

As per pjsip resources this status code is the cause of missing media [pjsip] Error making call: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [status=420006]. How can I accomplish missing resources to make call enabled. Your suggestion will be very helpful to me.

Thanks.

saravnandm commented 8 years ago

Patches are just to build g729 codec lib, To use you need to follow pjsip guidelines. As per my knowledge integrating any codec into pjsua is bit difficult. So i would suggest integrate it with pjsip core library and start writing your own sipstack.

meghaParmar commented 7 years ago

In version 2.5 there was missing library for coreAudio. Once I tried with older version, It worked well.