1. 程式人生 > >Asterisk 配置PSTN模擬卡,實現SIP 軟電話通過PSTN固定電話向外打外線電話

Asterisk 配置PSTN模擬卡,實現SIP 軟電話通過PSTN固定電話向外打外線電話

==============================================

檢視硬體配置

# dahdi_hardware

==============================================
檢視dahdi服務配置
more /etc/dahdi/system.conf
顯示下面內容,明顯少了我的PSTN卡配置嘛
# Global data


loadzone        = us
defaultzone     = us


重新生成dahdi服務配置
#dahdi_genconf


再次檢視dahdi服務配置
# more /etc/dahdi/system.conf
顯示
# Autogenerated by /usr/sbin/dahdi_genconf on Wed Aug 15 22:09:20 2012
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCFXO/0 "Wildcard X100P Board 1" (MASTER)
fxsks=1
echocanceller=mg2,1


# Global data


loadzone        = us
defaultzone     = us


重新啟動整個Linux伺服器,以生效dahdi配置變化。

==============================================

檢視Asterisk裡面是否有PSTN通道了

# asterisk -rvvvv

>  dahdi show channels
   Chan Extension  Context         Language   MOH Interpret        Blocked    State
    pseudo            default         en         default                         In Service
      1            from-pstn       en         default                         In Service

==============================================

現在,如果trunk, outbund route正確,使用者可以從SIP phone上聯到這個Asterisk上,並通過PSTN固定電話撥號出去了。

==============================================

遺留問題:

但是配置還不對,沒有針對中國電話系統進行配置,可能出現結束通話電話有問題。