PJSIP新的呼叫错误...无法找到默认音频设备(PJMEDIA_EAUD_NODEFDEV) [英] pjsip new-call error ... Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV)

查看:6909
本文介绍了PJSIP新的呼叫错误...无法找到默认音频设备(PJMEDIA_EAUD_NODEFDEV)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到这个错误,当我尝试建立一个新的呼叫从PJSIP:

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

pjsua_aud.c ..Error检索默认音频设备参数:无法找到默认音频设备(PJMEDIA_EAUD_NODEFDEV)状态= 420006]
例外:对象:{帐户< SIP:192.168.0.2:54496>},操作= make_call()错误=无法找到默认音频设备(PJMEDIA_EAUD_NODEFDEV)

我装的libasound2-dev的命令和apt-get安装的libasound2-dev的,并重新编译PJSIP,但仍,它给了我同样的结果..我在这里失去了一些东西?

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

N.B。我使用Ubuntu 11.10和声音工作正常,没有任何问题,所以请不要告诉我,我有声卡的问题

N.B. I use Ubuntu 11.10 and the sound works fine with no problems, so please don't tell me I have problems in the sound card

更新

我的配置和编译的PJSIP是这样的:

$的./configure

$ ./configure

$使&放大器;&安培;使安装

$ make && make install

并是这样的:

And like this:

$的./configure --enable-共享--disable静态--enable-memalign可-破解

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

$使&放大器;&安培;使安装

$ make && make install

并也是这样的:

$的./configure

$ ./configure

$使DEP和放大器;&安培;使清洁和放大器;&安培;让

$ make dep && make clean && make

和所有的方式给了我同样的结果。

And all ways gave me the same results.

更新2

我确信,所有的下面都安装了,还是问题仍然存在:

I made sure that all of below are installed, and still the problem persists:

命令和apt-get安装portaudio19-dev的libportaudio2的PulseAudio的alsa-utils的liboss4-莎莎-dev的ALSA基ALSA工具的libasound2-插件的libasound2的libasound2-dev的的binutils的binutils-dev的libasound-dev的的pulseaudio-dev的

更新3

我跑它像下面,和它的工作:

I ran it like below, and it worked:

pjproject-2.1.0 / PJSIP-应用程序/斌/ pjsua-i686的-PC-Linux的GNU --capture-dev的= -1 --playback-dev的= -1

它可以呼叫对方。但是,当我从一个Python脚本运行它,它给了我一个错误,甚至当我设置声音设备是这样的:

It can call the other party. But when I run it from a python script it gives me an error, even when I set the sound device like this:

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 .Creating端点实例...
  12:39:55.754 pjlib。选择()I / O队列创建(0x93f1a80)
  12:39:55.754 sip_endpoint.c .ModuleMOD-MSG-打印注册
  12:39:55.754 sip_transport。 .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 .Error检索
  默认音频设备参数:无效的音频设备
  (PJMEDIA_EAUD_INVDEV)状态= 420004]异常:对象:库,
  操作= set_current_sound_devices(),错误=无效的音频设备
  (PJMEDIA_EAUD_INVDEV)

12:39:55.753 os_core_unix.c !pjlib 2.1 for POSIX initialized 12:39:55.754 sip_endpoint.c .Creating endpoint instance... 12:39:55.754 pjlib .select() I/O Queue created (0x93f1a80) 12:39:55.754 sip_endpoint.c .Module "mod-msg-print" registered 12:39:55.754 sip_transport. .Transport manager created. 12:39:55.754 pjsua_core.c .PJSUA state changed: NULL --> CREATED 12:39:55.769
pjsua_core.c .pjsua version 2.1 for Linux-3.0.0.17/i686/glibc-2.13 initialized (-1, -2) 12:39:55.770 pjsua_aud.c .Error retrieving default audio device parameters: Invalid audio device (PJMEDIA_EAUD_INVDEV) [status=420004] Exception: 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(),当然,声音是不工作,因为我设置声音设备为空!

But weirdly worked, when I replaced the lib.set_snd_dev(0,0) with this line lib.set_null_snd_dev(), but of course the sound is not working, as I'm setting the sound device to null !!!

推荐答案

开发包未安装会出现这种情况。从你的错误消息,我可以告诉大家, 未安装libasound开发包。做如下:

This happens when the development packages are not installed. From your error message i can tell that libasound-development-package is not installed. Do as following:

sudo apt-get install libasound2-dev

注意这PJSIP仍然将无法设置默认的音频设备,因为你已经完成了制作因为这个包不见了。
所以,你需要建立PJSIP再次

Pay attention that pjsip would still fail to set the default audio device since you have done the make as this package was missing. So you need to build Pjsip once again

在PJSIP目录分别做如下:

at pjsip directory do the following respectively :

./configure
make dep 
make clean
make
make install

这会做到这一点。

这篇关于PJSIP新的呼叫错误...无法找到默认音频设备(PJMEDIA_EAUD_NODEFDEV)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆