Since nobody answers me, I tried to find the solution, and finally fix my problem I release the details for somebody may will have the same problem. I attached two USB sound cards to Raspberry Pi and after installing ALSA, I edited the file at path "/etc/modprobe.d/alsa-base.conf" as following: options snd-usb-audio index=0,1 options snd_bcm2835 index=2 so I can observe both of them by "aplay -L". and also typing "cat /proc/asound/cards" in command line, will results: 0 [Device ]: USB-Audio - Generic USB Audio Device Generic USB Audio Device at usb-bcm2708_usb-1.2.2, full speed 1 [Device_1 ]: USB-Audio - Generic USB Audio Device Generic USB Audio Device at usb-bcm2708_usb-1.2.3, full speed 2 [ALSA ]: bcm2835 - bcm2835 ALSA bcm2835 ALSA I decided to sun pjsua with " --capture-dev 1 --playback-dev 1" but it used "Device" the same as past. But if you want to obtain the actual index of your sound card in ALSA, you should run "./pjsystest-armv61-unknown-linux-gnueabihf " that located in the path "pjsip-apps/bin". Then enter "10" to view sound devices: 0: Tests 00: Run test wizard 01: Device Test 02: Play Tone 03: Play WAV File1 04: Play WAV File2 05: Record Audio 06: Latency Test 07: AEC/AES Test 09: Exit 1: Options 10: View Devices 11: View Settings It resulted the following on my raspberry: Enter the menu number: 13:09:17.874 systest.c Running Audio Device List Audio Device List Found 20 devices 0: ALSA [default:CARD=Device] (1/1) 1: ALSA [sysdefault:CARD=Device] (1/1) 2: ALSA [front:CARD=Device,DEV=0] (1/1) 3: ALSA [surround40:CARD=Device,DEV=0] (1/1) 4: ALSA [surround41:CARD=Device,DEV=0] (1/1) 5: ALSA [surround50:CARD=Device,DEV=0] (1/1) 6: ALSA [surround51:CARD=Device,DEV=0] (1/1) 7: ALSA [surround71:CARD=Device,DEV=0] (1/1) 8: ALSA [iec958:CARD=Device,DEV=0] (1/1) 9: ALSA [default:CARD=Device_1] (1/1) 10: ALSA [sysdefault:CARD=Device_1] (1/1) 11: ALSA [front:CARD=Device_1,DEV=0] (1/1) 12: ALSA [surround40:CARD=Device_1,DEV=0] (1/1) 13: ALSA [surround41:CARD=Device_1,DEV=0] (1/1) 14: ALSA [surround50:CARD=Device_1,DEV=0] (1/1) 15: ALSA [surround51:CARD=Device_1,DEV=0] (1/1) 16: ALSA [surround71:CARD=Device_1,DEV=0] (1/1) 17: ALSA [iec958:CARD=Device_1,DEV=0] (1/1) 18: ALSA [default:CARD=ALSA] (0/1) 19: ALSA [sysdefault:CARD=ALSA] (0/1) It shows that my second sound card to name "Device_1" has index of 10. So I ran the pjsua again, this time as following: ./pjsua-armv61-unknown-linux-gnueabihf --capture-dev 10 --playback-dev 10 Don't hesitate to ask me the questions about it. From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Farzan Shojaee Sent: Tuesday, January 05, 2016 12:10 PM To: 'pjsip list' Subject: Re: two usb sound cards and pjsip Pjsua uses sysdefault sound card, I observed the Pjsua logs in more details and found that inspite of setting the playback and capture device. Pjsua uses the sysdefault CARD. How can I change it dynamically??? Has anyone no idea?? From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Farzan Shojaee Sent: Monday, January 04, 2016 5:21 PM To: 'pjsip list' Subject: two usb sound cards and pjsip I'm using pjsip on Raspberry Pi 1. I compiled and tested it successfully. I've used an external USB sound, everything is true. I've attached two external USB sound card now. and I want to use two simultaneous pjsua apps so that each one work with one of this USB sound cards. I have edited /etc/modprobe.d/alsa-base.conf as following: options snd-usb-audio index=0,1 options snd_bcm2835 index=2 I can see two usb sound card by using "aplay -l" with index of 0 and 1. I can also see it in "cat /proc/asound/cards". It shows my two USB sound cards. But when I run pjsua (./pjsua-armv61-unknown-linux-gnueabihf --capture-dev 1 --playback-dev 1) it runs successfully and shows that usb sound card 1 is selected: pjsua_aud.c Set sound device: capture=1, playback=1 pjsua_app.c .Turning sound device ON pjsua_aud.c .Opening sound device PCM at 8000/1/20ms but USB sound card 0 is active yet and audio heard in it, and USB sound card 0 doesn't work anyway. Has anyone any idea?? Help me plz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20160105/106a6b6d/attachment.html>