Board logo

標題: Dongle reset/reload 解決 3G Dongle 失蹤的問題 [打印本頁]

作者: ckleea    時間: 2015-3-1 13:55     標題: Dongle reset/reload 解決 3G Dongle 失蹤的問題

跟據角色 Ching提供的 解決 CMPhone "No Authentication" 的 script
參考
http://www.telecom-cafe.com/foru ... page%3D3&page=1

我改了做 dongle reset/reload script 解決 3G Dongle 失蹤的問題。
  1. #!/bin/sh

  2. #/usr/sbin/asterisk -rx "dongle reset dongle0"
  3. #echo "dongle reset at `date`" >> /var/log/asterisk/dongle.log

  4. dongle_status=`/usr/sbin/asterisk -rx "dongle show devices" | grep " GSM not re"`

  5. if [ "$dongle_status" != "" ]
  6.   then
  7.         /usr/sbin/asterisk -rx "dongle reset dongle0"
  8.         echo $dongle_status >> /var/log/asterisk/dongle.log
  9.         echo "dongle reset at `date`" >> /var/log/asterisk/dongle.log
  10. fi
複製代碼





歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2