Questions about pjsua

FC
Fortin Carl
Fri, Sep 22, 2017 11:13 PM

Hi,

I am using PJSIP 2.5.5 with Python on the Raspberrypi and I have 2 questions:

Question 1:

How am I supposed to know what codec is available?
I am using the enum_codecs() method to list the codec but it returns an array of hexadecimal string:

codec:[<pjsua.CodecInfo instance at 0xb64c2620>, <pjsua.CodecInfo instance at 0xb64c2648>, <pjsua.CodecInfo instance at 0xb64c2670>, <pjsua.CodecInfo instance at 0xb64c2698>, <pjsua.CodecInfo instance at 0xb64c26c0>, <pjsua.CodecInfo instance at 0xb64c26e8>, <pjsua.CodecInfo instance at 0xb64c2710>, <pjsua.CodecInfo instance at 0xb64c2738>, <pjsua.CodecInfo instance at 0xb64c2760>, <pjsua.CodecInfo instance at 0xb64c2788>, <pjsua.CodecInfo instance at 0xb64c27b0>, <pjsua.CodecInfo instance at 0xb64c27d8>, <pjsua.CodecInfo instance at 0xb64c2800>, <pjsua.CodecInfo instance at 0xb64c2828>, <pjsua.CodecInfo instance at 0xb64c2850>]

How do I know which one is G711 and G722?

Question 2:

Why do I get a device busy if I want to use the same audio device as pjsip in my Python code?

os.system("aplay -f S16_LE -c 2 -D plughw:1,0 /home/pi/beep.wav")
aplay: main:722: audio open error: Device or resource busy

Any help will be greatly appreciated

Hi, I am using PJSIP 2.5.5 with Python on the Raspberrypi and I have 2 questions: Question 1: How am I supposed to know what codec is available? I am using the enum_codecs() method to list the codec but it returns an array of hexadecimal string: codec:[<pjsua.CodecInfo instance at 0xb64c2620>, <pjsua.CodecInfo instance at 0xb64c2648>, <pjsua.CodecInfo instance at 0xb64c2670>, <pjsua.CodecInfo instance at 0xb64c2698>, <pjsua.CodecInfo instance at 0xb64c26c0>, <pjsua.CodecInfo instance at 0xb64c26e8>, <pjsua.CodecInfo instance at 0xb64c2710>, <pjsua.CodecInfo instance at 0xb64c2738>, <pjsua.CodecInfo instance at 0xb64c2760>, <pjsua.CodecInfo instance at 0xb64c2788>, <pjsua.CodecInfo instance at 0xb64c27b0>, <pjsua.CodecInfo instance at 0xb64c27d8>, <pjsua.CodecInfo instance at 0xb64c2800>, <pjsua.CodecInfo instance at 0xb64c2828>, <pjsua.CodecInfo instance at 0xb64c2850>] How do I know which one is G711 and G722? Question 2: Why do I get a device busy if I want to use the same audio device as pjsip in my Python code? os.system("aplay -f S16_LE -c 2 -D plughw:1,0 /home/pi/beep.wav") aplay: main:722: audio open error: Device or resource busy Any help will be greatly appreciated