'iOS PJSIP no sound

I used PJSIP PJSUA API to develop iOS VoIP applications. I successfully compiled the PJSIP iOS library and registered it successfully. However, when I initiate a call, I get the following error:

19:52:39.821            pjsua_aud.c  .Set sound device: capture=-1, playback=-2
19:52:39.821            pjsua_aud.c  ..Error retrieving default audio device parameters: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [status=420006]
19:52:39.822          pjsua_media.c  .Call 0: deinitializing media..

I looked up some information, such as setting up an empty device:

pjsua_set_null_snd_dev();

This did make a successful call, but there was no sound. I know it's still because I didn't get the audio equipment. What can I do to get the audio equipment successfully?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source