所以要想在windows上運行docker,需要借助虛擬機
目前的Docker使用微軟自帶的 Hyper-V(從Win8開始)虛擬機組件
所以在安裝Docker 時,會幫打開Hyper-V組件(預設是關閉的)這會和你的VirtualBox衝突,導致VirtualBox無法正常運行
解決辦法就是關閉Hyper-V功能, 反安裝 Docker 時並不會自動幫你關閉
1) Verify your dongle is in the supported list by raspbx/chan_dongledongle show device state dongle0
2) Voice is enabled on the dongle (using dc-locker tool)
3) follow steps per http://www.raspberry-asterisk.org/documentation/gsm-voip-gateway-with-chan_dongle/
4) connect to raspbx, type asterisk -r and type
a) Provide a trunk name2) Click Connectivity -> Outbound routes
b) set Outbound CallerID to the number of your SIM
c) set Custom Dial String field to dongle/dongle0/$OUTNUM$
d) set the match pattern in the first row under Dialed Number Manipulation Rules to
NXXNXXXXXX (do not change anything in other fields in that row).
e) Submit changes
f) Apply config
a) Provide a route name3) Click Applications -> Generic SIP device
b) set the third column in first row of Dial Patterns that will use this Route to
NXXNXXXXXX (this is the field before / and 1st of the fields in [ and ])
c) select the trunk created in step 1 above under Trunk Sequence for Matched Routes for
row 0
a) Set extension number4) Click Connectivity -> Inbound routes
b) Set Display name
c) Set password for secret field under Device Options
d) Set nat to Yes for nat field under Device Options (needed if your SIP extension is
out of your home network or behind a firewall)
e) Submit
f) Apply config
a) Provide a name/Description
b) Select Extensions and select your SIP extension created in Step 3 above.
c) Submit
d) Apply config
5) Click Settings -> Asterisk SIP settingsAt this point, you should be able to connect your SIP client to your raspbx within the home network. Make sure it works fine before you actually try to access raspbx from other networks.
a) set NAT to yes (if needed)
b) set proper IP configuration values
c) Submit changes
d) Apply config
amixer cget numid=1
amixer cset numid=1 400
動作二、把Git上的原始檔同步到電腦sudo apt-get install autoconf automake libtool sudo apt-get install libltdl-dev libao-dev libavahi-compat-libdnssd-dev sudo apt-get install avahi-daemon
git clone https://github.com/juhovh/shairplay.git
./autogen.sh
./configure
make
sudo make install
動作四、將3.5mm Jackpot設置為音頻輸出與音量條最大,去除雜音
amixer cset numid=3 1
amixer cset numid=1 400
sudo nano /boot/config.txt
然後在最末行增加
dtparam=audio=on
audio_pwm_mode=2
動作五、啟動測試
然後用iOS產品測試看看能不能找到裝置shairplay -a RaspberryMusic
複製一下內容cd /etc/init.d/ touch shairplay nano shairplay
#!/bin/bash
#
# This starts and stops shairplay
#
### BEGIN INIT INFO
# Provides: shairplay
# Required-Start: $network
# Required-Stop:
# Short-Description: Free portable AirPlay server implementation similar to ShairPort.
# Description: Free portable AirPlay server implementation similar to ShairPort.
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
通過CTRL+O 保存更改, CTRL+X退出編輯器。# Source function library. . /lib/lsb/init-functions DAEMON="/usr/local/bin/shairplay" DAEMON_ARGS="-a RaspberryMusic" AIRPORT_KEY_DIR="/usr/local/share/shairplay" [ -x $binary ] || exit 0 RETVAL=0 start() { echo -n "Starting shairplay: " start-stop-daemon --start --quiet --chdir $AIRPORT_KEY_DIR \ --exec "$DAEMON" -b --oknodo -- $DAEMON_ARGS log_end_msg $? } stop() { echo -n "Shutting down shairplay: " start-stop-daemon --stop --quiet --exec "$DAEMON" \ --retry 1 --oknodo log_end_msg $? } restart() { stop sleep 1 start } case "$1" in start) start ;; stop) stop ;; status) status shairplay ;; restart) restart ;; *) echo "Usage: $0 {start|stop|status|restart}" ;; esac exit 0
執行如下命令,切換到用戶目錄chmod +x /etc/init.d/shairplay update-rc.d shairplay defaults
依次執行如下命令,拷貝airport.keycd ~
在etc/rc.local中添加內容mkdir /usr/local/share/shairplay cp shairplay/airport.key /usr/local/share/shairplay
nano /etc/rc.local
在 exit 0之前 加入這行
/etc/init.d/shairplay start
Copyright © 2009 想成為偉人的普通人
Design by Design Disease for Smashing Magazine | Blogger Templates by Blog and Web