Pjsip new-call error ... Could not find default sound device (PJMEDIA_EAUD_NODEFDEV)

I get this error when I try to establish a new call from pjsip:

pjsua_aud.c ..Error retrieving default audio device parameters: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [status=420006] Exception: Object: {Account <sip:192.168.0.2:54496>}, operation=make_call(), error=Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV)

I installed libasound2-dev: sudo apt-get install libasound2-devand recompiled pjsip, but nonetheless it gives me the same result. Am I missing something?

NB I am using Ubuntu 11.10 and the sound works fine without problems, so please do not tell me that I have problems with the sound card.


Update

I configured and compiled pjsip as follows:

$. / configure

$ make && & make install

And like this:

$. / configure --enable-shared --disable-static --enable-memalign-hack

$ make && & make install

And also like this:

$. / configure

$ make dep && make clean && make

And all the methods gave me the same results.


Update 2

, , :

sudo apt-get install portaudio19-dev libportaudio2 pulseaudio alsa-utils liboss4-salsa-dev alsa-base alsa-tools libasound2-plugins libasound2 libasound2-dev binutils binutils-dev libasound-dev pulseaudio-dev


3

, , :

pjproject-2.1.0/pjsip-apps/bin/pjsua-i686-pc-linux-gnu --capture-dev=-1 --playback-dev=-1

. python script, , :

lib.init(log_cfg = pj.LogConfig(level=LOG_LEVEL, callback=log_cb))
snd_dev = lib.get_snd_dev()
print snd_dev ## returns (-1,-2)
lib.set_snd_dev(0,0)

:

12: 39: 55.753 os_core_unix.c! pjlib 2.1 POSIX 12: 39: 55.754 sip_endpoint.c. ... 12: 39: 55.754 pjlib.select() - (0x93f1a80) 12: 39: 55.754 sip_endpoint.c. "mod-msg-print" 12: 39: 55.754 sip_transport. . 12: 39: 55,754 pjsua_core.c.PJSUA : NULL → CREATED 12: 39: 55.769
pjsua_core.c.pjsua 2.1 Linux-3.0.0.17/i686/glibc-2.13 (-1, -2) 12: 39: 55.770 pjsua_aud.c. : (PJMEDIA_EAUD_INVDEV) [status = 420004] : Object: Lib, operation = set_current_sound_devices(), error = Invalid audio device (PJMEDIA_EAUD_INVDEV)

, lib.set_snd_dev(0,0) lib.set_null_snd_dev(), , , , !!!

+3
3

, . , libasound-development-package . :

sudo apt-get install libasound2-dev

, pjsip , make, . Pjsip

pjsip :

./configure
make dep 
make clean
make
make install

.

+9

, , , . , .

  • ! pulseaudio-dev, alsa-dev, portaudio-dev , ( dubio !)
  • ! (aconfigure, make...)
  • pjsip-apps/src/python / , .. /py _pjsua

pa_dev.c..Sound ...

+1

, ( ), , get_snd_dev? , .

lib.set_snd_dev(0,0)

(-1, -2) :

lib.set_snd_dev(-1,-2)
-1
source

All Articles