來試試 VoIP Server,以前都沒想過可以自己架,最近心血來潮找了找,找到 umurmur 這套軟體,他是用C語言寫成的輕量級伺服器軟體,還可以安裝在 openWRT 路由器之類的設備上喔!


環境: Ubuntu Server 16.04

軟體: [umurmur](https://github.com/umurmur/umurmur “umurmur)


下載原始碼 目前最新版本0.2.17

1
2
3
sudo wget https://github.com/umurmur/umurmur/archive/0.2.17.zip
sudo unzip 0.2.17.zip -d /opt
cd /opt/umurmur-0.2.17

安裝必要套件

1
2
sudo apt-get update
sudo apt-get install libconfig-dev libprotobuf-c-dev libssl-dev cmake build-essential

編譯程式並安裝

1
2
3
4
5
6
cd ..
sudo mkdir umurmur-build
cd umurmur-build
sudo cmake ../umurmur-0.2.17/ -DSSL=openssl
sudo make
sudo make install

修改組態

1
sudo vim /usr/local/etc/umurmur.conf

welcometext = “歡迎詞”;
password = “VoIP Password”;
max_users = 最大連線數;
bindport = VoIP 服務 Port; bindaddr = “VoIP 服務 Address”;


設定頻道資訊

name = “頻道名稱”;
parent = “上層頻道名稱”;
description =“頻道描述”;
noenter=true/false; #是否禁止進入
silent = true/false; #是否為安靜模式
position = 0/1/2/3…… #同層頻道排列順序,依照字母排序
password = “頻道密碼”;

設定範例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
channels = ( {   
name = "Root";   
parent = "";   
description = "Root channel. No entry.";   
noenter = true;   
},   
{   
name = "Lobby";   
parent = "Root";   
description = "Lobby channel";   
},   
{   
name = "Silent";   
parent = "Root";   
description = "Silent channel";   
   
silent = true; # Optional. Default is false   
},   
{   
name = "Team A";   
parent = "Lobby";   
description = "The Team A channel";
position = 0; # Optional. Default is 0 and the channels will be shown in alphabetic order.
# password = "nopassword";
},
{
name = "Team B";
parent = "Lobby";
description = "The Team B channel";
position = 1; # Optional. Default is 0 and the channels will be shown in alphabetic order.
password = "bluepassword";
}
);

設定頻道連結

上面修改後下面也要改,否則會錯誤。

source -> 上層頻道 destination -> 下層頻道,以此類推。

設定範例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
channel_links = ( {

source = "Lobby";
destination = "Team A";
},
{
source = "Lobby";
destination = "Team B";
}
);

設定預設頻道

default_channel = “預設頻道名稱”;


啟動程式

若上述組態有設定好,直接執行 umurmurd 即可啟動,若要其他設定依照下方說明設定參數。

uMurmur version 0.2.17 (‘Colin’). Mumble protocol 1.2.4
Usage: umurmurd [-d] [-r] [-h] [-p ] [-t] [-c ] [-a ] [-b ]

-d - Do not daemonize - run in foreground.
-r - Run with realtime priority
-p <pidfile> - Write PID to this file
-c <conf file> - Specify configuration file (default /usr/local/etc/umurmur.conf)
-t - Test config. Error message to stderr + non-zero exit code on error
-a <address> - Bind to IP address
-A <address> - Bind to IPv6 address -b <port> - Bind to port
-B <port> - Bind to port (IPv6) -h - Print this help


連線客戶端

Android: https://play.google.com/store/apps/details?id=com.morlunk.mumbleclient.free

ios: https://itunes.apple.com/tw/app/mumble/id443472808?mt=8

PC: http://download.mumble.com/en/mumble-1.2.19.msi

MAC: http://download.mumble.com/en/mumble-1.2.19.dmg

Linux: http://wiki.mumble.info/wiki/Installing_Mumble#Linux