OpenSER安装配置指南
主页
http://www.openser.org
下载
http://www.openser.org/pub/openser/latest-1.2.x/src/openser-1.2.2-tls_src.tar.gz
准备
试验平台为Fedora8, 预先装好了MYSQL-5.0.45;
需要安装相应的MySQL-devel-5.0.45开发包, 到这里下载
http://ftp.plusline.de/mysql/Downloads/MySQL-5.0/MySQL-devel-5.0.45-0.i386.rpm
最好为mysql设置一个root密码。
编译
代码: |
tar zxvf openser-1.2.2-tls_src.tar.gz cd openser-1.2.2-tls # 预先我编译了几个测试的模块和mysql |
代码: |
127.0.0.1 openser.fc8.home |
代码: |
export SIP_DOMAIN=openser.fc8.home |
代码: |
/usr/local/sbin/openser_mysql.sh create |
代码: |
# ----------- global configuration parameters ------------------------ debug=3 # debug level (cmd line: -dddddddddd) # Uncomment these lines to enter debugging mode port=5060 # uncomment the following lines for TLS support # ------------------ module loading ---------------------------------- #set module path # Uncomment this if you want to use SQL database loadmodule "sl.so" # Uncomment this if you want digest authentication # ----------------- setting module-specific parameters --------------- # -- mi_fifo params -- modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo") # -- usrloc params -- modparam("usrloc", "db_mode", 0) # Uncomment this if you want to use SQL database # -- auth params -- # If you set "calculate_ha1" parameter to yes (which true in this config), # -- rr params -- # ------------------------- request routing logic ------------------- # main routing logic route{ # initial sanity checks -- messages with if (msg:len >= 2048 ) { # we record-route all messages -- to make sure that # subsequent messages withing a dialog should take the if (loose_route()) { if (!uri==myself) { # if the request is for other domain use UsrLoc if (method=="REGISTER") { # Uncomment this if you want to use digest authentication save("location");
# native SIP destinations are handled using our USRLOC DB route(1);
|
代码: |
/usr/local/sbin/openserctl add 8001 1111 8001@tcl.com |
代码: |
/usr/local/sbin/openserctl start |
大功告成!使用eyeBeam测试通过. :)
编辑/usr/local/etc/openser/openserctlrc,将mysql相关的条目注释去掉。
代码: |
## your SIP domain ## database type: MYSQL or PGSQL, by defaulte none is loaded ## database host ## database name ## database read/write user # 这条是没有的需要自己添加 ## database read only user ## password for database read only user ## database super user ## type of aliases used: DB - database aliases; UL - usrloc aliases ## control engine: FIFO or UNIXSOCK ## path to FIFO file ## check ACL names; default on (1); off (0) ## ACL names - if VERIFY_ACL is set, only the ACL names from below list ## presence of serweb tables - default "no" ## verbose - debug purposes - default '0' ## do (1) or don't (0) store plaintext passwords |
添加用户