한국어

소프트스위치

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


ubuntu12.04 installation configuration opensips, build voip server

July 10, 2014a comment

By deploying opensips, opensips-cp, rtpproxy, mediaproxy achieve voip call. Tested by Andrews native client authentication, CSipSimple client call (call / receive) 

1 install opensips 
opensips need to compile the source code to install the official website: http: //opensips.org 
File directory: http: //opensips.org/pub/opensips/1.11.2/src/

wget http: // opensips.org / pub / opensips / 1.11.2 / src / opensips-1.11.2_src.tar.gz 
tar xcf opensips-1.11.2_src.tar.gz 
cd opensips-1.11.2-tls / 
make menuconfig

In menuconfig Select -> Configure Compile Options-> Configure Excluded Modules 
Scroll down arrow keys, press the space bar select [*] db_mysql 
2014-07-10_160756
Press the q key to return to the previous level, select -> Configure Install Prefix, input / Enter indicates that the configuration directory is installed in the / directory instead of / usr / local directory. 
2014-07-10_160954
Select -> Save Changes to save the changes. 
2014-07-10_161200
Press q to return, select -> Compile And Install OpenSIPS, Enter installed. 
After installation is complete, the configuration file will be placed in the / etc / opensips directory.Run the file in the / sbin directory. 
If an error occurs depend, first through apt-get install dependencies.

Configuring a opensips 
Enter / etc / opensips directory, run osipsconfig command

cd / etc / opensips 
osipsconfig

Select -> Generate OpenSIPS Script -> Residential Script -> Configure Residential Script 
Select the following items 
[*] ENABLE_TCP 
[*] USE_ALIASES 
[*] USE_AUTH 
[*] USE_DBACC 
[*] USE_DBUSRLOC 
[*] USE_DIALOG 
[*] USE_NAT 
Press q to return, select -> Generate Residential Script Enter, generate a new configuration file.Press q (three times) to exit the command of the new generation of opensips_residential _ *. Cfg file rename opensips.cfg editor

mv opensips_residential_2014- 7 - 10 _16: 19: 22 .cfg opensips.cfg 
vi opensips.cfg

Modified to read as follows

debug = 3 
log_stderror = no 
log_facility = LOG_LOCAL0 

fork = yes 
children = 4 

/ * Uncomment the following lines to enable debugging * / 
# Debug = 6 
# Fork = no 
# Log_stderror = yes 

/ * Uncomment the next line to enable the auto temporary blacklisting of 
not available destinations (default disabled) * / 
# Disable_dns_blacklist = no 

/ * Uncomment the next line to enable IPv6 lookup after IPv4 dns 
lookup failures (default disabled) * / 
# Dns_try_ipv6 = yes 

/ * Comment the next line to enable the auto discovery of local aliases 
based on revers DNS on IPs * / 
auto_aliases = no 

alias = xdty.org # increase alias, modify for your domain 

listen = udp: domain corresponding ip address: 6060 # CUSTOMIZE ME 

disable_tcp = no 
listen = tcp: ip address corresponding to the domain name: 6060 # CUSTOMIZE ME 

disable_tls = yes 


####### Modules Section ######## 

#set module path 
mpath = "/ lib64 / opensips / modules /" # add a slash 

#### SIGNALING module 
loadmodule "signaling.so" 

#### StateLess module 
loadmodule "sl.so" 

#### Transaction Module 
loadmodule "tm.so" 
modparam ("tm", "fr_timer", 5) 
modparam ("tm", "fr_inv_timer", 30) 
modparam ("tm", "restart_fr_on_each_reply", 0) 
modparam ("tm", "onreply_avp_mode", 1) 

#### Record Route Module 
loadmodule "rr.so" 
/ * Do not append from tag to the RR (no need for this script) * / 
modparam ("rr", "append_fromtag", 0) 

#### MAX ForWarD module 
loadmodule "maxfwd.so" 

#### SIP MSG OPerationS module 
loadmodule "sipmsgops.so" 

#### FIFO Management Interface 
loadmodule "mi_fifo.so" 
modparam ("mi_fifo", "fifo_name", "/ tmp / opensips_fifo") 
modparam ("mi_fifo", "fifo_mode", 0666) 


#### URI module 
loadmodule "uri.so" 
modparam ("uri", "use_uri_table", 0) 
modparam ("uri", "db_url", "mysql: // opensips: opensipsrw @ localhost / opensips") # add this line, otherwise an error 

#### MYSQL module 
loadmodule "db_mysql.so" 

#### USeR LOCation module 
loadmodule "usrloc.so" 
modparam ("usrloc", "nat_bflag", "NAT") 
modparam ("usrloc", "db_mode", 2) 
modparam ("usrloc", "db_url", 
"Mysql: // opensips: opensipsrw @ localhost / opensips") # CUSTOMIZE ME 

#### REGISTRAR module 
loadmodule "registrar.so" 
modparam ("registrar", "tcp_persistent_flag", "TCP_PERSISTENT") 
modparam ("registrar", "received_avp", "$ avp (received_nh)") 
/ * Uncomment the next line not to allow more than 10 contacts per AOR * / 
#modparam ("registrar", "max_contacts", 10) 

#### ACCounting module 
loadmodule "acc.so" 
/ * What special events should be accounted? * / 
modparam ("acc", "early_media", 0) 
modparam ("acc", "report_cancels", 0) 
/ * By default we do not adjust the direct of the sequential requests. 
if you enable this parameter, be sure the enable "append_fromtag" 
in "rr" module * / 
modparam ("acc", "detect_direction", 0) 
modparam ("acc", "failed_transaction_flag", "ACC_FAILED") 
/ * Account triggers (flags) * / 
modparam ("acc", "db_flag", "ACC_DO") 
modparam ("acc", "db_missed_flag", "ACC_MISSED") 
modparam ("acc", "db_url", 
"Mysql: // opensips: opensipsrw @ localhost / opensips") # CUSTOMIZE ME 

#### AUTHentication modules 
loadmodule "auth.so" 
loadmodule "auth_db.so" 
modparam ("auth_db", "calculate_ha1", yes) 
modparam ("auth_db", "password_column", "password") 
modparam ("auth_db", "db_url", 
"Mysql: // opensips: opensipsrw @ localhost / opensips") # CUSTOMIZE ME 
modparam ("auth_db", "load_credentials", "") 

#### ALIAS module 
loadmodule "alias_db.so" 
modparam ("alias_db", "db_url", 
"Mysql: // opensips: opensipsrw @ localhost / opensips") # CUSTOMIZE ME 

#### DIALOG module 
loadmodule "dialog.so" 
modparam ("dialog", "dlg_match_mode", 1) 
modparam ("dialog", "default_timeout", 21600) # 6 hours timeout 
modparam ("dialog", "db_mode", 2) 
modparam ("dialog", "db_url", 
"Mysql: // opensips: opensipsrw @ localhost / opensips") # CUSTOMIZE ME 


#### NAT modules 
loadmodule "nathelper.so" 
modparam ("nathelper", "natping_interval", 10) 
modparam ("nathelper", "ping_nated_only", 1) 
modparam ("nathelper", "received_avp", "$ avp (received_nh)") 

loadmodule "rtpproxy.so" 
modparam ("rtpproxy", "rtpproxy_sock", "udp: localhost: 22222") # modify port 

# Increase below this paragraph 
#### MediaProxy module 
loadmodule "mediaproxy.so" 
modparam ("mediaproxy", "disable", 0) 
modparam ("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock") 
modparam ("mediaproxy", "mediaproxy_timeout", 1000) 
modparam ("mediaproxy", "signaling_ip_avp", "$ avp (nat_ip)") 
modparam ("mediaproxy", "media_relay_avp", "$ avp (media_relay)") 
modparam ("mediaproxy", "ice_candidate", "low-priority")

Modify opensipsctlrc file

vi opensipsctlrc

Remove all DB related comments.

SIP_DOMAIN = xdty.org 
DBENGINE = MYSQL 
DBHOST = localhost 
DBNAME = opensips 
DB_PATH = "/ usr / local / etc / opensips dbtext" 
DBRWUSER = opensips 
DBRWPW = "opensipsrw" 
DBROOTUSER = "root" 
USERCOL = "username"

New Database for opensips, increasing domain and user

opensipsctl create 
opensipsctl domain add xdty.org 
opensipsctl add 10000 123456 
opensipsctl add 10001 123456

3 install and configure rtpproxy

apt-get install rtpproxy 
vi / etc / default / rtpproxy

Modified to read as follows

CONTROL_SOCK = udp: 127.0.0.1: 22222 

# Additional options that are passed to the daemon. 
EXTRA_OPTS = "" 
LISTEN_ADDR = your domain name corresponding to the ip address 
EXTRA_OPTS = "-l {LISTEN_ADDR}"

Start rtpproxy

killall rtpproxy 
/ Etc / init.d / rtpproxy start

4 Install and configure mediaproxy 
Key source import source, increasing mediaproxy to /etc/apt/sources.list

wget http: // download.ag-projects.com / agp-debian-gpg.key 
apt-key add agp-debian-gpg.key 
vi / etc / apt / sources.list

Finally, add the location

deb http: // ag-projects.com / ubuntu precise main 
deb-src http: // ag-projects.com / ubuntu precise main

Installation mediaproxy

apt-get update 
apt-get install mediaproxy-dispatcher mediaproxy-relay mediaproxy-web-sessions

Enter / etc / mediaproxy / tls directory, copy this key file, modify the configuration file

cd / etc / mediaproxy / tls / 
cp / usr / share / doc / mediaproxy-common / tls / *. 
cd .. 
vi config.ini

Is similar to the following modifications

[Relay] 
dispatchers = 106.186.23.149 
passport = None 
relay_ip = 106.186.23.149 
port_range = 50000: 60000 
log_level = DEBUG 
stream_timeout = 90 
on_hold_timeout = 7200 
reconnect_delay = 10 
traffic_sampling_period = 15 
[Dispatcher] 
socket_path = dispatcher.sock 
listen = 106.186.23.149 
listen_management = 106.186.23.149 
management_use_tls = yes 
passport = None 

management_passport = None 
log_level = DEBUG 
relay_timeout = 5 
[TLS] 
certs_path = tls 
verify_interval = 300 
[Database] 
[Radius] 
[OpenSIPS] 
socket_path = / var / run / opensips / socket 
max_connections = 10

Start mediaproxy Service

media-dispatcher restart 
media-relay restart

5 Start the service and test <br /> modify the log file configuration is saved in /var/log/opensips.log opensips log

touch / var / log / opensips.log 
chmod 777 / var / log / opensips.log 
vi / etc / rsyslog.d / opensips.conf

Add the following

local0. * / var / log / opensips.log

Increased vim color document automation opensips.log

vi ~ / .vim / filetype.vim

Add the following

au BufNewfile, BufRead / var / log / * set filetype = messages

Restart the syslog service, start opensips

service rsyslog restart 
opensipsctl start

If you start to fail, to see /var/log/opensips.log file for errors.

After the service starts, the firewall to open tcp and udp ports

iptables -I INPUT -p tcp --dport 6060 -j ACCEPT 
iptables -I INPUT -p udp --dport 6060 -j ACCEPT 
iptables-save

Then http://www.yougetsignal.com/tools/open-ports/ view port is open

Mobile Test side installation CSipSimple or other sip client test. Note CSipSimple input is similar to the domain name server xdty.org:6060: form the port, directly enter the account name to call the other phone without the need to enter the domain name when 10,001. If you can call it indicates that the configuration was successful.

Or use native system dials, in Settings -> Call Settings -> Internet Phone Settings | Accounts -> answer the call (tick) | Add Account -> Save. When the display is "master account. Answer the phone" is configured successfully. When calling need to add suffixes like-mail address that 10001@xdty.org, if you can not enter non-numeric characters can be pasted or add a new contact, add the "Internet telephony" in the "Add other fields", enter 10001 @ xdty .org, then click Internet phone can call this contact.

Increase web management features below.

6 Installation and Configuration opensips-cp 
Download the latest version of opensips-cp, location http://sourceforge.net/projects/opensips-cp/ 
According to the INSTALL file to install, operate some of the main configuration database. 
Unzip the file, copy to / under var / www / directory rename opensips 
Install some dependencies

pear install MDB2 #mysql 
pear install log

Change Permissions

chown www-data: www-data web -R

Enter config / tools / admin / add_admin / directory, import the data table

mysql -Dopensips -p <ocp_admin_privileges.mysql 
mysql -uroot opensips 
INSERT INTO ocp_admin_privileges (username, password, ha1, available_tools, permissions) values ​​('admin', 'admin', md5 ('admin: admin'), 'all', 'all');

Enter config / tools / system / cdrviewer / directory

mysql -Dopensips -p <cdrs.mysql 
mysql -Dopensips -p <opensips_cdrs.mysql

Enter cron_job directory, modify the configuration file database information

vi generate-cdrs_mysql.sh

Note, generate-cdrs_mysql.sh in this file "call opensips_cdrs_1_6 ()" may have to be changed to "call opensips_cdrs ()", the name must be consistent with the opensips_cdrs.mysql in the definition. 
Enter config / tools / system / smonitor / directory into the database and add timed tasks.

mysql -Dopensips -p <tables.mysql 
vi / etc / crontab 
* / 3 * * * * root / var / www / opensips / cron_job / generate-cdrs_mysql.sh 
* * * * * Root php / var / www / opensips-cp / cron_job / get_opensips_stats.php> / dev / null

Open a browser to access http: // URL / opensips, using admin / admin login, you can modify the user login name and password.

References:

http://www.cnblogs.com/bjzhanghao/archive/2013/02/13/2910903.html

http://www.docin.com/p-163183480.html

http://www.linuxidc.com/Linux/2014-01/95847.htm

조회 수 :
69271
등록일 :
2014.08.09
15:36:45 (*.160.88.200)
엮인글 :
http://webs.co.kr/index.php?document_srl=190317&act=trackback&key=ebb
게시글 주소 :
http://webs.co.kr/index.php?document_srl=190317
List of Articles