Installation centos6.5 version
The first thing to do is:
Configure the environment.
Specific Web search, not specifically.
1 download the source code:
Change directory to the user‘s home directory
cd~
In the IE browser search window open on the official website download link for the latest version:
http://www.kamailio.org/pub/kamailio/latest/src/
And then
Wget http://www.kamailio.org/pub/kamailio/latest/src/(get version)
As shown in Figure:
Latest version: http://www.kamailio.org/pub/kamailio/latest/src/kamailio-4.3.2_src.tar.gz
Extract to the current directory:
#tar zxvf kamailio-4.3.2_src.tar.gz
#cd kamailio-4.3.2
#make FLAVOUR=kamailio cfg
#Vim modules.lst open modules.lst locate the “exclude_modules“ variable and remove DB_mysql field.
2 compiling
#make all
#make install
Kamailio executable file is installed by default in the/usr/local/sbin directory, and configuration files are installed under the/usr/local/etc/kamailio.
3 configuration
To configure environment variables
Kamailio environment variables are stored in the/usr/local/etc/kamailio/kamctlrc file.
#vi /usr/local/etc/kamailio/kamctlrc
Here is my configuration in this file may be a bit long, I need to modify the options marked in red font for your reference.
————————————————————————————
1 # $Id$
2 #
3 # The Kamailio configuration file for the control tools.
4 #
5 # Here you can set variables used in the kamctl and kamdbctl setup
6 # scripts. Per default all variables here are commented out, the control tools
7 # will use their internal default values.
8
9 ## your SIP domain
10 SIP_DOMAIN=192.168.0.193 (this is the domain name, if you do testing on a local area network, Linux available native IP address, my IP address is this)
11
12 ## chrooted directory
13 # $CHROOT_DIR=”/path/to/chrooted/directory”
14
15 ## database type: MYSQL, PGSQL, ORACLE, DB_BERKELEY, DBTEXT, or SQLITE
16 # by default none is loaded
17 #
18 # If you want to setup a database with kamdbctl, you must at least specify
19 # this parameter.
20 DBENGINE=MYSQL (remove “#“ comment, the following explanation is not the same)
21
22 ## database host
23 DBHOST=localhost
24
25 ## database name (for ORACLE this is TNS name)
26 DBNAME=kamailio
27
28 # database path used by dbtext, db_berkeley or sqlite
29 # DB_PATH=”/usr/local/etc/kamailio/dbtext”
30
31 ## database read/write user
32 DBRWUSER=”kamailio”
33
34 ## password for database read/write user
35 DBRWPW=”kamailiorw”
36
37 ## database read only user
38 DBROUSER=”kamailioro”
39
40 ## password for database read only user
41 DBROPW=”kamailioro”
42
43 ## database access host (from where is kamctl used)
44 DBACCESSHOST=192.168.0.193
45
46 ## database super user (for ORACLE this is ‘scheme-creator’ user)
47 DBROOTUSER=”root”
48
49 # user name column
50 USERCOL=”username”
51
52
53 # SQL definitions
54 # If you change this definitions here, then you must change them
55 # in db/schema/entities.xml too.
56 # FIXME
57
58 # FOREVER=”2030-05-28 21:32:15″
59 # DEFAULT_Q=”1.0″
60
61
62 # Program to calculate a message-digest fingerprint
63 # MD5=”md5sum”
64
65 # awk tool
66 # AWK=”awk”
67
68 # gdb tool
69 # GDB=”gdb”
70
71 # If you use a system with a grep and egrep that is not 100% gnu grep compatible,
72 # e.g. solaris, install the gnu grep (ggrep) and specify this below.
73 #
74 # grep tool
75 # GREP=”grep”
76
77 # egrep tool
78 # EGREP=”egrep”
79
80 # sed tool
81 # SED=”sed”
82
83 # tail tool
84 # LAST_LINE=”tail -n 1″
85
86 # expr tool
87 # EXPR=”expr”
88
89
90 # Describe what additional tables to install. Valid values for the variables
91 # below are yes/no/ask. With ask (default) it will interactively ask the user
92 # for an answer, while yes/no allow for automated, unassisted installs.
93 #
94
95 # If to install tables for the modules in the EXTRA_MODULES variable.
96 # INSTALL_EXTRA_TABLES=ask
97
98 # If to install presence related tables.
99 # INSTALL_PRESENCE_TABLES=ask
100
101 # If to install uid modules related tables.
102 # INSTALL_DBUID_TABLES=ask
103
104 # Define what module tables should be installed.
105 # If you use the postgres database and want to change the installed tables, then you
106 # must also adjust the STANDARD_TABLES or EXTRA_TABLES variable accordingly in the
107 # kamdbctl.base script.
108
109 # Kamailio standard modules
110 # STANDARD_MODULES=”standard acc lcr domain group permissions registrar usrloc msilo
111 # alias_db uri_db speeddial avpops auth_db pdt dialog dispatcher
112 # dialplan”
113
114 # Kamailio extra modules
115 # EXTRA_MODULES=”imc cpl siptrace domainpolicy carrierroute userblacklist htable purple sca”
116
117
118 ## type of aliases used: DB – database aliases; UL – usrloc aliases
119 ## – default: none
120 # ALIASES_TYPE=”DB”
121
122 ## control engine: FIFO or UNIXSOCK
123 ## – default FIFO
124 # CTLENGINE=”FIFO”
125
126 ## path to FIFO file
127 # FIFOPATH=”/var/run/kamailio/kamailio_fifo”
128
129 ## check ACL names; default on (1); off (0)
130 # VERIFY_ACL=1
131
132 ## ACL names – if VERIFY_ACL is set, only the ACL names from below list
133 ## are accepted
134 # ACL_GROUPS=”local ld int voicemail free-pstn”
135
136 ## verbose – debug purposes – default ‘0’
137 VERBOS
138
139 ## do (1) or don’t (0) store plaintext passwords
140 ## in the subscriber table – default ‘1’
141 # STORE_PLAINTEXT_PW=0
142
143 ## Kamailio START Options
144 ## PID file path – default is: /var/run/kamailio.pid
145 PID_FILE=/var/run/kamailio/kamailio.pid
146
147 ## Extra start options – default is: not set
148 # example: start Kamailio with 64MB share memory: STARTOPTIONS=”-m 64″
149 # STARTOPTIONS=
———————————————————————————-
And then
#vi /usr/local/etc/kamailio/kamailio.cfg
In the “####### Defined Values #########“ before this line, add the following lines:
…
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
…
Save and exit!
4 create a database and add account
Execute command to create a database that supports:
# /usr/local/sbin/kamdbctl create
Kamailio service is started
# /usr/local/sbin/kamctl start
Open the kamailio monitor mode (can be skipped … )
# /usr/local/sbin/kamctl moni
Add a user account and password (registration)
# kamctl add 10001 10001
# kamctl add 10002 10002
Two accounts have been added, the previous number is the account number, the latter is the password.
Server-side configuration is almost done …
Next online to find some Android SIP client software, installation and configuration and testing.
I’m using CSipSimple this app.
Mobile client test APP link (due to the attachments greater than 2M cannot upload, post my Web site link)
Http://yunpan.cn/cHgIvYYPnJ6gx access password e096
Or online find the same or similar.
Problems you might encounter:
————————————————-
Tests if the registration is not successful, please check the phone and PC are on the same LAN.
Linux kamailio accounts have added to the server to be registered
Command:
# Kamctl add account password
After successfully adding account
Please check to see if Linux firewall off, mobile security settings have a problem …
————————————————–
Attachments and screenshots:
—————————
Installation centos6.5 version
The first thing to do is:
Configure the environment.
Specific Web search, not specifically.
1 download the source code:
Change directory to the user‘s home directory
cd~
In the IE browser search window open on the official website download link for the latest version:
http://www.kamailio.org/pub/kamailio/latest/src/
And then
Wget http://www.kamailio.org/pub/kamailio/latest/src/(get version)
As shown in Figure:
wKiom1X6fl_R52gkAAHCDGAn7v4030.jpg
Latest version: http://www.kamailio.org/pub/kamailio/latest/src/kamailio-4.3.2_src.tar.gz
Extract to the current directory:
#tar zxvf kamailio-4.3.2_src.tar.gz
#cd kamailio-4.3.2
#make FLAVOUR=kamailio cfg
#Vim modules.lst open modules.lst locate the “exclude_modules“ variable and remove DB_mysql field.
2 compiling
#make all
#make install
Kamailio executable file is installed by default in the/usr/local/sbin directory, and configuration files are installed under the/usr/local/etc/kamailio.
3 configuration
To configure environment variables
Kamailio environment variables are stored in the/usr/local/etc/kamailio/kamctlrc file.
#vi /usr/local/etc/kamailio/kamctlrc
Here is my configuration in this file may be a bit long, I need to modify the options marked in red font for your reference.
————————————————————————————
1 # $Id$
2 #
3 # The Kamailio configuration file for the control tools.
4 #
5 # Here you can set variables used in the kamctl and kamdbctl setup
6 # scripts. Per default all variables here are commented out, the control tools
7 # will use their internal default values.
8
9 ## your SIP domain
10 SIP_DOMAIN=192.168.0.193 (this is the domain name, if you do testing on a local area network, Linux available native IP address, my IP address is this)
11
12 ## chrooted directory
13 # $CHROOT_DIR=”/path/to/chrooted/directory”
14
15 ## database type: MYSQL, PGSQL, ORACLE, DB_BERKELEY, DBTEXT, or SQLITE
16 # by default none is loaded
17 #
18 # If you want to setup a database with kamdbctl, you must at least specify
19 # this parameter.
20 DBENGINE=MYSQL (remove “#“ comment, the following explanation is not the same)
21
22 ## database host
23 DBHOST=localhost
24
25 ## database name (for ORACLE this is TNS name)
26 DBNAME=kamailio
27
28 # database path used by dbtext, db_berkeley or sqlite
29 # DB_PATH=”/usr/local/etc/kamailio/dbtext”
30
31 ## database read/write user
32 DBRWUSER=”kamailio”
33
34 ## password for database read/write user
35 DBRWPW=”kamailiorw”
36
37 ## database read only user
38 DBROUSER=”kamailioro”
39
40 ## password for database read only user
41 DBROPW=”kamailioro”
42
43 ## database access host (from where is kamctl used)
44 DBACCESSHOST=192.168.0.193
45
46 ## database super user (for ORACLE this is ‘scheme-creator’ user)
47 DBROOTUSER=”root”
48
49 # user name column
50 USERCOL=”username”
51
52
53 # SQL definitions
54 # If you change this definitions here, then you must change them
55 # in db/schema/entities.xml too.
56 # FIXME
57
58 # FOREVER=”2030-05-28 21:32:15″
59 # DEFAULT_Q=”1.0″
60
61
62 # Program to calculate a message-digest fingerprint
63 # MD5=”md5sum”
64
65 # awk tool
66 # AWK=”awk”
67
68 # gdb tool
69 # GDB=”gdb”
70
71 # If you use a system with a grep and egrep that is not 100% gnu grep compatible,
72 # e.g. solaris, install the gnu grep (ggrep) and specify this below.
73 #
74 # grep tool
75 # GREP=”grep”
76
77 # egrep tool
78 # EGREP=”egrep”
79
80 # sed tool
81 # SED=”sed”
82
83 # tail tool
84 # LAST_LINE=”tail -n 1″
85
86 # expr tool
87 # EXPR=”expr”
88
89
90 # Describe what additional tables to install. Valid values for the variables
91 # below are yes/no/ask. With ask (default) it will interactively ask the user
92 # for an answer, while yes/no allow for automated, unassisted installs.
93 #
94
95 # If to install tables for the modules in the EXTRA_MODULES variable.
96 # INSTALL_
138
139 ## do (1) or don’t (0) store plaintext passwords
140 ## in the subscriber table – default ‘1’
141 # STORE_PLAINTEXT_PW=0
142
143 ## Kamailio START Options
144 ## PID file path – default is: /var/run/kamailio.pid
145 PID_FILE=/var/run/kamailio/kamailio.pid
146
147 ## Extra start options – default is: not set
148 # example: start Kamailio with 64MB share memory: STARTOPTIONS=”-m 64″
149 # STARTOPTIONS=
———————————————————————————-
And then
#vi /usr/local/etc/kamailio/kamailio.cfg
In the “####### Defined Values #########“ before this line, add the following lines:
…
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
…
Save and exit!
4 create a database and add account
Execute command to create a database that supports:
# /usr/local/sbin/kamdbctl create
Kamailio service is started
# /usr/local/sbin/kamctl start
Open the kamailio monitor mode (can be skipped … )
# /usr/local/sbin/kamctl moni
Add a user account and password (registration)
# kamctl add 10001 10001
# kamctl add 10002 10002
Two accounts have been added, the previous number is the account number, the latter is the password.
Server-side configuration is almost done …
Next online to find some Android SIP client software, installation and configuration and testing.
I’m using CSipSimple this app.
Mobile client test APP link (due to the attachments greater than 2M cannot upload, post my Web site link)
Http://yunpan.cn/cHgIvYYPnJ6gx access password e096
Or online find the same or similar.
Problems you might encounter:
————————————————-
Tests if the registration is not successful, please check the phone and PC are on the same LAN.
Linux kamailio accounts have added to the server to be registered
Command:
# Kamctl add account password
After successfully adding account
Please check to see if Linux firewall off, mobile security settings have a problem …
————————————————–