[精讚] [會員登入]
900

[SIP] OPENSER LINUX版本安裝全記錄

[SIP] OPENSER LINUX版本安裝全記錄

分享此文連結 //n.sfs.tw/10294

分享連結 [SIP] OPENSER LINUX版本安裝全記錄@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2019-10-19 11:33:00 最後編修
2016-11-25 22:53:30 By 張○○
 

自動目錄

<此文檔是 2007.11.29 讀研時的記錄,這近清檔案找出來,也許有人用得到,也許>

openser 是網路電話公用的伺服器,他主要的功能是作為網路電話的總機和溝通用的橋樑,此文是安裝的記錄,年代久遠。

系統

# uname -a
Linux ax.er 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux

FEDORA7

安裝

一、按照以往安裝mysql,apache,openser

[root@ax ~]# service openser start
正在啟動 openser:                                          [失敗]
[root@ax ~]# tail /var/log/messages
Nov 27 13:38:43 ax openser: ERROR: load_module: could not open module </usr/lib/openser/modules/mysql.so>: /usr/lib/openser/modules/mysql.so: cannot open shared object file: No such file or directory
Nov 27 13:38:43 ax openser: parse error (40,13-14): failed to load module
Nov 27 13:38:43 ax openser: INFO:mi_fifo:mi_destroy:memory for the child's mi_fifo_pid was not allocated -> nothing to destroy
失敗,後來發現是少了 /usr/lib/openser/modules/mysql.so>: /usr/lib/openser/modules/mysql.so
[root@ax ~]# find / -name 'mysql.so'
/usr/lib/php/modules/mysql.so
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so
[root@ax modules]# ln -s /usr/lib/php/modules/mysql.so mysql.so
拷備過去或是link過去都不行,把之前freebsd上成功的mysql.so拷過來也不行;
原來是要裝openser-mysql-1.2.2-3.fc7.i386.rpm
安裝openser-mysql-1.2.2-3.fc7.i386.rpm 竟然可以裝起來,也可以啟動;以為成功了,不過下
openserctl ps會出錯,意思是和 openser-1.2.2-3.fc7.i386.rpm 相依性不符,因為我裝的不是這個版本
所以移除重裝。
移除+失敗=累-->重新下載  openser-1.2.2-3.fc7.i386.rpm, openser-mysql-1.2.2-3.fc7.i386.rpm兩個檔

[root@ax ~]# rpm -Uvh openser-1.2.2-3.fc7.i386.rpm
error: Failed dependencies:
        libnetsnmp.so.15 is needed by openser-1.2.2-3.fc7.i386
        libnetsnmpagent.so.15 is needed by openser-1.2.2-3.fc7.i386
        libnetsnmphelpers.so.15 is needed by openser-1.2.2-3.fc7.i386
        libnetsnmpmibs.so.15 is needed by openser-1.2.2-3.fc7.i386
        perl(Authen::SASL) is needed by openser-1.2.2-3.fc7.i386
        perl(Net::LDAP) is needed by openser-1.2.2-3.fc7.i386
出現相依性問題。

二、要安裝net-snmp-libs

[root@ax ~]# rpm -ivh net-snmp-libs-5.4-13.fc7.i386.rpm
Preparing...                ########################################### [100%]
   1:net-snmp-libs          ########################################### [100%]

[root@ax ~]# rpm -ivh openser-1.2.2-3.fc7.i386.rpm
error: Failed dependencies:
        perl(Authen::SASL) is needed by openser-1.2.2-3.fc7.i386
        perl(Net::LDAP) is needed by openser-1.2.2-3.fc7.i386
相依性問題少了四個;剩下perl了。
安裝perl
[root@ax ~]# yum install perl*
....
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 perl-Archive-Zip        noarch     1.16-1.2.1       base              138 k
 perl-Authen-Radius      noarch     0.13-1.el5.centos  extras             16 k
 perl-BSD-Resource       i386       1.28-1.fc6.1     base               29 k
 perl-Bit-Vector         i386       6.4-2.2.2.1      base              179 k
 perl-Carp-Clan          noarch     5.3-1.2.1        base               22 k
 perl-Convert-ASN1       noarch     0.20-1.1         base               42 k
 perl-Crypt-SSLeay       i386       0.51-11.el5      base               45 k
 perl-DBD-Pg             i386       1.49-1.fc6       base              114 k
 perl-Data-HexDump       noarch     0.02-1.el5.centos  extras            8.4 k
 perl-Date-Calc          i386       5.4-1.2.2.1      base              269 k
 perl-DateManip          noarch     5.44-1.2.1       base              144 k
 perl-IO-String          noarch     1.08-1.1.1       base               13 k
 perl-LDAP               noarch     1:0.33-3.fc6     base              316 k
 perl-Mail-POP3Client    noarch     2.17-1.el5.centos  extras             21 k
 perl-MailTools          noarch     1.77-1.el5.centos  extras             91 k
 perl-NKF                i386       2.07-1.1.fc6     base              118 k
 perl-Net-IMAP-Simple    noarch     1.17-1.el5.centos  extras             19 k
 perl-Net-IMAP-Simple-SSL  noarch     1.3-1.el5.centos  extras            6.5 k
 perl-Net-Telnet         noarch     3.03-5           base               56 k
 perl-SGMLSpm            noarch     1.03ii-16.2.1    base               17 k
 perl-TimeDate           noarch     1.16-1.el5.centos  extras             36 k
 perl-URI                noarch     1.35-3           base              116 k
 perl-XML-Dumper         noarch     0.81-2.fc6       base               22 k
 perl-XML-Grove          noarch     0.46alpha-29.1.1  base               67 k
 perl-XML-LibXML         i386       1.58-5           base              231 k
 perl-XML-LibXML-Common  i386       0.13-8.2.2       base               16 k
 perl-XML-NamespaceSupport  noarch     1.09-1.2.1       base               15 k
 perl-XML-Parser         i386       2.34-6.1.2.2.1   base              210 k
 perl-XML-SAX            noarch     0.14-5           base               75 k
 perl-XML-Simple         noarch     2.14-4.fc6       base               68 k
 perl-XML-Twig           noarch     3.26-1.fc6       base              192 k
 perl-libwww-perl        noarch     5.805-1.1.1      base              376 k
 perl-libxml-perl        noarch     0.08-1.2.1       base               91 k
 perl-suidperl           i386       4:5.8.8-10.el5_0.2  updates            57 k
Updating:
 perl                    i386       4:5.8.8-10.el5_0.2  updates            12 M
 perl-Net-DNS            i386       0.59-3.el5       updates           215 k

Transaction Summary
=============================================================================
Install     34 Package(s)
Update       2 Package(s)
Remove       0 Package(s)
....

[root@ax ~]# rpm -ivh openser-1.2.2-3.fc7.i386.rpm
error: Failed dependencies:
        perl(Authen::SASL) is needed by openser-1.2.2-3.fc7.i386
還有一個相依性問題用cpan應該可以解決
[root@ax lib]# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install Authen::SASL
失敗,他說他不知道什麼是 install Authen::SASL

到這直接拉檔案 http://search.cpan.org/~gbarr/ 解壓縮
[root@ax Authen-SASL-2.10]# perl Makefile.PL
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...
[DIGEST-MD5 mechanism]
- Digest::MD5      ...loaded. (2.36)
[CRAM-MD5 mechanism]
- Digest::HMAC_MD5 ...loaded. (1.01)
[GSSAPI mechanism]
- GSSAPI           ...loaded. (0.24)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for Authen::SASL

[root@ax Authen-SASL-2.10]# make install
...

問題還是依舊
[root@ax ~]# rpm -ivh openser-1.2.2-3.fc7.i386.rpm
error: Failed dependencies:
        perl(Authen::SASL) is needed by openser-1.2.2-3.fc7.i386
        
可是我明明已經裝了
[root@ax Authen-SASL-2.10]# perldoc perllocal

       Wed Nov 28 12:28:52 2007: "Module" Authen::SASL

       ·   "installed into: /usr/lib/perl5/site_perl/5.8.8"

       ·   "LINKTYPE: dynamic"

       ·   "VERSION: 2.10"

       ·   "EXE_FILES: "

不知道問題在哪?
靈感,我需要靈感;網路上沒人遇過同樣的問題?

三、尋找perl-Authen-SASL套件http://rpmfind.net/linux/RPM/index.html

[root@ax ~]# rpm -ivh perl-Authen-SASL-2.10-1.fc6.noarch.rpm
warning: perl-Authen-SASL-2.10-1.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
error: Failed dependencies:
        perl(GSSAPI) is needed by perl-Authen-SASL-2.10-1.fc6.noarch
相依性問題;再找perl-GSSAPI
[root@ax ~]# rpm -ivh perl-GSSAPI-0.24-1.fc7.i386.rpm
warning: perl-GSSAPI-0.24-1.fc7.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:perl-GSSAPI            ########################################### [100%]
[root@ax ~]# rpm -ivh perl-Authen-SASL-2.10-1.fc6.noarch.rpm
warning: perl-Authen-SASL-2.10-1.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
Preparing...                ########################################### [100%]
   1:perl-Authen-SASL       ########################################### [100%]
裝起來了
再試一次
[root@ax ~]# rpm -ivh openser-1.2.2-3.fc7.i386.rpm
Preparing...                ########################################### [100%]
   1:openser                ########################################### [100%]
可以了,原來那是要裝perl-Authen-SASL,而不是perl module- Authen::SASL
乘勝追擊
[root@ax ~]# rpm -ivh openser-mysql-1.2.2-3.fc7.i386.rpm
Preparing...                ########################################### [100%]
   1:openser-mysql          ########################################### [100%]
好了。
一帆風順,將原來的/etc/openser/openser.cfg 拷回來,啟動
[root@ax openser]# service openser start
正在啟動 openser:
[root@ax openser]# service openser restart
正在停止 openser:                                          [  確定  ]
正在啟動 openser:
[root@ax openser]# openserctl ps
Process::  ID=0 PID=2808 Type=attendant
Process::  ID=1 PID=2813 Type=receiver child=0 sock= 127.0.0.1:5060
Process::  ID=2 PID=2814 Type=receiver child=1 sock= 127.0.0.1:5060
Process::  ID=3 PID=2815 Type=receiver child=2 sock= 127.0.0.1:5060
Process::  ID=4 PID=2816 Type=receiver child=3 sock= 127.0.0.1:5060
Process::  ID=5 PID=2817 Type=receiver child=0 sock= 10.200.8.10:5060
Process::  ID=6 PID=2818 Type=receiver child=1 sock= 10.200.8.10:5060
Process::  ID=7 PID=2826 Type=receiver child=2 sock= 10.200.8.10:5060
Process::  ID=8 PID=2827 Type=receiver child=3 sock= 10.200.8.10:5060
Process::  ID=9 PID=2828 Type=receiver child=0 sock= 218.170.27.115:5060
Process::  ID=10 PID=2829 Type=receiver child=1 sock= 218.170.27.115:5060
Process::  ID=11 PID=2830 Type=receiver child=2 sock= 218.170.27.115:5060
Process::  ID=12 PID=2836 Type=receiver child=3 sock= 218.170.27.115:5060
Process::  ID=13 PID=2839 Type=timer
Process::  ID=14 PID=2840 Type=tcp receiver
Process::  ID=15 PID=2841 Type=tcp receiver
Process::  ID=16 PID=2842 Type=tcp receiver
Process::  ID=17 PID=2843 Type=tcp receiver
Process::  ID=18 PID=2851 Type=tcp main process

成功。
[root@ax ~]# netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 localhost.localdomain:2208  *:*                         LISTEN
tcp        0      0 218-170-27-115.dynamic.:sip *:*                         LISTEN
tcp        0      0 ax.er:sip                   *:*                         LISTEN
tcp        0      0 localhost.localdomain:sip   *:*                         LISTEN
tcp        0      0 *:mysql                     *:*                         LISTEN
tcp        0      0 *:779                       *:*                         LISTEN
tcp        0      0 *:sunrpc                    *:*                         LISTEN
tcp        0      0 ax.er:domain                *:*                         LISTEN
tcp        0      0 localhost.localdomai:domain *:*                         LISTEN
tcp        0      0 localhost.localdomain:ipp   *:*                         LISTEN
tcp        0      0 localhost.localdomain:smtp  *:*                         LISTEN
tcp        0      0 localhost.localdomain:rndc  *:*                         LISTEN
tcp        0      0 localhost.localdomain:2207  *:*                         LISTEN
tcp        0      0 *:http                      *:*                         LISTEN
tcp        0      0 localhost6.localdoma:domain *:*                         LISTEN
tcp        0      0 2001:288:5400:10::10:domain *:*                         LISTEN
tcp        0      0 *:ssh                       *:*                         LISTEN
tcp        0      0 localhost6.localdomain:rndc *:*                         LISTEN
tcp        0    132 ax.er:ssh                   ::ffff:10.200.8.:blackboard ESTABLISHED

有listen sip;

四、建立網域

[root@ax ~]# openserctl domain add ax.er
This command requires a database engine - none was loaded

這是不又是失敗的意思?
看了 vi /usr/sbin/openserctl原來是要修改/etc/openser/openserctlrc
基本上把"#"拿掉,修改的部分如下:

## your SIP domain
SIP_DOMAIN=ax.er
## check ACL names; default on (1); off (0)
VERIFY_ACL=0

## ACL names - if VERIFY_ACL is set, only the ACL names from below list
## are accepted
# ACL_GROUPS="local ld int voicemail free-pstn"

## presence of serweb tables - default "no"
HAS_SERWEB="yes"

## verbose - debug purposes - default '0'
# VERBOSE=1
其餘不變

[root@ax openser]# openserctl domain add ax.er
MySql password for user 'openser@localhost':
INFO: execute '/usr/sbin/openserctl domain reload' to synchronoze cache and                             database

一開始忘了密碼;還好重設就解決了

五、新增使用者

[root@ax openser]# openserctl add axer 123456 axer@ms1.boe.tcc.edu.tw
MySql password for user 'openser@localhost':
new user 'axer' added
他會直接加到subscriber這個表;如此我就不需要再安裝serweb了
openser果然比ser問題少很多。

六、試打安裝話機x-lite

http://www.counterpath.com/xlite-overview.html
X-Lite Features

    * Open Standards based next generation telephony client
    * Session Initiated Protocol (SIP) based signaling for all interactive media sessions
    * Enhanced Quality of Service (QoS) for voice & video calls
    * Comprehensive Personal Address Book, including detailed calls lists and history
    * Zero-Touch Configuration of your audio or video devices
    * Microsoft Outlook? integration allowing users to import their address book into their eyeBeam contact list
    * IM and Presence Management
    * Multi-party and ad hoc Voice and Video Conferencing [IP & PSTN]
    * Voice & Video Call Recording
    * Detachable & Sliding Drawers for quick Video and Contact information
    * Toast pop-ups allowing the management of incoming calls
WINDOWS版本:8.5M
http://storage.counterpath.com/downloads/X-Lite_Win32_1011s_41150.exe
還有LINUX版本

註冊上來了
[root@ax openser]# openserctl monitor

[cycle #: 1; if constant make sure server lives]
Server:: OpenSER (1.2.2-notls (i386/linux))
Now:: Wed Nov 28 13:39:46 2007
Up since:: Wed Nov 28 13:00:41 2007
Up time:: 2345 [sec]

Transaction Statistics:
tm:UAS_transactions = 1
tm:UAC_transactions = 0
tm:inuse_transactions = 0

Stateless Server Statistics:
sl:sent_replies = 4
sl:sent_err_replies = 0
sl:received_ACKs = 0

UsrLoc Stats:
usrloc:registered_users = 1
usrloc:location-users = 1
usrloc:location-contacts = 1
usrloc:location-expires = 0
usrloc:aliases-users = 0
usrloc:aliases-contacts = 0
usrloc:aliases-expires = 0

SIP的協定流程

XLite註冊上的畫面(安裝在windows系統)

正在響的Xlite

 

END

你可能感興趣的文章

時間和時區CST UTC GMT的說明及設定 時間和時區CST DST UTC GMT的說明設定,及php時間的設置

[Linux] 進行字串取代,三種字串取代的方法 使用vi、sed、perl來取代字串

使用sdiff來比對檔案 linux 有一個不錯的工具可以來比對文字檔案,很有效率,叫sdiff

[find] 活用 find 指令參數-exec 執行找到的結果 在linux/ freebsd 中查找檔案最強的就是 find,他有一個參數相當好用:-exec

[CSH/TCSH] 使用tcsh SHELL #1 --變數、控制和迴圈 在FREEBSD或LINUX中使用TCSH SHELL,進行一些基本的指令操作。

[Linux] ls --color 的檔案特徵及顏色意義 ls --color 時看到的檔案特徵及顏色意義及和檔案權限有關的指令

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

[Windows7] 移除IE10及移除IE11 Windows7 不得已的情況要移除IE11或IE10怎麼做?

[札記] 2016.7~12月札記 札記,只是札記

外匯課程經驗 有天遇到某個朋友的正妹朋友,說她有個很棒的外匯投資課程,要我們去聽,只收場地費200大洋。她又說續效最差一個月也有1%,誰還在苦哈哈上班?

[CodeIgniter 3] 資料庫的使用方法整理1/2 --Select的使用 [CodeIgniter 3] 資料庫的使用方法整理:Select的使用

[NetBeans] 使用git複製別人的專案 NetBeans使用git複製別人的專案及版本控制