在树莓派上安装"ring.cx SIP客户端"

4

情况

我想在我的树莓派上实现基于终端的(headless) SIP 通话,我已经尝试使用 linphone 实现:

RaspberryPI: Making SIP outbound calls using linphonec or an alternative SIP soft phone

由于我目前卡在了那里,所以我想尝试另一种选择,也就是SFLPhone。他们指向了ring软件项目,该项目提供了一个名为dring的守护进程,允许使用脚本接口进行 SIP 调用:

实际上,该守护进程可以独立运行,并且可以使用 DBus API 进行控制。

请注意,该项目已更名为 "Ring" (版本升级到了 2.x)。实验性包可在http://ring.cx/en/documentation/linux-installation找到。 Ring 2.x 的一个重要功能是可选的 "DHT" 帐户类型,允许在没有任何 SIP 服务器的情况下进行通话。 还有许多其他增强功能,例如 ICE 支持、UPnP 支持、稳定性改进等。(请注意,客户端正在被重写(GTK3、Qt5),并且有一个新的 OS X 客户端,它们还不完整,并处于大力开发中。)

新的守护进程dring源 Git 存储库 URI 为:https://gerrit-ring.savoirfairelinux.com/ring。 DBus API 大部分与以前相同。在tools/dringctrl目录中,您将找到一个我们用于测试的示例 python 客户端(使用python3-dbus)。

我们愿意修复您可能发现的任何错误,守护进程 Bug 追踪器在这里:https://projects.savoirfairelinux.com/projects/ring-daemon/issues 还要查看https://projects.savoirfairelinux.com/projects/ring/wiki获取构建指令等信息。

祝好运 A. B.

编译依赖项

我尝试按照README中的说明编译项目所需的依赖项:

git clone https://gerrit-ring.savoirfairelinux.com/ring
cd ring

首先编译依赖项

cd ../contrib/
rm -fr native/ && mkdir native
cd native
../bootstrap
make

I got this error:

libvpx.webm-4640a0c4804b/third_party/googletest/src/include/gtest/gtest.h
mv libvpx-4640a0c4804b49f1870d5a2d17df0c7d0a77af2f libvpx && touch libvpx
cd libvpx && CROSS= ./configure --target=armv7-linux-gcc \
    --as=yasm --disable-docs --disable-examples --disable-unit-tests --disable-install-bins --disable-install-docs --enable-realtime-only --enable-error-concealment --disable-runtime-cpu-detect --disable-webm-io --enable-pic --prefix=/home/pi/ring/contrib/arm-linux-gnueabihf
  disabling docs
  disabling examples
  disabling unit_tests
  disabling install_bins
  disabling install_docs
  enabling realtime_only
  enabling error_concealment
  disabling runtime_cpu_detect
  disabling webm_io
  enabling pic
Configuring selected codecs
  enabling vp8_encoder
  enabling vp8_decoder
  enabling vp9_encoder
  enabling vp9_decoder
Configuring for target 'armv7-linux-gcc'
  enabling armv7
  enabling neon
  enabling neon_asm
  enabling media
Unable to invoke compiler: arm-none-linux-gnueabi-gcc  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.
../../contrib/src/vpx/rules.mak:105: recipe for target '.vpx' failed
make: *** [.vpx] Error 1

编译 Ring

尽管依赖项的编译失败,但我仍然尝试编译 Ring:

git clone https://gerrit-ring.savoirfairelinux.com/ring
cd ring
./autogen.sh
./configure
make
make install

这导致了以下错误:
checking for PJPROJECT... no
configure: error: Missing pjproject files
pi@phone ~/ring $     make
make: *** No targets specified and no makefile found.  Stop.
pi@phone ~/ring $     make install
make: *** No rule to make target 'install'.  Stop.

目前我遇到了困难,担心无法超越我的项目的当前状态():

the-phone

编辑:现在没有视频编解码器(如aberaud所建议),我遇到了以下错误:

/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I../include/opendht -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -fPIC -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include  -g -fPIC -O3 -std=c++0x -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include  -g -fPIC -O3 -std=c++0x -c -o libopendht_la-dht.lo `test -f 'dht.cpp' || echo './'`dht.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include/opendht -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -fPIC -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -I/home/pi/sip-desaster/ring/contrib/arm-linux-gnueabihf/include -g -fPIC -O3 -std=c++0x -c dht.cpp  -fPIC -DPIC -o libopendht_la-dht.o
In file included from ../include/opendht/dht.h:29:0,
                 from dht.cpp:27:
../include/opendht/infohash.h:58:22: error: expected initializer before ‘:’ token
dht.cpp:3105:1: error: expected ‘}’ at end of input
Makefile:386: recipe for target 'libopendht_la-dht.lo' failed
make[2]: *** [libopendht_la-dht.lo] Error 1
make[2]: Leaving directory '/home/pi/sip-desaster/ring/contrib/native/opendht/src'
Makefile:395: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/pi/sip-desaster/ring/contrib/native/opendht'
../../contrib/src/opendht/rules.mak:28: recipe for target '.opendht' failed
make: *** [.opendht] Error 2

http://stackoverflow.com/questions/29435648/sip-client-for-raspberry-pi-that-works-from-command-line/29715067 - Besi
你是否已经安装了交叉编译器?执行 arm-none-linux-gnueabi-gcc -v 命令会输出什么内容? - Lol4t0
这个内容似乎不可用:-bash: arm-none-linux-gnueabi-gcc: command not found。我不知道这是否是在构建contrib的过程中将创建的一个依赖关系... - Besi
我并没有自己设定这个目标。这是一个库,我不是它的作者,而且我也不是 C 专家。然而,我担心在尝试安装这个库时可能会变成一个 C 专家 :-) - Besi
你至少安装了C编译器吗?gcc -v 命令可以运行吗?你的库现在被配置为从x86交叉编译到arm。 - Lol4t0
显示剩余3条评论
3个回答

2

Contrib

"Contrib" 是 Ring 构建的一部分,用于构建目标系统上不可用的依赖项,主要用于在交叉编译或没有适当依赖项管理的系统上构建完整的工作包(基本上除了 Linux 发行版之外的所有操作系统)。

contrib/native 目录中,您可以运行 make list 来查看要构建的软件包列表。由于您正在交叉编译,因此需要构建几乎所有内容。

如果您某种方式搞砸了 contrib 构建过程,可以安全地删除 contrib/nativecontrib/{target_tuple}(如果有的话)目录,然后重新开始。

libvpx

libvpx 库被 libav 用于提供 vp8 和 vp9 视频编解码器。它不是硬性依赖项,由于您的项目不使用视频,因此可以安全地禁用它。我们还在交叉编译 vpx 时遇到了问题。

contrib/src/libav/rules.mak 的第 70 行,DEPS_libav 定义了 libav 的依赖项列表。您可以从列表中删除 vpxx264$(DEPS_vpx),因为您不使用视频。您还可以将 speex 和 opus 音频编解码器添加到列表中(它们应该在列表中但不在其中,请参见此补丁作为示例)。

按照上述描述清除 contrib 并重新启动后,在运行 make list 时,vpxx264 不应出现在“待构建软件包”的列表中。然后尝试通过运行 make 来构建 contrib。

如果尝试此操作后遇到其他软件包的相同问题,则可能存在某种交叉编译构建路径问题(这时我需要更多日志/详细信息)。

作为最后一招,使用 Pi 本身(带有 Raspbian)进行编译非常缓慢,但具有使用本地发行版提供的依赖项和消除交叉编译的麻烦的优点。

祝好运


在第一个版本中,我提到了 contrib/build,它与 contrib/native 相同(目录名称不重要)。 - aberaud
我尝试了你的方法,但在编译了169分钟后仍然失败了...请看下面我的更新答案。 - Besi
请注意,VPX问题现在已经在主分支中修复。 - aberaud

1
我将提供一个自己的答案,记录下我的步骤,希望能够达到预期的结果:

下载源代码

git clone https://gerrit-ring.savoirfairelinux.com/ring
cd ring

构建contrib部分

根据@aberaud评论,我可以更新contrib/src/libav/rules.mak并删除任何与视频相关的依赖项(请记住我是无头模式):

因此,我将第70行更改为

DEPS_libav = zlib x264 vpx $(DEPS_vpx)

to

DEPS_libav = zlib opus speex

现在构建 contrib 部分。
cd ../contrib/
rm -fr native/ && mkdir native
cd native
../bootstrap
make

0

我在尝试编译contrib时遇到了相同的错误。

我使用的Raspbian版本附带了较旧版本的gcc编译器,即4.6版本。升级到4.8版本后,它立即编译成功。当然,这是在树莓派上编译的速度算是很快了。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接