freeswitch常見問題

2021-10-06 12:23:44 字數 4169 閱讀 4435

freeswitch常見問題

壓力測試

預設情況下,max_sessions控制最大併發數,預設值1000,sps控制最大的美妙呼叫量,預設值30

系統中可以使用status命令檢視這兩個值,也可以使用以下命令修改這兩個值

freedwitch> fsctl max_sessions 5000

freeswitch> fsctl sps 100

上述命令盡在當前環境生效,如果要永久生效可修改配置檔案conf/autoload_configs/switch.conf.xml修改以下兩個引數

單機崩潰恢復注意的問題

在freeswicth啟動時配置如下引數可自動執行sofia recover

"set" data=

"api_on_startup=sofia recover"/>

雙機ha方案注意的問題

#調整核心引數,允許應用繫結非本機ip

echo

'net.ipv4.ip_nonlocal_bind=1'

>> /etc/sysctl.conf

sysctl -p

在freeswitch的sofia profile中配置odbc(或pgsql)資料庫支援,並且開啟track_calls引數

還需要注意配置檔案中domain的只,需要配誒乙個公共的值(如使用浮動ip或者乙個網域名稱),不能使用預設的本機固定的ip位址

集群分布式需要注意的問題

安裝參考

opensips+freeswitch

yum install gcc-c++ bison lynx subversion flex curl-devel libxslt libxml2-devel libxml2 pcre-devel mysql-devel wget

make

wget -o opensips-2.3.zip

wget

解壓

unzip opensips-2.3.zip
編譯

cd opensips-2.3/

make all include_modules=

"db_mysql"

安裝

make include_modules=

"db_mysql" prefix=

"/usr/local"

install

至此,opensips安裝完成,

配置opensips 連線mysql資料庫

修改配置檔案

vi /usr/local/etc/opensips/opensipsctlrc
刪除以下各行前邊的#(即取消注釋)修改相關的值

dbengine=mysql

dbport=3306 # 預設

dbhost=localhost # 資料庫位址

dbname=opensips # 資料庫名

dbrwuser=opensips # 資料庫使用者,測試為方便建議使用root

dbrwpw=

"opensipsrw"

# dbrwuser對應的資料庫使用者的密碼

dbrootuser=

"root"

新建資料庫

執行命令

opensipsdbctl create

mysql password for root:

輸入資料庫密碼,就可以建立表

登入資料庫,檢視資料庫已建立資料opensips及相關表。

建立啟動檔案

```bash

cp /usr/src/opensips-2.4.4-tls/packaging/rpm/opensips.init /etc/init.d/opensips

sed -i "s/\/usr\/sbin\/opensips/\/usr\/local\/sbin\/opensips/g" /etc/init.d/opensips

sed -i "s/\/etc\/opensips/\/usr\/local\/etc\/opensips/g" /etc/init.d/opensips

sed -i "s/\/etc\/default\/opensips/\/usr\/local\/etc\/opensips/g" /etc/init.d/opensips

sed -i "s/run_opensips=no/run_opensips=yes/g" /etc/init.d/opensips

chmod +x /etc/init.d/opensips

chkconfig opensips on

編輯配置檔案opensips.cfg

mv /usr/local/etc/opensips/opensips.cfg /usr/local/etc/opensips/opensips.cfg.noload

vi /usr/local/etc/opensips/opensips.cfg

udp<>tcp not working

modparam(

"rr", "enable_double_rr", 1)

# instead of 0, 1 is default

modparam(

"path", "use_received", 0)

# instead of 1, 0 is default

「302 moved temporarily」 not working

# in onreply_route[external_reply]:

# instead of calling nat_test_and_correct unconditionally, do it only for non 302's :if(

!t_check_status(

"302"

))

1、如何freeswitch接通後再錄音

需求錄音時不要將前置**錄製進去.

用法在撥號規則中增加

"set" data=

"media_bug_answer_req=true"/>

2、號碼透傳

在找好配置檔案中,通過改動每乙個caller_id_name 和caller_id_number確定了問題所在,只有改動effective_caller_id_name時,才可以正確呼叫並顯示號碼

3、打斷mod_vad

4、當第乙個閘道器呼叫不成功 走第二個閘道器

sofia/gateway/skype/***xx|sofia/gateway/other/***x

bridge sofia/gateway/gw1/***x|sofia/gateway/gw2/***x

4、空號檢測

id name alias description

2 關機 power off 關機

3 空號 does not exis 空號

4 停機 out of service 停機

5 正在通話中 hold on 正在通話中

6 使用者拒接 not convenient 使用者拒接

7 無法接通 is not reachable 無法接通

8 暫停服務 not in service 暫停服務

9 使用者正忙 busy now 使用者正忙

10 撥號方式不正確 not a local number 撥號方式不正確

11 呼入限制 barring of incoming 呼入限制

12 來電提醒 call reminder 各類秘書服務

13 來電轉駁失敗 forwarded 來電轉駁失敗

14 網路忙 line is busy 網路忙

15 無人接聽 not answer 無人接聽

16 欠費 defaulting 欠費

17 無法接聽 cannot be connected 無法接聽

18 改號 number change 改號

19 線路故障 line fault 線路不能呼出,比如sim卡欠費

20 稍後再撥 redial later 各種稍後再撥提示

常見問題 朗動常見問題

常見問題一 方向盤變沉 檢查胎壓是否正常,輪胎是否過度磨損。助力幫浦不工作,前輪氣壓低。冬天的話,冷車在冬天助力油比較稠,方向會重一點。檢查轉向助力油。1 應該是是助力系統有問題或則助力潤滑油有問題。2 如果你在駕車時感覺方向盤變緊,汽車偏向一側,需要檢查輪胎,或進行車輪平衡 定位。在這些問題剛剛發...

面試常見問題 1 this的常見問題

this 的含義 this關鍵字是乙個非常重要的語法點。毫不誇張地說,不理解它的含義,大部分開發任務都無法完成。前一章已經提到,this可以用在建構函式之中,表示例項物件。除此之外,this還可以用在別的場合。但不管是什麼場合,this都有乙個共同點 它總是返回乙個物件。簡單說,this就是屬性或方...

Spring常見問題

1 利用spring框架程式設計,console列印出log4j warn please initialize the log4j system properly?lupa開源社群 u i w.d t 說 明你的log4j.properties沒有配置。請把log4j.properties放到工程的...