Bookmark and Share Subscribe
由於Docker是運行在linux系統上的
所以要想在windows上運行docker,需要借助虛擬機
目前的Docker使用微軟自帶的 Hyper-V(從Win8開始)虛擬機組件


所以在安裝Docker 時,會幫打開Hyper-V組件(預設是關閉的)這會和你的VirtualBox衝突,導致VirtualBox無法正常運行

解決辦法就是關閉Hyper-V功能, 反安裝 Docker 時並不會自動幫你關閉






在Raspberry RasPBX上安裝 3G/4G網卡的設定

很怕原始網址消失 所以趕緊把操作步驟存下來

Pre-requisites:
1) Verify your dongle is in the supported list by raspbx/chan_dongle
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
dongle show device state dongle0
This should show that your dongle is connected to whatever network your SIM belongs to.
Now to the actual setup:
In Freepbx:

1) Click Connectivity –> Trunks -> Add Custom Trunk.
a) Provide a trunk name
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
2) Click Connectivity -> Outbound routes
a) Provide a route name
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
3) Click Applications -> Generic SIP device
a) Set extension number
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
4) Click Connectivity -> Inbound routes
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 settings
a) set NAT to yes (if needed)
b) set proper IP configuration values
c) Submit changes
d) Apply config
At 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.
My config was E169 on raspbx(raspberry pi) using an AT&T SIM card in the USA.

Outgoing Settings
username=門號
type=peer
qualify=yes
secret=密碼
outboundproxy=202.133.231.17
insecure=very
host=chiefcall.com.tw
fromuser=門號
fromdomain=chiefcall.com.tw
domain=chiefcall.com.tw
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw,alaw



Incoming Settings
username=門號
type=user
insecure=very
host=202.133.231.17
fromuser=門號
fromdomain=chiefcall.com.tw


最重要
Register String
門號@chiefcall.com.tw:密碼@202.133.231.17/門號

設定完畢後就可以通話了 2019年適用




樹莓派打造 Airplay 音樂


基礎: 音量調整

一、先用amixer cget指令取出可條最大值(每台機器都不同)
amixer cget numid=1


二、再根據最大數值最小數值調整音量
amixer cset numid=1  400







步驟:

開始安裝AirPlay服務,這裡我們全部基於一個GitHub的開源項目進行操作
項目主頁:github.com/juhovh/shair


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 1amixer cset numid=1  400

sudo nano /boot/config.txt
然後在最末行增加
dtparam=audio=on
audio_pwm_mode=2 



shairplay -a RaspberryMusic
 然後用iOS產品測試看看能不能找到裝置
 

動作六、設置開機自動Shairplay

依次執行如下命令,建立一個啟動腳本文件。
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
# 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
 通過CTRL+O 保存更改, CTRL+X退出編輯器。
加入執行權限
依次執行如下命令。賦予腳本執行權限,並且更新配置信息。


chmod +x /etc/init.d/shairplay
update-rc.d shairplay defaults
 執行如下命令,切換到用戶目錄


cd ~
 依次執行如下命令,拷貝airport.key
mkdir /usr/local/share/shairplay
cp shairplay/airport.key /usr/local/share/shairplay
 在etc/rc.local中添加內容
 
 nano /etc/rc.local
在 exit 0之前 加入這行
/etc/init.d/shairplay start










LinkWithin

Related Posts with Thumbnails
top