您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > opensips 安装及基本配置
opensips安装及基本配置1.官方网站的download中下载opensips软件包2.编译:Java代码1.tarzxvfopensips-1.6.2-tls_src.tar.gz2.cdopensips-1.6.2-tlstarzxvfopensips-1.6.2-tls_src.tar.gzcdopensips-1.6.2-tls3.安装之前更改makefile:删除Makefile中的exclude_modules的db-mysql,使opensips使用mysql数据4.安装makeall可能会缺少一下工具,缺少什么装什么就是了。另外可能提示找不到mysql.h等文件,只要把文件拷贝到对应的地方就行了。makeinstall默认安装路径/usr/local下5.配置vim/usr/local/etc/opensips/opensipsctlrc,把mysql的相关的注释去掉Java代码1.##databasetype:MYSQL,PGSQL,ORACLE,DB_BERKELEY,orDBTEXT,bydefaultnoneisloaded2.#Ifyouwanttosetupadatabasewithopensipsdbctl,youmustatleastspecify3.#thisparameter.4.DBENGINE=MYSQL5.##databasehost6.DBHOST=localhost7.##databasename(forORACLEthisisTNSname)8.DBNAME=opensips9.#databasepathusedbydbtextordb_berkeley10.DB_PATH=/usr/local/etc/opensips/dbtext11.##databaseread/writeuser12.DBRWUSER=opensips13.##passwordfordatabaseread/writeuser14.DBRWPW=opensipsrw15.##databasereadonlyuser16.DBROUSER=opensipsro17.##passwordfordatabasereadonlyuser18.DBROPW=opensipsro19.##databasesuperuser(forORACLEthisis'scheme-creator'user)20.DBROOTUSER=root21.#usernamecolumn22.USERCOL=username##databasetype:MYSQL,PGSQL,ORACLE,DB_BERKELEY,orDBTEXT,bydefaultnoneisloaded#Ifyouwanttosetupadatabasewithopensipsdbctl,youmustatleastspecify#thisparameter.DBENGINE=MYSQL##databasehostDBHOST=localhost##databasename(forORACLEthisisTNSname)DBNAME=opensips#databasepathusedbydbtextordb_berkeleyDB_PATH=/usr/local/etc/opensips/dbtext##databaseread/writeuserDBRWUSER=opensips##passwordfordatabaseread/writeuserDBRWPW=opensipsrw##databasereadonlyuserDBROUSER=opensipsro##passwordfordatabasereadonlyuserDBROPW=opensipsro##databasesuperuser(forORACLEthisis'scheme-creator'user)DBROOTUSER=root#usernamecolumnUSERCOL=username6.执行opensips/sbin/下的opensipsdbctlJava代码1../opensipsdbctlcreate(生成opensips数据库)./opensipsdbctlcreate(生成opensips数据库)7.这个时候如果重新登录phpmyadmin,会看到已经新建了opensips数据库8.opensips的运行Java代码1./usr/local/sbin/下的opensipsctlstart来启动opensips2.psaux|grepopensips检查应该已经运行了。3.opensips/sbin/下的opensipsctlstop来停止opensips/usr/local/sbin/下的opensipsctlstart来启动opensipspsaux|grepopensips检查应该已经运行了。opensips/sbin/下的opensipsctlstop来停止opensips至此基本的opensips配置已经完成了,可以用软件softwarephone来连接到这个sipserver上面并注册成功,不需要先在mysql数据库中添加对应的记录。9.opensips认证功能的实现Java代码1.labuser@cnta02:/etc/init.d$cat/usr/local/etc/opensips/opensips.cfg2.#3.#$Id:opensips.cfg64642009-12-2408:00:54Zbogdan_iancu$4.#5.#OpenSIPSbasicconfigurationscript6.#byAncaVamanuanca@voice-system.ro7.#8.#PleaserefertotheCoreCookBookat:9.#=Resources.DocsCookbooks10.#foraexplanationofpossiblestatements,functionsandparameters.11.#12.13.14.#######GlobalParameters#########15.16.debug=317.log_stderror=no18.log_facility=LOG_LOCAL019.20.fork=yes21.children=422.23./*uncommentthefollowinglinestoenabledebugging*/24.debug=625.#fork=no26.log_stderror=yes27.28./*uncommentthenextlinetodisableTCP(defaulton)*/29.#disable_tcp=yes30.31./*uncommentthenextlinetoenabletheautotemporaryblacklistingof32.notavailabledestinations(defaultdisabled)*/33.#disable_dns_blacklist=no34.35./*uncommentthenextlinetoenableIPv6lookupafterIPv4dns36.lookupfailures(defaultdisabled)*/37.#dns_try_ipv6=yes38.39./*uncommentthenextlinetodisabletheautodiscoveryoflocalaliases40.basedonreversDNSonIPs(defaulton)*/41.#auto_aliases=no42.43./*uncommentthefollowinglinestoenableTLSsupport(defaultoff)*/44.#disable_tls=no45.#listen=tls:your_IP:506146.#tls_verify_server=147.#tls_verify_client=148.#tls_require_client_certificate=049.#tls_method=TLSv150.#tls_certificate=/usr/local/etc/opensips/tls/user/user-cert.pem51.#tls_private_key=/usr/local/etc/opensips/tls/user/user-privkey.pem52.#tls_ca_list=/usr/local/etc/opensips/tls/user/user-calist.pem53.54.55.port=506056.57./*uncommentandconfigurethefollowinglineifyouwantopensipsto58.bindonaspecificinterface/port/proto(defaultbindonallavailable)*/59.#listen=udp:192.168.1.2:506060.61.62.#######ModulesSection########63.64.#setmodulepath65.mpath=/usr/local/lib/opensips/modules/66.67./*uncommentnextlineforMySQLDBsupport*/68.loadmoduledb_mysql.so69.loadmodulesignaling.so70.loadmodulesl.so71.loadmoduletm.so72.loadmodulerr.so73.loadmodulemaxfwd.so74.loadmoduleusrloc.so75.loadmoduleregistrar.so76.loadmoduletextops.so77.loadmodulemi_fifo.so78.loadmoduleuri.so79.loadmodulexlog.so80.loadmoduleacc.so81./*uncommentnextlinesforMySQLbasedauthenticationsupport82.NOTE:aDB(likedb_mysql)modulemustbealsoloaded*/83.loadmoduleauth.so84.loadmoduleauth_db.so85./*uncommentnextlineforaliasessupport86.NOTE:aDB(likedb_mysql)modulemustbealsoloaded*/87.loadmodulealias_db.so88./*uncommentnextlineformulti-domainsupport89.NOTE:aDB(likedb_mysql)modulemustbealsoloaded90.NOTE:besureandenablemulti-domainsupportinallusedmodules91.(seemulti-moduleparamssection)*/92.#loadmoduledomain.so93./*uncommentthenexttwolinesforpresenceserversupport94.NOTE:aDB(likedb_mysql)modulemustbealsoloaded*/95.#loadmodulepresence.so96.#loadmodulepresence_xml.so97.98.99.#-----------------settingmodule-specificparameters---------------100.101.102.#-----mi_fif
本文标题:opensips 安装及基本配置
链接地址:https://www.777doc.com/doc-3956107 .html