Hi, What about loopback audio from mic->spk ('cc 0 0' in pjsua prompt)? Or WAV file to spk ('cc 1 0')? If both work fine, then the problem should be in other part (e.g: networking, codec, etc), please see http://trac.pjsip.org/repos/wiki/sound-problems. Regards, nanang On Thu, Oct 23, 2008 at 5:31 PM, Juan Salvador Castej?n Garrido <juans.castejon at vocali.net> wrote: > Hi all, > > I recently downloaded pjsip. I am trying to use pjsua on a server to > automatically answer calls from a few mobile clients. The problem is > that pjsua plays sound coming from the client but does not take any > sound from mic or .wav file. I have checked my sound config again and > again, and I have tested succesfully other record apps to be sure > there is not any issue with the mic or soundcard config. > > I have compiled pjsua on ubuntu 8.04, kernel 2.6.24-21. > > This is the output from sndinfo: > > Device #00: > Name : HDA Intel: ALC883 Analog (hw:0,0) > # of input channels : 2 > # of output channels: 6 > Default clock rate : 44100 Hz > > Device #01: > Name : HDA Intel: ALC883 Digital (hw:0,1) > # of input channels : 2 > # of output channels: 2 > Default clock rate : 44100 Hz > > Device #02: > Name : HDA Intel: ALC883 Analog (hw:0,2) > # of input channels : 2 > # of output channels: 0 > Default clock rate : 44100 Hz > > Device #03: > Name : front > # of input channels : 0 > # of output channels: 6 > Default clock rate : 44100 Hz > > Device #04: > Name : surround40 > # of input channels : 0 > # of output channels: 6 > Default clock rate : 44100 Hz > > Device #05: > Name : surround41 > # of input channels : 0 > # of output channels: 128 > Default clock rate : 44100 Hz > > Device #06: > Name : surround50 > # of input channels : 0 > # of output channels: 128 > Default clock rate : 44100 Hz > > Device #07: > Name : surround51 > # of input channels : 0 > # of output channels: 6 > Default clock rate : 44100 Hz > > Device #08: > Name : surround71 > # of input channels : 0 > # of output channels: 6 > Default clock rate : 44100 Hz > > Device #09: > Name : iec958 > # of input channels : 0 > # of output channels: 2 > Default clock rate : 44100 Hz > > Device #10: > Name : spdif > # of input channels : 2 > # of output channels: 2 > Default clock rate : 44100 Hz > > Device #11: > Name : dsp0- > # of input channels : 128 > # of output channels: 128 > Default clock rate : 44100 Hz > > Device #12: > Name : default > # of input channels : 128 > # of output channels: 128 > Default clock rate : 44100 Hz > > Device #13: > Name : dmix > # of input channels : 0 > # of output channels: 2 > Default clock rate : 48000 Hz > > Device #14: > Name : /dev/dsp > # of input channels : 16 > # of output channels: 16 > Default clock rate : 44100 Hz > > I use default device (#12), which passes without problems the sound test > > ./sndtest-i686-pc-linux-gnu -i 12 > 12:23:29.459 os_core_unix.c pjlib 1.0 for POSIX initialized > 12:23:30.076 pasound.c PortAudio sound library initialized, status=0 > 12:23:30.076 pasound.c PortAudio host api count=2 > 12:23:30.076 pasound.c Sound device count=15 > 12:23:30.076 pjlib select() I/O Queue created (0x80aca1c) > 12:23:30.076 sndtest.c Found 15 devices: > 12:23:30.076 sndtest.c 0: HDA Intel: ALC883 Analog (hw:0,0) > (capture=2, playback=6) > 12:23:30.076 sndtest.c 1: HDA Intel: ALC883 Digital (hw:0,1) > (capture=2, playback=2) > 12:23:30.076 sndtest.c 2: HDA Intel: ALC883 Analog (hw:0,2) > (capture=2, playback=0) > 12:23:30.077 sndtest.c 3: front (capture=0, playback=6) > 12:23:30.077 sndtest.c 4: surround40 (capture=0, playback=6) > 12:23:30.077 sndtest.c 5: surround41 (capture=0, playback=128) > 12:23:30.077 sndtest.c 6: surround50 (capture=0, playback=128) > 12:23:30.077 sndtest.c 7: surround51 (capture=0, playback=6) > 12:23:30.077 sndtest.c 8: surround71 (capture=0, playback=6) > 12:23:30.077 sndtest.c 9: iec958 (capture=0, playback=2) > 12:23:30.077 sndtest.c 10: spdif (capture=2, playback=2) > 12:23:30.077 sndtest.c 11: dsp0- (capture=128, playback=128) > 12:23:30.077 sndtest.c 12: default (capture=128, playback=128) > 12:23:30.077 sndtest.c 13: dmix (capture=0, playback=2) > 12:23:30.077 sndtest.c 14: /dev/dsp (capture=16, playback=16) > 12:23:30.127 sndtest.c Testing playback device default > 12:23:30.127 sndtest.c Testing capture device default > 12:23:30.331 sndtest.c Please wait while test is in progress > (~11 secs).. > 12:23:41.520 sndtest.c Dumping results: > 12:23:41.520 sndtest.c Parameters: clock rate=8000Hz, 80 samples/frame > 12:23:41.520 sndtest.c Playback stream report: > 12:23:41.520 sndtest.c Duration: 9s.990 > 12:23:41.520 sndtest.c Frame interval: min=0.001ms, max=47.342ms > 12:23:41.520 sndtest.c Jitter: min=9.339ms, avg=24.926ms, max=47.340ms > 12:23:41.520 sndtest.c Capture stream report: > 12:23:41.520 sndtest.c Duration: 9s.990 > 12:23:41.520 sndtest.c Frame interval: min=0.001ms, max=47.341ms > 12:23:41.520 sndtest.c Jitter: min=9.339ms, avg=24.925ms, max=47.339ms > 12:23:41.520 sndtest.c Checking for clock drifts: > 12:23:41.520 sndtest.c No clock drifts is detected > 12:23:41.520 sndtest.c Test completed with some warnings > > I run pjsua this way: > > ./pjsua-i686-pc-linux-gnu --auto-answer=200 --realm=localhost > --id=sip:1000 at localhost --username=1000 --password=1000 > --registrar=sip:10.166.113.69 --playback-dev=12 --capture-dev=12 > --play-file=test.wav --auto-play > > When the call is established, the port list looks like this: > > Port #00[16KHz/20ms/1] default transmitting to: #4 > Port #01[48KHz/20ms/2] prueba.wav transmitting to: #4 > Port #02[16KHz/20ms/1] ringback transmitting to: > Port #03[16KHz/20ms/1] ring transmitting to: > Port #04[16KHz/20ms/1] sip:2000 at localhost transmitting to: #0 > > Any suggestions? > > Thanks in advance. > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >