我可以通过 Homebrew 构建并启动 Asterisk 15 w/g729 编解码器
- 星号 15.1.5 + bcg729
- Mac OS X High Sierra v10.13.4
- Mac mini(2012 年末)2.5GHz Intel Core i5 16GB DDR3
以下是 Asterisk 15 w/bcg729 在 Mac OS X High Sierra v10.13.4 上的安装步骤
- brew 期间 asterisk.rb 和 pjsip-asterisk.rb 中的小问题
- 更改
brew 建议的“
-
#Homebrew
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#git, mercurial
brew install git mercurial
#asterisk
brew tap leedm777/homebrew-asterisk
brew install asterisk
#bcg729
/usr/local/bin/git clone git://git.linphone.org/bcg729.git
cd bcg729
git checkout 1.0.2
LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include CPPFLAGS=-I/usr/local/include ./configure --prefix=/usr/local
make
make install
#asterisk-g729
/usr/local/bin/hg clone http://bitbucket.org/arkadi/asterisk-g72x
cd asterisk-g72x
./autogen.sh
LDFLAGS=-L/usr/local/lib CFLAGS=-I/usr/local/include CPPFLAGS=-I/usr/local/include ./configure --prefix=/usr/local --with-bcg729 --with-asterisk150
make
make install
#start asterisk
brew services start leedm777/asterisk/asterisk
以下是 Mac OS X Yosemite v10.10.3 上的 Asterisk 13.4.0
通过 macports 安装 GCC4.8 并选择它。这个星号构建应该有其他依赖项。我可以在 macport 中为他们找到所有内容
sudo port install gcc48
sudo port select gcc mp-gcc48
下载当前的星号版本 13,配置和制作
tar zxf asterisk-13-current.tar.gz
cd asterisk-13.4.0/
LDFLAGS=-L/opt/local/lib CFLAGS=-I/opt/local/include CPPFLAGS=-I/opt/local/include ./configure --without-netsnmp --without-gtk2 --prefix=/opt/local
make
sudo make install
sudo make samples
下面是G.729 codec support for Asterisk 使用bcg729
tar zxf bcg729-1.0.0.tar.gz
cd bcg729-1.0.0
LDFLAGS=-L/opt/local/lib CFLAGS=-I/opt/local/include CPPFLAGS=-I/opt/local/include ./configure --prefix=/opt/local
make
sudo make install
tar jxf asterisk-g72x-1.3.tar.bz2
cd asterisk-g72x-1.3
./autogen.sh
LDFLAGS=-L/opt/local/lib CFLAGS=-I/opt/local/include CPPFLAGS=-I/opt/local/include ./configure --prefix=/opt/local --enable-core2 --with-bcg729 --with-asterisk130
make
sudo make install
要运行星号,只需键入
sudo asterisk
通过创建文件添加到 LaunchDaemon
“/Library/LaunchDaemons/org.asterisk.asterisk.plist”
在启动时自动启动星号
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>Label</key><string>org.asterisk.asterisk.plist</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/asterisk</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
并通过创建文件添加到 LaunchDaemon
“/库/LaunchDaemons/limit.maxfiles.plist”
确保 maxfiles 设置正确
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>65536</string>
<string>65536</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
并通过创建文件添加到 LaunchDaemon
“/库/LaunchDaemons/limit.maxproc.plist”
确保 maxprco 设置正确
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxproc</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxproc</string>
<string>2500</string>
<string>2500</string>
</array>
<key>RunAtLoad</key>
<true />
<key>ServiceIPC</key>
<false />
</dict>
</plist>
要使星号在启动时运行,请运行
cd /Library/LaunchDaemons
sudo launchctl load -w org.asterisk.asterisk.plist
sudo launchctl load -w limit.maxfiles.plist
sudo launchctl load -w limit.maxproc.plist
asterisk start 后总是可以通过命令连接到asterisk 服务器
sudo asterisk -r
或更详细
sudo asterisk -rvvvv