世界上第一个开源MSRP Relay服务器安装部署测试步骤

世界上第一个开源MSRP Relay服务器安装部署测试步骤

MSRP协议是支持富媒体信息的主要核心协议,通过会话模式对信息进行转发管理。目前比较多的是商用版本的MSRP转发服务器,开源的项目只有一个。具体的安装流程如下:
在Debian系统平台安装MSRP Relay 服务器。

关于MSRP协议的概览,读者可以参考:https://mp.weixin.qq.com/s?__biz=MzA4NjU0NTIwNQ==&mid=2656452464&idx=1&sn=f3b6ea5b4757b2b69fe3427598235369&chksm=8465992ab312103cb5defd953e21fbd87f1892a0e1436d2bd5e14a6aa57e8a8ab90aac00d6f3&token=144318856&lang=zh_CN#rd

安装服务器的主要步骤如下:

// Install as Debian Package
// Add these lines to /etc/apt/sources.list:

# AG Projects software
deb http://ag-projects.com/debian unstable main
deb-src http://ag-projects.com/debian unstable main
// Install the AG Projects debian software signing key:

sudo wget -O /etc/apt/trusted.gpg.d/agp-debian-key.gpg http://download.ag-projects.com/agp-debian-key.gpg
After that, run:

sudo apt-get update
sudo apt-get install mrsprelay

// If you have installed the debian package you can skip forward to the Configure the server section.

// Ubuntu notes
// There is a known compatibility issue with Ubuntu shipped libgcrypt11 library. If you have configured AG Projects debian repository, install this version instead:

sudo apt-get install libgcrypt11=1.5.0-3ubuntu1+agp

// 安装支持包:

Python >=2.5 http://python.org
Twisted >=2.5.0 http://twistedmatrix.com
GnuTLS >=1.4.4 <=2.1 http://www.gnu.org/software/gnutls/ python-gnutls >=1.1.8 http://pypi.python.org/pypi/python-gnutls/
python-application >=1.2.8 http://pypi.python.org/pypi/python-application
python=sqlobject >=0.10.2 http://sqlobject.org

// 下载安装 Download and install MSRPRelay
The software can be downloaded as a tar archive from:
http://download.ag-projects.com/MSRP/
Extract it using tar xzvf msrprelay-version.tar.gz and change directory to the newly created msrprelay directory.

The source code is managed using darcs version control tool. The darcs repository can be fetched with:

darcs get http://devel.ag-projects.com/repositories/msrprelay
To obtain the incremental changes after the initial get, go to the msrprelay directory and run:

cd msrprelay
darcs pull -a

Install the software:

cd msrprelay
python setup.py install
Configure the server
A sample configuration file is provided as config.ini.sample. All configuration options are documented in this file.

Configure the MSRP Relay by copying config.ini.sample to config.ini and editing it. At the very least the certificates need to be provided and the authentication backend needs to be configured.

Generate a TLS certificate/key pair. For documentation on how to do this, see the “tls” directory.

Typically, both TLS certificate/key pair and configuration file would be i nstalled in /etc/msrprelay. This is not needed however, as MSRP Relay looks for the configuration file in its local directory. Alternatively, the configuration filename and location may be specified on the command line using the –config-file option.

If you don’t have a running user database to connect to you can test using the in-memory backend as described.

The software will reload its configuration file when it receives the HUP signal. All of the already established sessions will continue to operate using the old settings until a disconnection occurs within this session. This allows for changes in the configuration without disruption of service.

NOTE: at this moment the backend configurations are not re-read.

Configure DNS
For each domain served by the relay the following DNS record must be added to the name servers authoritative for the domain:

_msrps._tcp.example.com. IN SRV 0 0 2855 msrprelay.example.com.
msrprelay.example.com. IN A 10.0.0.1
Replace the domain name, hostname and IP address with the real ones.

Multiple relays per domain
For allowing multiple relays for each domain you must either:

Create multiple SRV DNS records pointing to multiple hostnames or
Create one SRV record that point to one hostname and add multiple A records for that hostname pointing to multiple IP addesses. When doing so it is important that each relay is configured with a hostname that is resolvable in the DNS to his own IP address.
Running the server
Start the MSRPRelay, either by executing:

./msrprelay --no-fork
or as a daemon, which is the default behaviour.

This can also be done using the init.d script:
// 启动MSRP Relay 服务器
/etc/init.d/msrprelay start
When started as a deamon MSRPRelay will log its messages to syslog.

Testing the server
The “test/” directory contains a number of test scripts and a simple file transfer sender and receiver. See the README in the “test/” directory for documentation on the latter.

To use the relay you need a MSRP client with relay support, here are a few examples:

Command line tool sip-session from http://sipsimpleclient.org
Blink SIP client from http://icanblink.com

评论已关闭。

Proudly powered by SIP协议中文版本 | Theme: Content by SIP