1、yum安装相关的依赖包 yuminstallygitgcccwgetalsalibdevelautoconfautomakebisonbroadvoicedevelbzip2curldeveldbdevele2fsprogsdevelflitedevelg7221develgdbmdevelgnutlsdevelilbc2develldnsdevellibcodec2devellibcurldevellibeditdevellibidndevellibjpegdevellibmemcacheddevelliboggdevellibsilkdevellibsndfiledevellibtiffdevellibtheoradevellibtoollibvorbisdevellibxml2develluadevellzodevelmongocdriverdevelncursesdevelnetsnmpdevelopenssldevelopusdevelpcredevelperlperlExtUtilsEmbedpkgconfigportaudiodevelpostgresqldevelpython26develpythondevelsoundtouchdevelspeexdevelsqlitedevelunbounddevelunixODBCdevellibuuiddevelwhichyasmzlibdevel 2、安装modshout模块以支持mp3格式 yuminstallylibshoutdevellamedevellibmpg123devel wgethttp:downloads。sourceforge。netprojectlamelame3。99lame3。99。5。tar。gz tarzxvflame3。99。5。tar。gz cdlame3。99。5 。configureenablestaticenableshared make makeinstall vietcld。so。conf 换行加入:usrlocallib 保存退出:wq ldconfig 3、安装cmake yumremovecmake wgethttps:cmake。orgfilesv3。14cmake3。14。0。tar。gz tarvzxfcmake3。14。0。tar。gz cdcmake3。14。0 。configure make makeinstall 4、安装libks yuminstalllibatomic gitclonehttps:github。comsignalwirelibks。git cdlibks cmake。 make makeinstall 5、安装signalwirec gitclonehttps:github。comsignalwiresignalwirec。git cdsignalwirec cmake。 make makeinstall lnsf usrlocallib64pkgconfigsignalwireclient。pc usrlib64pkgconfigsignalwireclient。pc 6、下载并安装freeswitch1。8 如下git为国内址,速度较快,也可以从官方下载源码 gitclonebv1。8https:git。oschina。netnwaycnfreeswitch。git 。bootstrap。shj 。configureenableportablebinary prefixusrlocalfreeswitch withgnuldwithpythonwithopenssl enablecoreodbcsupportenablezrtp enablelibmp3lame make makejinstall 如下安装语音文件,用时会较长 makejcdsoundsinstall makejcdmohinstall 7、安装后的一些操作 设置全局命令软连接 lnsfusrlocalfreeswitchbinfreeswitchusrbin lnsfusrlocalfreeswitchbinfscliusrbin 禁用freeswitch上ipv6 mvexternalipv6。xmlexternalipv6。xml。inactive mvinternalipv6。xmlinternalipv6。xml。inactive 8、启动freeswitch freeswitchnc后台启动 freeswitch常用命令 列出internalSIPProfile的状态 sofiastatusprofileinternal 列出某个Profile上所有已注册用户 sofiastatusprofileinternalreg 过滤某些符合条件 sofiastatusprofileinternalreg1000 sofiastatusprofileinternaluser1000 列出网关状态 sofiastatusgatewaygw1 以上命令都可以将status用xmlstatus来代替,以列出XML格式的状态,这样比较容易用 于其他程序解析 启动、停止、重启某个Profile的命令 sofiaprofileinternalstart启动 sofiaprofileinternalstop停止 sofiaprofileinternalrestart重启 有时候修改了某个Profile的某个参数,不需要重启(重启是影响通话的),可以使用下列 命令让FreeSWITCH重读sofia的配置 注意并不是所有的参数都能生效 sofiaprofileinternalrescan 添加了一个新的gateway以后,也可以使用rescan指令读取 sofiaprofileexternalrescan 如果是修改了一个网关,则可以先删除该网关,再rescan sofiaprofileexternalkillgwgw1 sofiaprofileexternalrescan 下列命令可以指定某个网关立即向外注册或注销 sofiaprofileexternalregistergw1 sofiaprofileexternalunregister 开启该Profile的SIP跟踪功能抓SIP包 sofiaprofileinternalsiptraceon 有时候,希望将已经注册的用户清理掉,可以使用如下命令,注意此命令只是临时清理, 客户端重新注册的话还是可以注册成功的 sofiaprofileinternalflushinboundreg1000192。168。1。7 也可以根据callid来清理 sofiaprofileinternalreg1000通过此命令查找到callid的值 sofiaprofileflushinboundregzsfsdfhdfgdfsdfsdfsdfsdf清除callidzsfsdfhdfgdfsdfsdfsdfsdf的用户