Installing XDS¶
The XDS architecture has the following components:
- XiVO
- Media Server (MDS) (one or more)
An XDS needs also, to interconnect with a provider, a:
- a XiVO Gateway (XGW) (one or more) to interconnect with provider(s),
- a Reporting Server for the centralized call history,
- a CTI Server for the UC features.
This page will guide you through:
- the configuration of the XiVO (see XiVO Configuration section)
- the installation and configuration of the MDS (see Media Server Configuration section)
- the configuration of the XGW (see XiVO Gateway Configuration section)
- and the configuration of the CC (Reporting and CTI Server) (see XiVO CC Configuration section)
Requirements¶
Before starting you need to have 3 servers. Here’s a table summarizing what we are installing. Replace the IP by those you chose.
Server | server1 | server2 | server3 | server4 |
Role | XiVO | XiVO Gateway | Media Server | Reporting/CTI Server |
Name | mds0 | xgw1 | mds1 | cc |
IP Data | 10.32.0.1 | 10.32.0.201 | 10.32.0.101 | 10.32.0.9 |
IP VoIP | 10.32.5.1 | 10.32.5.201 | 10.32.5.101 | 10.32.5.9 |
XiVO Configuration¶
On server1:
- install XiVO (see Installing the System).
- pass the Wizard
AMI configuration¶
Note
Once a media server is defined in webi, Reporting Server will use the VoIP interface for AMI connection to all media servers and XiVO. Here we authorize it on XIVO.
If XiVO CC is installed, do the following steps before adding media server. Otherwise you can first define media servers and do these steps right after XiVO CC installation, but before starting it to prevent problems with fail2ban.
Edit existing file
/etc/asterisk/manager.d/02-xivocc.conf
to add permission for Reporting Server:permit
to authorize the VoIP IP of the Reporting Server. E.g.:... deny=0.0.0.0/0.0.0.0 permit=10.32.5.9/255.255.255.255 permit=10.32.0.9/255.255.255.255 ...
Apply the configuration:
asterisk -rx 'manager reload'
Define Media Servers¶
Note
Here we define our Media Servers (MDS) names and VoIP IP address.
In XiVO webi,
- go to
- Add a line per Media Server (MDS) (below an example for mds1):
- Name: mdsX (e.g. mds1)
- Displayed Name: Media Server X (e.g. Media Server 1)
- IP VoIP: <VoIP IP of mdsX> (e.g. 10.32.5.101) - note: the VoIP streams between XiVO and mdsX will go through this IP
Define Media Servers for Provisionning¶
Note
Here we configure the Media Servers (MDS) for the phones.
In XiVO webi
- go to
- Create a template line per MDS (below the example for mds1):
- Unique name: <mdsX> (e.g. mds1) - note: it must be the same name as the one defined in section Define Media Servers
- Displayed Name: <Media Server X> (e.g. Media Server 1)
- Registrar Main: <VoIP IP of mdsX> (e.g. 10.32.5.101)
- Proxy Main: <VoIP IP of mdsX> (e.g. 10.32.5.101)
Create SIP peers for XDS intra-routing¶
Note
These SIP peers will be used for call routing between XiVO and MDS.
In XiVO webi:
- go to
- create one peer for mds0:
- Name: default - note: it must be default
- Authentication username: default
- Password: <pick a password>
- IP Addressing Type: Static with <VoIP IP of mds0> (e.g. 10.32.5.1)
- Connection type: Peer
- Context: default
- create one peer per mds:
- Name: <mdsX> (e.g. mds1) - note: it must be the same name as the one defined in section Define Media Servers
- Authentication username: <mdsX> (e.g. mds1)
- Password: <pick a password>
- IP Addressing Type: Static with <VoIP IP of mdsX> (e.g. 10.32.5.101)
- Connection type: Peer
- Context: default
Create SIP trunks towards XiVO Gateway¶
Note
This SIP peer and user will be used for call routing between XDS (XiVO and MDS) and XGW.
In XiVO Webi:
- go to
- create one peer per xgw (this peer will handle outgoing call from XDS to the provider via the XGW):
- Name: <xds_out-xgwX> (e.g. xds_out-xgw1)
- Authentication username: <xds_out-xgwX> (e.g. xds_out-xgw1)
- Password: <pick a password>
- IP Addressing Type: Static with <VoIP IP of xgwX> (e.g. 10.32.5.201)
- Connection type: Peer
- Context: default
- in tab
- From User: <xds_out-xgwX> (e.g. xds_out-xgw1)
- create a user (this user will handle incoming call from all XGW to the XDS via XiVO (mds0)):
- Name: xds_in-mds0
- Authentication username: xds_in-mds0
- Password: <pick a password>
- Connection type: User
- Context: from-extern
Create Outgoing Call Rule¶
Note
This outgoing call rule will handle outgoing call from XDS to XGW.
In XiVO Webi:
- go to
- create an outgoing call rule for XDS:
- Trunks: <xds_out-xgwX> (e.g. xds_out-xgw1)
- Extentions: X.
- Callerid: <main DID of the system>
System¶
Note
The MDS need to connect to XiVO database.
In file /etc/postgresql/9.4/main/postgresql.conf
change parameter:
listen_addresses = 'localhost'
to:
listen_addresses = '*'
In file /etc/postgresql/9.4/main/pg_hba.conf
add an authorization per mds to connect to the db (here you could use the IP Data of mdsX):
host asterisk all 10.32.4.201/32 md5
And restart the services:
xivo-service restart all
Media Server Configuration¶
Requirements¶
On server3 install a Debian 9 with:
amd64
architecture,en_US.UTF-8
locale,ext4
filesystem- a hostname correctly set (files
/etc/hosts
and/etc/hostname
must be coherent).
Before installing the MDS you have to have added:
- the MDS to the XiVO configuration (see Define Media Servers section)
- the MDS IP address to the postgresql configuration (see System section)
Installation¶
Important
The MDS installer will ask you:
- the XiVO Data IP Address
- the Media Server you’re installing (taken from the Media Server you declared at step Define Media Servers)
- the Media Server Data IP
- the Reporting Server IP
To install the MDS, download the XiVO installation script:
wget http://mirror.xivo.solutions/mds_install.sh
chmod +x mds_install.sh
and run it:
Important
Use -a
switch to chose the same version as your XiVO (mds0)
./mds_install.sh -a 2018.16-latest
When prompted:
- give the IP of XiVO (mds0): <XiVO Data IP> (e.g. 10.32.0.2)
- select the MDS you’re installing: <mdsX> (e.g. mds1)
- enter the MDS Data IP: <mdsX Data IP> (e.g. 10.32.0.101)
- and finally the Reporting Server Data IP: <reporting Data IP) (e.g. 10.32.0.5)
Configuration¶
To finalize the MDS configuration you have to:
In file
/etc/docker/mds/custom.env
, add the following environment variable:XIVO_VOIP_HOST
with the VoIP IP address of the XiVO (e.g. 10.32.5.1)MDS_PEERNAME
with the name of the SIP peer of this MDS (e.g. mds1) - note as created in step Create SIP peers for XDS intra-routingMDS_PEERSECRET
with the password of the SIP peer of this MDS - note as created in step Create SIP peers for XDS intra-routinge.g.:
cat >> /etc/docker/mds/custom.env << EOF XIVO_VOIP_HOST=10.32.5.1 MDS_PEERNAME=mds1 MDS_PEERSECRET=secret EOF
Create file
/etc/asterisk/manager.d/02-xuc.conf
to add permission for Xuc Server to connect with:secret
must be the same as the secret for xuc user on XiVO,permit
to authorize the VoIP IP of the Reporting Servere.g.:
cat > /etc/asterisk/manager.d/02-xuc.conf << EOF [xuc] secret = muq6IWgNU1Z deny=0.0.0.0/0.0.0.0 permit=10.32.5.9/255.255.255.255 read = system,call,log,verbose,command,agent,user,dtmf,originate,dialplan write = system,call,log,verbose,command,agent,user,dtmf,originate,dialplan writetimeout = 10000 EOF
Restart the services:
xivo-service restart all
XiVO Gateway Configuration¶
On server2:
- install XiVO (see Installing the System).
- pass the Wizard
Create SIP trunks for XDS¶
Note
These SIP peer/user will be used for call routing between XGW and XDS (XiVO and MDS).
In XiVO GW Webi:
- go to
- create one user (this user will handle calls from the XDS to the provider via XGW) - note: this user must match the peer defined in section Create SIP trunks towards XiVO Gateway
- Name: <xds_out-xgwX> (e.g. xds_out-xgw1)
- Authentication username: <xds_out-xgwX> (e.g. xds_out-xgw1)
- Password: <pick a password> (same as in section Create SIP trunks towards XiVO Gateway)
- Connection type: User
- Context: default
- create a peer (this peer will handle calls from the provider towards the XDS (via mds0) through this XGW) - note: this peer must match the user defined in section Create SIP trunks towards XiVO Gateway
- Name: xds_in-mds0
- Authentication username: xds_in-mds0
- Password: <pick a password>
- IP Addressing Type: Static with <VoIP IP of mds0> (e.g. 10.32.5.1)
- Connection type: Peer
- Context: default
- in tab
- From User: xds_in-mds0
Create the Provider Trunk¶
Add on the XGW the trunk towards your provider (it can be an ISDN or SIP trunk).
Create Call Routing on the XGW¶
You then need to create the call routing between the provider and the XDS knowing that:
- calls coming from the XDS towards provider will come in via the trunk
xds_out-xgwX
(e.g. xds_out-xgw1) - and calls coming from the provider towards the XDS have to go out via the trunk
xds_in-mds0
XiVO CC Configuration¶
On server4:
- install a XiVO CC (see Installation)
- configure it
- before starting it, change the AMI configuration on XiVO.
Known Limitations¶
Agent states after XUC restart¶
Restarting XUC server with active calls in XDS environment will result in having some agents in incorrect state. Please see the note in restarting XUC server with active calls.