6

I'm working on a VoIP app, when dialling a number, I use:

status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL,  &msg_data, call_id);
if (status != PJ_SUCCESS) {
        pjsua_perror(THIS__FILE, "Error making call, going to restart handler", status);
        [SipHandlerListener restart:YES];
    } else {
        // continue with actions
    }
}

for a long time, my decoded error message for non-successful status is "Default status message" until just now when I traced status value it gave me 450851. I then searched for the error code and found:

Unable to open sound device: Core audio error [status=450851]

I saw many people post this log message in other places, but what exactly is this error about and anyone has a fix to this error?

Note that I have no sound problem with other situations, e.g. receiving incoming call rings, answering a call etc.

xialin
  • 7,686
  • 9
  • 35
  • 66
  • Did you find a solution for this? I am wondering. – IgorGanapolsky May 17 '17 at 14:52
  • I am using pjsus_call_make_call but in this when receiver gets call it displays random number not my cell number from which I am making call. Do you have any solution for this ???? How to display incoming cell number on receiver's phone instead of random number...... – Parth Barot Apr 01 '19 at 10:44

1 Answers1

0

For me, it was an unexpected Core Audio device causing the error.

If I plug in an external monitor (the monitor has no speakers or mic) I see this output:

09:50:28.502        coreaudio_dev.c  ..core audio detected 3 devices
09:50:28.504        coreaudio_dev.c  .. dev_id 0: Built-in Output  (in=0, out=2) 44100Hz
09:50:28.504        coreaudio_dev.c  .. dev_id 1: Built-in Microphone  (in=2, out=0) 44100Hz
09:50:28.505        coreaudio_dev.c  .. dev_id 2: HDMI  (in=0, out=2) 48000Hz
09:50:28.505        coreaudio_dev.c  ..core audio initialized

And it looks like that's the device that pjsip is trying to use, and failing:

09:50:28.505            pjsua_aud.c  Set sound device: capture=2, playback=2
09:50:28.505            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@8000/1/20ms
09:50:28.510        coreaudio_dev.c  ..Opening device 58
09:50:28.511            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@44100/1/20ms
09:50:28.512        coreaudio_dev.c  ..Opening device 58
09:50:28.512            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@48000/1/20ms
09:50:28.513        coreaudio_dev.c  ..Opening device 58
09:50:28.514            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@32000/1/20ms
09:50:28.515        coreaudio_dev.c  ..Opening device 58
09:50:28.515            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@16000/1/20ms
09:50:28.516        coreaudio_dev.c  ..Opening device 58
09:50:28.516            pjsua_aud.c  .Opening sound device (speaker + mic) PCM@8000/1/20ms
09:50:28.517        coreaudio_dev.c  ..Opening device 58
09:50:28.518            pjsua_aud.c  .Unable to open sound device: Core audio error<A8>6<81><99><89>^? [status=450851]

There's probably a way to get pjsip to specify the Core Audio device, but I haven't gotten that far.

James Moore
  • 8,636
  • 5
  • 71
  • 90
  • I am using pjsus_call_make_call but in this when receiver gets call it displays random number not my cell number from which I am making call. Do you have any solution for this ???? How to display incoming cell number on receiver's phone instead of random number...... – Parth Barot Apr 01 '19 at 10:58