Hi carsten, Could compare your installation steps with the once in the log file attached and check if there are differences. I did my installation using that steps and for one version works for the other one i get the parse error.
On 05/30/2016 04:31 PM, Mihail Dakov wrote: > Hi, > Yes I got a different setup with kamailio 4.2.4 where I successfully > register the same UEs. But there we got some kind of issue with the rx > interface and before looking at the code we wanted to update kamailio > version and then see if same rx issue happens. At the moment is not > clear to me the rx issue therefore i couldn't describe it. > > On 05/30/2016 04:28 PM, Carsten Bock wrote: >> Hi Mihail, >> >> you could also see the REGISTER in the PCAP, if you did not configure >> your DNS/BIND properly... >> >> Thanks, >> Carsten >> >> P.S.: I regularly test Zoiper with our own setup, it works... and it >> even should work with the 4.4 version, you're running. >> >> 2016-05-30 17:25 GMT+03:00 Mihail Dakov <[email protected]>: >>> >>> >>> On 05/30/2016 04:11 PM, Carsten Bock wrote: >>>> Hi, >>>> >>>> the Zone-File is the interesting part, not the Bind-Config. >>>> >>>> Did you configure the outbound Proxy on Zoiper properly? >>> Yes, otherwise the REGISTER from the UE would be missing from the pcap, >>> right? >>>> >>>> You can actually see in the trace, that the Proxy-CSCF is forwarding >>>> the packet to itself (looping) and at some point it drops the request. >>>> >>> I see that as well. I eliminated big part of the log as is the loop >>> itself. After some time it gets stable. But to estimate the nature of >>> the loop I get about 1M log lines with debug level 5 for 1 register >>> procedure triggered from the UE. >>> >>> I guess i'll check with the trunk code meanwhile. >>>> Thanks, >>>> Carsten >>>> >>>> 2016-05-30 16:53 GMT+03:00 Mihail Dakov <[email protected]>: >>>>> Hi, >>>>> >>>>> DNS error? This is interesting. Well I got a local bind running with a >>>>> dnszone provided from ims aio from kamailio.org site. You can have a >>>>> look at the bind config which copied adjusting port numbers. >>>>> I would say that it does work: >>>>> >>>>> user@host:etc/kamailio$ host hss >>>>> hss.open-ims.test has address 192.168.177.100 >>>>> user@host:/etc/kamailio$ host icscf >>>>> icscf.open-ims.test has address 192.168.177.100 >>>>> user@host:/etc/kamailio$ host pcscf >>>>> pcscf.open-ims.test has address 192.168.177.100 >>>>> user@host:/etc/kamailio$ host scscf >>>>> scscf.open-ims.test has address 192.168.177.100 >>>>> >>>>> >>>>> >>>>> >>>>> On 05/30/2016 03:40 PM, Carsten Bock wrote: >>>>>> Hi, >>>>>> >>>>>> looks to me, like a typical DNS error. How did you configure DNS? >>>>>> You have BIND up and running and a proper Zone-File? Do the CSCF's >>>>>> properly query the DNS? >>>>>> >>>>>> Thanks, >>>>>> Carsten >>>>>> >>>>>> 2016-05-30 16:35 GMT+03:00 Mihail Dakov <[email protected]>: >>>>>>> Hi Folks, >>>>>>> >>>>>>> I have the strangest problem just after installing latest stable >>>>>>> version. I had tried both ways using the repo >>>>>>> (http://deb.kamailio.org/kamailio44) and downloading code with local >>>>>>> compile (https://www.kamailio.org/w/2016/05/kamailio-v4-4-1-released/) >>>>>>> >>>>>>> The initial scenario is to get M2M with commercial IP and subsequently >>>>>>> use the Rx interface to do the same. We are blocked because we cannot >>>>>>> even achieve clean register for the UEs. >>>>>>> >>>>>>> UE1(galaxy s4 zoiper) -------- Kamailio IMS aio >>>>>>> | >>>>>>> UE2(galaxy s4 zoiper) -------- | >>>>>>> >>>>>>> >>>>>>> What happens is that the first register message triggers some >>>>>>> quasi-endless loop in the PCSCF. Hence it cannot be forwarded to SCSCF, >>>>>>> ICSCF and HSS. But this doesn't always happen and between all the parse >>>>>>> problems there are some register messages which get passed to the scscf >>>>>>> icscf and hss. Somehow the parser feeds itself from the previous parse >>>>>>> run and thus loops quite intensively. The message I get is SIP/2.0 400 >>>>>>> CSeq method does not match request method. >>>>>>> I must say that reiterating the registration process sometimes i get the >>>>>>> register and sometimes i don't. >>>>>>> >>>>>>> Has anyone encounter similar issue for similar use case and can share >>>>>>> some thoughs about a fix? >>>>>>> >>>>>>> I attached relevant log file, pcaps and configuration files. Let me know >>>>>>> if more config files are needed. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>>>>> [email protected] >>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>>> [email protected] >>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>> >>>> >>>> >>>> >>> >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>> [email protected] >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >> >> >> > > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > [email protected] > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >
=======================================================================================================
Installation Debian 8.2 on 29.11.2015 16:18:43
------------------------------------------------
- Use D:\_\SW\Debian 8.2\debian-8.2.0-amd64-i386-netinst.iso
- VMware guest configuration:
- install as "Debian 6"
- install at: C:\Users\Franz\Documents\Virtual Machines\Debian_8.2
- maximum disk size 20 GB
- store virtual disk as a single files
- network connection: bridged
- customize hardware: remove floppy, printer
- Installation:
- 64 bit install
- install language: English
- Country: Austria
- Locales: en_US.UTF-8
- Keymap: German
- Use ethernet connection (cable) otherwise network autoconfiguartion failed
- hostname: server
- domain name: lan
- user:
root / root
Franz Edler / franz / franz
- partitioning method: Guided - use entire disk
- disk SCSI3 (0,0,0) (sda) 21,5 GB VMware Virtual S
- use full disk space for partitioning
- all files in one partition --> SCSI3 (0,0,0) sda
#1 primary 20,5 GB B f ext4 /
#5 logical 922.7 MB f swap swap
- installing the base system ...
- Debian archive mirror: Austria - ftp.at.debian.org
no proxy in home environment
configuring apt ... preparing Linux image
- software selection: only standard system utilities
--> running tasksel (SSH and standard system utilities only) and retrieving 268 packages
- GRUB in MBR, device for bootloader installation: /dev/sda
- guest HW: disconnect CD at power on
- finish and reboot
- IP address assigned: 10.0.0.16 (DHCO dynamically)
Install various SW packages
- apt-get install ssh
change in /etc/ssh/sshd_config: PermitRootLogin --> yes
and restart sshd
continue installation via WinSCP & PUTTy
- apt-get install tcpdump
- apt-get install screen
- pt-get install ntp
- apt-get install ntpdate
ntpdate pool.ntp.org
set interface address - static:
- /etc/network/interfaces:
# The loopback network interface
auto lo
iface lo inet loopback
-> # The primary network interface
allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 10.0.0.20
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1
restart network:
- /etc/init.d/networking restart
--> due to changed interface data eth0 is dead (unknown)
- ifup eth0
- /etc/rc.local
- add "ntpdate pool.ntp.org"
--> no, don't do that!!!
Debian 8.2 uses already systemD instead fo systemV (see comment below)
apt-get install bash-completion --> already installed
- /root/.bashrc
uncomment some lines to e.g.
-> enable "ls" colorized and some shortcuts
and add further
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some alias for convenience
alias cs='cd /opt/SIPp'
alias co='cd /opt/OpenIMSCore'
alias ck='cd /usr/local/etc/kamailio'
# advanced command completion (shows command-options: example dpkg -(tab)(tab)
source /etc/bash_completion
some commands:
root@server:/# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:92:4a:38
inet addr:10.0.0.9 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe92:4a38/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:633 errors:0 dropped:0 overruns:0 frame:0
TX packets:439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:57896 (56.5 KiB) TX bytes:72601 (70.8 KiB)
Interrupt:18 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@server:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
root@server:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 19620732 977244 17623740 6% /
udev 10240 0 10240 0% /dev
tmpfs 204892 4600 200292 3% /run
tmpfs 512220 0 512220 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 512220 0 512220 0% /sys/fs/cgroup
root@server:/# uname -a
Linux server 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux
create and configure DNS:
- apt-get install bind9
- edit /etc/bind/named.conf.local
- create the required zone-files:
net1.test.zone
net2.test.zone
0.0.10.zone
- edit /etc/bind/named.conf.options
- include forwarders (avoid home router as additional hop)
- disable dnssec
- disable (comment) dnssec-validation auto;
- disable (comment) listen-on-v6 { any; };
- /etc/resolv.conf
domain net1.test
search net1.test
nameserver server.net1.test
nameserver server.net1.test
- /etc/hosts
127.0.0.1 localhost
10.0.0.20 server.net1.test server
(disable (via comment) IPv6 addresses - not done)
restart bind and check syslog via command "tail -F /var/log/syslog" for errors
outdated:
- /etc/init.d/bind9 stop
- /etc/init.d/bind9 start
new:
- systemctl stop bind9
- systemctl start bind9
general check and further commands:
- systemctl lists all "units"
- systemctl --type=service lists all "services"
- systemctl disable/enable xxx.service
- systemd-analyze shows duration of last boot
for details see: http://www.admin-magazin.de/Das-Heft/2014/10/Systemstart-mit-Systemd-unter-Linux
check DNS on guest system:
- dig server.net1.test
- dig server.net2.test
reconfigure network adapter on notebook (static config with DNS-server = VMware guest)
check DNS on host system:
- ping server.net1.test
update package administration:
- apt-get check check consistency
- apt-get update update list of available packages
- apt-get upgrade upgrade involved packages to actual version
- apt-get dist-upgrade upgrade involved packages if necessary (in case of special priorities)
- apt-get clean deletes downloaded packages from /var/cache/apt/archives and /var/cache/apt/archives/partial
how to search a packet based on a string (e.g mysql-server):
- apt-cache search <packet>
- apt-cache search mysql-server
== saved as Debian_8.2-step1 on 29.11.2015 21:25:00 =========================================================
============================================================================================================
Install and maintain Kamailio v4.3.4 Version From GIT
-----------------------------------------------------
http://www.kamailio.org/wiki/install/4.3.x/git
1. prerequisites
----------------
apt-get install git-core
apt-get install gcc
apt-get install flex
apt-get install bison
apt-get install libmysqlclient-dev
apt-get install make
apt-get install libssl-dev
apt-get install libcurl4-openssl-dev
apt-get install libxml2-dev
apt-get install libpcre3-dev
install mysql
- apt-get install mysql-server-5.5
root password = root
- enable access to mysql from remote hosts (very generous and dangerous in real world):
mysql -u root -p
GRANT ALL ON *.* TO root IDENTIFIED BY 'root';
quit
- replace bind-address in /etc/mysql/my.cnf to 10.0.0.9 (instead of 127.0.0.1) to enable remote access
- restart mysql and check via command "tail -F /var/log/syslog" for errors
- /etc/init.d/mysql stop
- /etc/init.d/mysql start
- check remote access via MySQL workbench
2. Getting sources from GIT
---------------------------
mkdir -p /usr/local/src/kamailio-4.3
cd /usr/local/src/kamailio-4.3
Download:
git clone --depth 1 --no-single-branch git://git.kamailio.org/kamailio kamailio
cd kamailio
git checkout -b 4.3 origin/4.3
3.Tuning Makefiles
------------------
The first step is to generate build config files.
-> make cfg
Next step is to enable the MySQL module. Edit modules.lst file:
Add db_mysql to the variable include_modules:
-> include_modules=db_mysql ims_usrloc_pcscf ims_registrar_pcscf
(make include_modules="db_mysql" cfg)
4. Compile Kamailio
-------------------
Once you added the mysql module to the list of enabled modules, you can compile Kamailio:
- make all
You can get full compile flags output using:
- make Q=0 all | tee make_all.txt
5. Install Kamailio
-------------------
When the compilation is ready, install Kamailio with the following command:
- make install | tee make_install.txt
(takes long when done a 2nd time)
6. What and where was installed
-------------------------------
The binaries and executable scripts were installed in:
/usr/local/sbin
These are:
kamailio - Kamailio SIP server
kamdbctl - script to create and manage the Databases
kamctl - script to manage and control Kamailio SIP server
sercmd - CLI - command line tool to interface with Kamailio SIP server
To be able to use the binaries from command line, make sure that '/usr/local/sbin' is set in PATH environment variable.
You can check that with 'echo $PATH'. If not and you are using 'bash', open '/root/.bash_profile' and at the end add:
PATH=$PATH:/usr/local/sbin
export PATH
Kamailio modules are installed in:
/usr/local/src/kamailio/modules
/usr/local/lib64/kamailio/modules
The documentation and readme files are installed in:
/usr/local/share/doc/kamailio/
The man pages are installed in:
/usr/local/kamailio-4.3/share/man/
The configuration file was installed in:
/usr/local/etc/kamailio
In case you set the PREFIX variable in 'make cfg
' command, then replace /usr/local in all paths above with the value of PREFIX
in order to locate the files installed.
7. Create MySQL database
------------------------
To create the MySQL database, you have to use the database setup script. First edit kamctlrc file to set the database server type:
nano -w /usr/local/kamailio-4.3/etc/kamailio/kamctlrc
Locate DBENGINE variable and set it to MYSQL:
DBENGINE=MYSQL
You can change other values in kamctlrc file, at least it is recommended to change the default passwords for the users to be created to connect to database.
Once you are done updating kamctlrc file, run the script to create the database used by Kamailio:
/usr/local/kamailio-4.3/sbin/kamdbctl create
--> all database tables created
check database manually;
- mysql -u root -p
- show databases;
- use kamailio;
- show tables;
- select * from subscriber;
or with mysql workbench.
The script will add two users in MySQL:
- kamailio - (with default password 'kamailiorw') - user which has full access rights to 'kamailio' database
- kamailioro - (with default password 'kamailioro') - user which has read-only access rights to 'kamailio' database
Do change the passwords for these two users to something different that the default values that come with sources.
-> not required for lab-application
2 subscribers added via kamctl
- kamctl add alice alice
- kamctl add bob bob
check manually:
- select * from subscriber;
== saved as Debian_8.2-step2 on 01.12.2015 21:33:30 ========================================================
============================================================================================================
8. Edit configuration file
--------------------------
To fit your requirements for the VoIP platform, you have to edit the configuration file.
/usr/local/etc/kamailio/kamailio.cfg
Follow the instruction in the comments to enable usage of MySQL. Basically you have to add several lines at the top of config file, like:
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
If you changed the password for the 'kamailio' user of MySQL, you have to update the value for 'db_url' parameters.
You can browse kamailio.cfg online on GIT repository.
9. The init.d script
--------------------
The init.d script can be used to start/stop the Kamailio server in a nicer way. A sample of init.d script for Kamailio is provided at:
/usr/local/src/kamailio-4.0/kamailio/pkg/kamailio/deb/debian/kamailio.init
Just copy the init file into the /etc/init.d/kamailio. Then change the permissions:
chmod 755 /etc/init.d/kamailio
then edit the file updating the $DAEMON and $CFGFILE values:
DAEMON=/usr/local/sbin/kamailio
CFGFILE=/usr/local/etc/kamailio/kamailio.cfg
You need also setup a configuration file in the /etc/default/ directory. This file can be found at:
/usr/local/src/kamailio-4.0/pkg/kamailio/debian/kamailio.default
You need to rename the file to 'kamailio' after you've copied it. Then edit this file and set RUN_KAMAILIO=yes. Edit the other options at your convenience.
Create the directory for pid file:
mkdir -p /var/run/kamailio
Default setting is to run Kamailio as user kamailio and group kamailio. For that you need to create the user:
adduser --quiet --system --group --disabled-password \
--shell /bin/false --gecos "Kamailio" \
--home /var/run/kamailio kamailio
# set ownership to /var/run/kamailio
chown kamailio:kamailio /var/run/kamailio
Then you can start/stop Kamailio using the following commands:
/etc/init.d/kamailio start
/etc/init.d/kamailio stop
check running processes with: ps axw | egrep kamailio
10. Ready to rock
-----------------
Now everything is in place. You can start the VoIP service, creating new accounts and setting the phones.
A new account can be added using 'kamctl' tool via 'kamctl add <username> <password> <email>'. (or try without the email)
kamctl add test testpasswd [email protected]
If you are asked for SIP_DOMAIN environment variable do one of the following option.
1. export SIP_DOMAIN=mysipserver.com
2. edit '/root/.kamctlrc' and add: SIP_DOMAIN=mysipserver.com
11. Maintenance
--------------
The maintenance process is very simple right now. You have to be user 'root' and execute following commands:
cd /usr/local/src/kamailio-4.0/kamailio
git pull origin
make all
make install
/etc/init.d/kamailio restart
Now you have the latest Kamailio devel running on your system.
12. Time for maintenance service
--------------------------------
Notification about GIT commits are sent to the mailing list: [email protected]. Each commit notification contains the reference to the branch where
the commit has been done. If the commit message contains the lines:
Module: sip-router
Branch: 4.0
then an update has been made to Kamailio devel version and it will be available to the public GIT in no time.
-------------------------------------------------------------------------------------------------------------
Best practice to test:
a) start/stop kamailio in fork mode
- kamctl start
- kamctl stop
b) start stop in foreground (debug) mode:
- kamailio
uses default configuration file with following paameters set (modified)
- log_stderror=yes -> causes log to be shown on console instead of syslog
- fork=no -> no daemon mode
- further parameters: see kamailio -h
Debugging:
- switch "WITH_DEBUG" increases debug level to 3 and also enables debugger module with cfgtrace=1
LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
- alternative: keep "WITH_DEBUG" off and set "log_stderror=yes";
this prints log and error message to console if in foreground mode.
use log and xlog like
log("L_INFO", "FE: message received\n");
xlog("L_INFO", "SIP Request: method [$rm] from [$fu] to [$tu]\n");
later: kamailio.cfg modified: accounting disabled (see ;# statements)
== saved as Debian_8.2-step3 on 08.12.2015 13:06:38 ========================================================
============================================================================================================
Installation of OpenIMSCore FHoSS 08.12.2015 17:24:57
---------------------------------
Precondition for FHoSS:
install Java JDK and ant (required for OpenIMSCore FHoSS)
- apt-get install openjdk-7-jdk -> 374 MB, 189 components
- apt-get install ant
apt-get install subversion
apt-get install ipsec-tools
prepare and/or clean existing OpenIMSCore directories:
remove a previous version of OpenIMScore (if applicable)
root@server:/opt/OpenIMSCore rm -rf ser_ims
root@server:/opt/OpenIMSCore rm -rf FHoSS
delete all files from /opt/OpenIMSCore: rm -rf *
else (if new installation) create working directories for OpenIMSCore:
mkdir /opt/OpenIMSCore
mkdir /opt/OpenIMSCore/ser_ims
mkdir /opt/OpenIMSCore/FHoSS
download sources meanwhile at http://sourceforge.net/projects/openimscore/
cd /opt/OpenIMSCore (shortcode "co")
svn checkout svn://svn.code.sf.net/p/openimscore/code/ser_ims/trunk
--> Checked out revision 1195.
svn checkout svn://svn.code.sf.net/p/openimscore/code/FHoSS/trunk
--> Checked out revision 1195.
Note: trunk subdirectory reneamed to FHoSS and ser_ims
compile:
cd ser_ims
make install-libs all | tee make_install-libs_all.txt
cd ../FHoSS/
ant compile deploy | tee ant_compile_deploy.txt
adapt all configuration files:
change the domain name by using configurator.sh (apply script in three directories):
usage: in order to change the domain name and ip address you can use a script(configurator.sh) at ser_ims/cfg/.
Copy the all *.sql *.cfg *.xml files that you want to modify to the same directory as configurator.sh and execute it.
Follow the instructions then you should have your files reconfigured for new domain and ip.
1. directory: /opt/OpenIMSCore/ser_ims/cfg
cd ../ser_ims/cfg; ./configurator.sh
Domain Name:net1.test
IP Adress:10.0.0.9
File to change ["all" for everything, "exit" to quit]:all
changing: ecscf.cfg icscf.cfg icscf_pg.sql icscf.sql icscf.thig.cfg icscf.xml lrf.cfg mgcf.cfg pcscf.cfg pcscf.xml persist_my.sql persist_pg.sql scscf.cfg scscf.xml TGPPGq.xml TGPPRx.xml trcf.cfg
2. directory: /opt/OpenIMSCore/FHoSS/deploy
cd ../../FHoSS/deploy; cp ../../ser_ims/cfg/configurator.sh .; ./configurator.sh
Domain Name:net1.test
IP Adress:10.0.0.9
3. directory: /opt/OpenIMSCore/FHoSS/scripts
cd ../scripts; cp ../../ser_ims/cfg/configurator.sh .; ./configurator.sh
Domain Name:net1.test
IP Adress:10.0.0.9
File to change ["all" for everything, "exit" to quit]:all
changing: hss_db_migrate_dsai.sql hss_db.sql userdata.sql
prepare mysql database:
in case of OpenIMSCore update drop old databases: icscf and hss_db
mysql -u root -p
drop database icscf;
drop database hss_db;
quit
create new databases: go to directory /opt/OpenIMSCore
cd ../..
mysql -u root -p < ser_ims/cfg/icscf.sql
mysql -u root -p < FHoSS/scripts/hss_db.sql
mysql -u root -p < FHoSS/scripts/userdata.sql
Modify mysql access rights at first time installation (not covered by configurator):
mysql -u root -p
# see last line in hss_db.sql:
--> grant delete,insert,select,update on hss_db.* to [email protected] identified by 'hss';
grant delete,insert,select,update on hss_db.* to [email protected] identified by 'hss';
# see last lines in icscf.sql:
--> grant delete,insert,select,update on icscf.* to [email protected] identified by 'heslo';
grant delete,insert,select,update on icscf.* to [email protected] identified by 'heslo';
--> grant delete,insert,select,update on icscf.* to [email protected] identified by 'provi';
grant delete,insert,select,update on icscf.* to [email protected] identified by 'provi';
check database with MySQL Workbench if domain names are o.k. in various entries
or manually: e.g.
show databases;
use hss_db;
select * from impu;
Prepare script-files, last modifications and start ...
copy config-files and scripts to /opt/OpenIMSCore
cp ser_ims/cfg/*.cfg .; cp ser_ims/cfg/*.xml .
copy killser & stopser from ser_ims/cfg/ to /usr/bin
cp ser_ims/cfg/????ser /usr/bin
copy start scripts for x-CSCF to /root for convenience
cp ser_ims/cfg/pcscf.sh /root; cp ser_ims/cfg/icscf.sh /root; cp ser_ims/cfg/scscf.sh /root
add "cd /opt/OpenIMSCore/" to begin of pcscf.sh, icscf.sh and scscf.sh in directory /root manually
modify /opt/OpenIMSCore/pcscf.cfg: disable nat-ping in case of environment without NAT
modparam("pcscf","NAT_enable", 0)
modparam("pcscf","ping", 0)
disable qop mechanism in scscf.cfg if some clients do not support it (only if needed --> SIPp)
modparam("scscf","registration_qop","")
optional debug output on screen (SIP request trace-points):
set the following debug-statements in ?cscf.cfg in directory /opt/OpenIMSCore/ manually (at the "right" position :-) )
at the loadmodule section:
loadmodule "/opt/OpenIMSCore/ser_ims/modules/xlog/xlog.so"
at the begin of the main route:
xlog("L_INFO","%CybFE: %cs %rm %ru from %si:%sp From: %fu To: %tu\n%Cxx");
copy /opt/OpenIMSCore/FHoSS/deploy/startup.sh to /root/hss.sh
cp /opt/OpenIMSCore/FHoSS/deploy/startup.sh /root/hss.sh
and add
cd /opt/OpenIMSCore/FHoSS/deploy
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
now you are done: good luck!
start platform from /root:
- HSS: ./hss.sh
- P-CSCF: ./pcscf.sh
- I-CSCF: ./icscf.sh
- S-CSCF: ./scscf.sh
access the web-interface of HSS:
http://hss.net1.test:8080/hss.web.console/
user: hssAdmin
password: hss
for generating tracefiles use #tcpdump:
in case of packet-fragmentation trace all packets (including fragments) without SSH and MySQL:
tcpdump -i any -s 3000 -w /var/tmp/ositrace.pcap not port 22 and not port 3306
or alternatively
tcpdump -i any -s 3000 -w /var/tmp/ositrace.pcap port 3868 or 3869 or 3870 or 4060 or 5060 or 6060
successful regstration / call / deregistration with
- Mercuro-Silver
- Boghe IMS client
== saved as Debian_8.2-step4 on 08.12.2015 18:47:088 =======================================================
============================================================================================================
Compatibility with former rc.local:
- solve problem of: systemctl rc-local.service loaded failed failed /etc/rc.local Compatibilityrc-local.service loaded failed failed /etc/rc.local Compatibility
http://superuser.com/questions/278396/systemd-does-not-run-etc-rc-local
file "rc-local.service" created
- systemctl enable rc-local.service
--> The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
Background: about rc.local
- rc.local is from systemV (the way to control the boot process)
- but Debian 8.2 uses systemD
- You can re-enable rc.local it with this command:
- systemctl enable rc-local.service
that enables the Unit /etc/systemd/system/rc-local.service
- But once you are familiar with systemd it is better to create a custom Unit for your purposes rather than using old rc.local
== based on Debian_8.2-step3-basicKamailio =================================================================
============================================================================================================
Installation of the Kamailio-IMS-Packages
-----------------------------------------
http://www.kamailio.org/wiki/tutorials/ims/installation-howto
- followed in principle but binary packages not used!!! compiled instead
compile alls IMS modules generate build config files
- cd /usr/local/src/kamailio-4.3/kamailio/
modify modules.lst for included modules and excluded modules (use saved file)
- include: ims_auth ims_charging ims_icscf ims_isc ims_qos ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf dialog_ng cdp cdp_avp
- exclude: delete included modules above
- compile
make Q=0 all | tee make_all2.txt
- install
make install | tee make_install2.txt
- check additional (included) modules are in /usr/local/lib64/kamailio/modules
create new mysql database for pcscf and scscf
- mysql -u root -p
- CREATE DATABASE `pcscf`;
- CREATE DATABASE `scscf`;
Update mysql database permissions
- grant delete,insert,select,update on pcscf.* to [email protected] identified by 'heslo';
- grant delete,insert,select,update on pcscf.* to [email protected] identified by 'heslo';
- grant delete,insert,select,update on scscf.* to [email protected] identified by 'heslo';
- grant delete,insert,select,update on scscf.* to [email protected] identified by 'heslo';
Modify & add mysql database files for P-CSCF and S-CSCF (ue saved files)
/usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/ims_usrloc_pcscf-create.sql
/usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/ims_usrloc_scscf-create.sql
modifications done:
- add: USE pcscf; or
USE pcscf;
- change: INSERT INTO to REPLACE INTO
- insert before CREATE TABLE xxxxxxx;
DROP TABLE IF EXISTS xxxxxxx;
-> sql-files saved; copy (overvrite) both files to /usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql
Create the tables:
- mysql -u root -p < /usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/ims_usrloc_pcscf-create.sql
- mysql -u root -p < /usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/ims_usrloc_scscf-create.sql
- add also presence-table into scscf-database (saved)
mysql -u root -p < /usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/presence-create.sql
Create ICSCF database;
- mysql -u root -p < /usr/local/src/kamailio-4.3/kamailio/utils/kamctl/mysql/icscf.mysql.sql
- adapt permissions/privileges of users
- grant delete,insert,select,update on icscf.* to [email protected] identified by 'heslo';
- grant delete,insert,select,update on icscf.* to [email protected] identified by 'heslo';
- grant delete,insert,select,update on icscf.* to [email protected] identified by 'provi';
- grant delete,insert,select,update on icscf.* to [email protected] identified by 'provi';
Verify tables with Mysql workbench
- P-SCSF: pcscf.location
- I-CSCF: nds_trusted_domains
s_cscf
s_cscf_capabilities
- S-CSCF: scscf.contact
scscf.impu
scscf.impu_contact
scscf.subscriber
scscf.impu_subscriber
Verify that basic kamilio still works (uses other MySQL database)
Installation of FHoSS 04.01.2016 14:14:46
-----------------------------------------
Precondition for FHoSS:
install Java JDK and ant (required for OpenIMSCore FHoSS)
- apt-get install openjdk-7-jdk -> 198 MB
- apt-get install ant
Download FHoSS
- apt-get install subversion
- (apt-get install ipsec-tools) - not required?
create working directories for OpenIMSCore:
- mkdir /opt/OpenIMSCore
- cd /opt/OpenIMSCore
download:
- svn checkout svn://svn.code.sf.net/p/openimscore/code/FHoSS/trunk
--> Checked out revision 1195.
reneame "/opt/OpenIMSCore/trunk" subdirectory to "/opt/OpenIMSCore/FHoSS"
compile:
cd FHoSS
ant compile deploy | tee ant_compile_deploy.txt
adapt all configuration files:
change the domain name by using configurator.sh (apply script in three directories):
usage: in order to change the domain name and ip address you can use a script(configurator.sh) at ser_ims/cfg/.
Copy the all *.sql *.cfg *.xml files that you want to modify to the same directory as configurator.sh and execute it.
Follow the instructions then you should have your files reconfigured for new domain and ip.
- directory: cd /opt/OpenIMSCore/FHoSS/deploy
copy configurator.sh to this directory and mark it executable (saved on D:\_\ZTest\Kamailio_4.3\IMS)
./configurator.sh
Domain Name:net1.test
IP Adress:10.0.0.9
File to change ["all" for everything, "exit" to quit]:all
changing: c3p0.properties DiameterPeerHSS.xml hibernate.properties hss.properties log4j.properties
- directory: /opt/OpenIMSCore/FHoSS/scripts
cd ../scripts; cp ../deploy/configurator.sh .; ./configurator.sh
Domain Name:net1.test
IP Adress:10.0.0.9
File to change ["all" for everything, "exit" to quit]:all
changing: hss_db_migrate_dsai.sql hss_db.sql userdata.sql
prepare mysql database:
in case of OpenIMSCore update drop old databases: hss_db
mysql -u root -p
drop database hss_db;
quit
create new databases: go to directory /opt/OpenIMSCore
cd ../..
mysql -u root -p < FHoSS/scripts/hss_db.sql
mysql -u root -p < FHoSS/scripts/userdata.sql
Modify mysql access rights at first time installation (not covered by configurator):
mysql -u root -p
# see last line in hss_db.sql:
--> grant delete,insert,select,update on hss_db.* to [email protected] identified by 'hss';
grant delete,insert,select,update on hss_db.* to [email protected] identified by 'hss';
check database with MySQL Workbench if domain names are o.k. in various entries and privileges
or manually: e.g.
show databases;
use hss_db;
select * from impu;
Prepare script-file, last modifications and start ...
copy startup.sh to hss.sh in root directory
cp /opt/OpenIMSCore/FHoSS/deploy/startup.sh /root/hss.sh
and add to hss.sh
cd /opt/OpenIMSCore/FHoSS/deploy
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
start HSS from /root: ./hss.sh
access the web-interface of HSS:
http://hss.net1.test:8080/hss.web.console/
user: hssAdmin
password: hss
configure IMS:
modify pcscf, icscf and scscf configuration-files accordingly
- set parameters according to actual environment
- disable all additional features beyond the IMS core functions
- add a tracepoint (xlog) for each request at the begin of the main route:
xlog("L_INFO","%CybFE: %cs %rm %ru from %si:%sp From: %fu To: %tu\n%Cxx")
P-CSCF:
-------
- use modified files: pcscf.cfg and kamailio-pcscf.cfg
- kamailio -f /usr/local/etc/kamailio/kamailio-pcscf.cfg
I-CSCF:
-------
- use modified files: icscf.cfg and kamailio-icscf.cfg
- kamailio -f /usr/local/etc/kamailio/kamailio-icscf.cfg
- 8(1673) ERROR: cdp [peerstatemachine.c:635]: I_Snd_CER(): I_Snd_CER(): Error on finding local host address > Socket operation on non-socket
S-CSCF
------
- use modified files: scscf.cfg and kamailio-icscf.cfg
- kamailio -f /usr/local/etc/kamailio/kamailio-scscf.cfg
== sDebian_8.2-step5-basicKamailio&basicIMScore on 06.01.2016 12:13:39 ====================================
===========================================================================================================
signature.asc
Description: OpenPGP digital signature
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
