• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            八葉草

            學習資料記錄

            dahdi

            # lspci –vvvv
            Network controller

            # yum install kernel-devel
            reboot

            # cd /usr/src/dahdi-linux-complete-XX
            # cd linux
            # make
            # make install
            # cd tools
            # ./configure
            # make
            # make install
            # make config

            最后會提示
            DAHDI has been configured.
            List of detected DAHDI devices:
            pci:0000:02:09.0     wctdm-       e159:0001 Wildcard TDM400P REV I
            run ‘dahdi_genconf modules’ to load support for only
            the DAHDI hardware installed in this system.  By
            default support for all DAHDI hardware is loaded at
            DAHDI start.
            make[1]: Leaving directory `/root/install/dahdi-linux-complete-2.4.1.2+2.4.1/tools’
            注意這里的wctdm-表示驅動尚未生效。


            # cd ../asterisk-1.8.0 # ./configure # make # make install # make config


            # modprobe dahdi
            # modprobe wctdm opermode=CHINA  (模擬卡)
            # modprobe wct4xxp  (4e1)
            # modprobe wcte11xp (D110P/D110E)
            # modprobe opvxd115 (DE110P_DE110E)



            讀opermode確認參量已經被加載了
            cat /sys/module/wctdm/parameters/opermode
            如果用opvxa1200, 請按下面的命令執行:
            cat /sys/module/opvxa1200/parameters/opermode
            加載了驅動之后,運行dmesg命令去檢查這個mode.

            opermode修改
            具體步驟如下:
            運行:
            1)首先停止asterisk
            asterisk -r
            > stop now

            2)然后退出asterisk的CLI命令行進入Linux Shell命令行, 依次運行下列命令
            service dahdi stop
            modprobe dahdi
            modprobe wctdm opermode=CHINA
            dahdi_cfg -vvvv

            3)運行下列命令: 確定opermode已經修改成功
            cat /sys/module/wctdm/parameters/opermode
            如果結果顯示CHINA表示成功

            4)重啟asterisk
            asterisk -vvvvvvvvgc

            以A1200P和中國模式為例
            在文件/etc/modprobe.d/dahdi.conf中添加一行:
            options opvxa1200 opermode=CHINA
            然后重啟系統就可以了。




            # dahdi_genconf
            /usr/sbin/dahdi_genconf: Failed to open /etc/asterisk/dahdi-channels.conf: No such file or directory
            如果有提示有個asterisk的一個文件沒有找到沒有關系的。

            # echo "#include dahdi-channels.conf" >> /etc/asterisk/chan_dahdi.conf


            system.conf
            loadzone = cn
            defaultzone = cn
            /etc/asterisk/indications.conf
            country=cn

            # dahdi_cfg –vvvvvv
            localhost*CLI> dahdi show channels
            dahdi_hardware
            pci:0000:02:09.0     wctdm+       e159:0001 Wildcard TDM400P REV I
            可以看到+號,表示驅動已經生效。
            這是時候可以看到卡上的4個綠燈長亮。

             

            ls /dev/dahdi/
            1  2  3  4  channel  ctl  pseudo  timer  transcode
            可以看到設備文件已經創建

            cat /proc/dahdi/1
            Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5″ (MASTER)
            1 WCTDM/4/0
            2 WCTDM/4/1 FXSKS RED
            3 WCTDM/4/2 FXSKS RED
            4 WCTDM/4/3 FXSKS RED
            這里可以看到卡的插線狀態 S口因為沒有接計算機電源因此沒有任何狀態。
            3個O口 的RED表示入局電話線沒有信號(沒有插電話線)。

            lspci
            02:09.0 Network controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
            可以看到TDM400P卡的中斷號碼




            PRI

            asterisk cli  pri show spans
            PRI span 1/0: Provisioned, In Alarm, Down, Active (沒通)
            PRI span 1/0: Provisioned, Up, Active (通了)
            日志 /var/log/asterisk/full

            prilocaldialplan
            pridialplan

            1. ; unknown: Unknown
            2. ; private: Private ISDN
            3. ; local: Local ISDN
            4. ; national: National ISDN
            5. ; international: International ISDN
            6. ; dynamic: Dynamically selects the appropriate dialplan
            7. ; redundant: Same as dynamic, except that the underlying number is not
            8. ; changed (not common)





            pridialplan: Sets an option required for some (rare) switches that require a dialplan parameter to be passed. This option is ignored by most PRI switches. It may be necessary on a few pieces of hardware. Valid options are: unknown, local, private, national, and international. This option can almost always be left unchanged from the default. Default: national.
            pridialplan=local 
            pridialplan設置為某些需預先傳入參數的交換設備設定預先傳入參數選項。大多數pri交換機會忽略這個選項,很少數交換機是需要的。正確的選項值為,unknown,local,private,national以及international。

            ISDN PRI Switch Configuration
            If you have a PRI line, specify your type of switch here. (PRI is a type of ISDN typically used to connect a PBX to a telephone exchange. They have multiple channels on the one connection.)
            如果有Pri線路,需要定義交換類型。(pri是ISDN的一種類型,用于連接交換設備,有多種通道類型)

            switchtype: Sets the type of PRI switch being used. Default: national. Acceptable values are:

            national: National ISDN type2 (common in the US)
            ni1: National ISDN type 1
            dms100: Nortel DMS100
            4ess: AT&T 4ESS
            5ess: Lucent 5ESS
            euroisdn: EuroISDN
            qsig: Minimalistic protocol to build a "network" with two or more PBX of different vendors!







            lsmod | grep dahdi

            driver should be 'wctdm' but is actually 'netjet'

            echo "blacklist netjet" >> /etc/modprobe.d/dahdi.blacklist.conf
            reboot
            modprobe
            wcb4xxp


            Zaptel DAHDI 說明
            ztcfg -vv  dahdi_cfg -vv  分析system.conf,配置語音卡參數
            zttool  dahdi_tool  語音卡檢測、測試
            genzaptelconf  dahdi_genconf  生成Asterisk配置文件/etc/dahdi/system.conf 
            ztmonitor   dahdi_monitor 監控錄音某個通道
            ztscan  dahdi_scan 掃描通道狀態
            ztspeed  dahdi_speed 測試CPU占用率
            zttest  dahdi_test 中斷穩定性測試
            ztloop  dahdi_loop 自環測試E1數字中繼語音卡
            dahdi_hardware,顯示檢測到的DAHDI 硬件列表。

            Zaptel 文件名 DAHDI 文件名 說明
            /etc/zaptel.conf  /etc/dahdi/system.conf  主要的配置文件 
            /etc/sysconfig/zaptel  /etc/dahdi/modules, /etc/dahdi/init.conf  開機啟動參數設置 
            /etc/init.d/zaptel  /etc/init.d/dahdi  開機自動載入 
            /etc/asterisk/zapata.conf  /etc/asterisk/chan_dahdi.conf  Asterisk 配置文件 

            查模擬語音卡的IRQ中斷
            cat /proc/interrupts


            85,如何用fxstest測試DAHDI FXS模塊

            硬件環境:A800P(2FXS+1FXO),A400P(2FXS+1FXO),步步高6082G來電顯示有繩電話

            軟件環境:Centos5.5,dahdi-linux-complete-2.3.0.1+2.3.0

            編譯安裝:

            1.輸入以下命令:

            #cd /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0/tools 
            #make menuselect
            

            選擇“fxstest”,然后選擇“Save&Exit”保存退出。

            2. 開始編譯dahdi。輸入以下命令:

            #cd /usr/src/dahdi-linux-complete-2.3.0.1+2.3.0
            #make
            #make install
            #make config
            

             3. 重新加載驅動。

            #service dahdi stop
            #modprobe –r wctdm
            #modprobe –r opvxa1200
            #modprobe –r dahdi
            #modprobe dahdi
            #modprobe opvxa1200 opermode=CHINA
            #modprobe wctdm opermode=CHINA
            #dahdi_genconf
            #dahdi_cfg –vvv (如果沒有報錯,則表示已經OK)
            #dahdi_scan (此命令可以看到語音卡的基本信息及通道信息)
            

            開始測試:

            fxstest命令有兩個固定參數。第一個需要指定操作的設備文件,如/dev/dahdi/1。第二個參數則是需要操作的命令。測試時,FXS口需要接上電話機,不能啟動asterisk。

            1. 查看電壓伏特數

            # fxstest /dev/dahdi/1 stats //A800P第一個通道的電壓
            TIP: -5.6400 Volts
            RING: -54.1440 Volts
            VBAT: -62.7920 Volts
            #fxstest /dev/dahdi/11 stats //A400P第三個通道的電壓
            

            TIP: -5.6400 Volts RING: -54.8960 Volts

            VBAT: -63.9200 Volts

            2. 查看內核寄存器

            # fxstest /dev/dahdi/1 regdump //A800P第一個通道的寄存器
            Direct registers: 
            0. 05 1. 28 2. 18 3. 00 4. 18 5. 00 6. 00 7. 00 
            8. 00 9. 00 10. 08 11. 33 12. 80 13. 10 14. 00 15. 00 
            …
            
            Indirect registers: 
            0. 55c2 1. 51e6 2. 4b85 3. 4937 4. 3333 5. 0202 
            6. 0202 7. 0198 8. 0198 9. 0611 10. 0202 11. 00e5 
            …
            

            3. 播放一串音調。

            # fxstest /dev/dahdi/1 tones 

            這時拿起電話,可以聽到一串音調。按CTRL+C中止。


            4. 傳送dtmfcid。

            #fxstest /dev/dahdi/1 dtmfcid 
            Going to send a set of DTMF tones >A5551212C<
            Phone is ringing
            Ringing Done
            

            電話振鈴時,可以看到來電顯示傳送的cid:5551212

            5. 測試極性反轉。(此項測試必須要在傳送dtmfcid之后,才能正常顯示反轉信息)

            # fxstest /dev/dahdi/1 polarity
             Twiddling polarity...
             Polarity is forward...
             Polarity is reversed...
             Polarity is forward...
            

            6. 發送一串dtmf信號(“-”表示沒有發送信號)。

            # fxstest /dev/dahdi/1 dtmf "12324" 70
            Going to send a set of DTMF tones >12324<
            Using a duration of 70 mS per tone
            

            這時可以在電話來電顯示上看到發送的字符串“12324”,注意:時間要在70ms或以上才能顯示完整的字符串。

            7. 觸發語音信箱等待指示燈、HV、NEON。(A800P不支持此項測試)

            # fxstest /dev/dahdi/11 vmwi
            Twiddling vmwi ...
            Set 1 Voice Message...
            Set 2 Voice Messages...
            Set No Voice messages...
            # fxstest /dev/dahdi/11 hvdc
            Twiddling hvdc ...
            Set 1 Voice Message...
            Set 2 Voice Messages...
            Set No Voice messages...
            # fxstest /dev/dahdi/11 neon
            Twiddling neon ...
            Set 1 Voice Message...
            Set 2 Voice Messages...
            Set No Voice messages...



             -------------------------------------------------------------------

            [trunkgroups]  ;定義一個主干組

            ; define any trunk groups

            [channels]    ;硬件通道和他們選項信令方式.

            ; hardware channels  ;硬件通道

            ; default  ;默認 

            busydetect=yes   ;增加這兩行,否則FXO口不能檢測到掛機信號。
            busycount=5 

            usecallerid=yes    ;設置來電顯示

            hidecallerid=no    ;設置去電不隱藏號碼

            callwaiting=yes   ;設置呼叫等待

            threewaycalling=yes   ;開啟三方通話(先閃斷,再呼叫第三方,再閃斷,就可以實現三方通話)

            transfer=yes    ;轉叫前轉(需要三方通話支持)

            echocancel=yes   ;回聲消除

            echotraining=yes   ;回音練習(會話前發個聲音,用于測試回聲)

            ; define channels  ;定義通道

            context=from-internal    ; Context內執行指令需要在extensions.conf內定義 [from-internal]

            signalling=fxs_ks    ;FXO通道使用FXS信令

            channel => 2 ; PSTN放在端口2上


            Zap Channel Module ConfigurationThe Zap channel module permits Asterisk to communicate with the Zaptel device driver, used to access Zaptel telephony interface cards. You configure Asterisk's Zap channel module in the zapata.conf file.
            Zap channel模塊允許Asterisk與zaptel驅動程序之間通訊。通過配置zapata.conf文件實現

            You will need the Zaptel kernel module device driver installed. See:


            Although TDMoE is not directly related to Zapata hardware, it uses a pseudo-TDM engine, and gets configured here.

            Using MySQL For Zap Channel ConfigurationIt is possible to store configuration settings for the Zap channel driver in a MySQL table, rather than editing the zapata.conf text file. You will have to compile a version of Asterisk with this support built in. See:
            可以把zap channel而配置存儲在mysql表中,而不是zapatap.conf中,這需要版本支持


            The rest of this page assumes you are editing the zapata.conf file by hand.

            Creating ChannelsThe format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:
            zapata.conf文件,沒有看上去那么復雜,大多數關鍵詞自己不做什么,僅僅是定義通道參數,channel關鍵詞才是真正的創建通道。

                signalling=fxo_ks
                language=en
                context=reception
                channel => 1

                signalling=fxo_ks
                language=fr
                context=sales
                channel => 2

            This creates channel 1 with a default language code "en" and a context "reception". Channel 2 has a default language code "fr" and context "sales".

            This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.
            非常重要的是,如果例如在通道前定義echocancel=no,會使影響所有通道,直到定義echocancel=yes,他會往下執行,因此,定義必須在channel=>前面進行定義

            Available Settings
            Signalling TypeThe signalling type to use with your interface is the only mandatory setting. You must set a signalling type before allocating a channel. If you are connecting analog telephone equipment, note that analog phone signalling can be a source of some confusion. FXS channels are signalled with FXO signalling, and vice versa. Asterisk 'talks' to internal devices as the opposite side. An FXO interface card is signalled with FXS signalling by Asterisk, and should be configured as such.
            信令類型是唯一強制設置,在分配一個通道之前,必須定義信令類型。如果連接的模擬電話設備,注意模擬信令是導致混亂的來源。FXS通道采用FXO信令,反之,Asterisk通知內部設備采用相反方式。FXO接口卡采用FXS信令,同樣須定義。

            signalling: Sets the channel signaling type. These parameters should match the Zaptel driver configuration. The setting to use depends partly on which interface card you have. Asterisk will fail to start if a channel signaling definition is incorrect or unworkable, if the statements do not match the Zaptel driver configuration, or if the device is not present or properly configured. The correct setting to use is almost certainly one of the following four: fxs_ks, fxo_ks, pri_cpe or pri_net. This setting has no default value; you must set a value before allocating a channel. Asterisk supports the following signalling types:
            signalling:設置通道信令類型,這些參數須與zaptel驅動配置匹配。設置基于采用什么樣的板卡,如果通道信令設置錯誤,如果配置描述與zaptel驅動配置不匹配,或者如果卡不存在而配置正確,Asterisk不會工作。正確的設置通常包含下面4中信令中一種,fxs_ks, fxo_ks, pri_cpe or pri_net。該設置沒有缺省值,必須在分配通道前設置信令值,下面是Asterisk支持的信令類型。

            • em: E & M Immediate Start
            • em_w: E & M Wink Start
            • em_e1: E & M CAS signalling for E1 lines
            • featd: Feature Group D (The fake, Adtran style, DTMF)
            • featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
            • fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
            • fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
            • featdmf: Feature Group D (The real thing, MF (domestic, US))
            • featb: Feature Group B (MF (domestic, US))
            • fxs_ls: FXS (Loop Start)
            • fxs_gs: FXS (Ground Start)
            • fxs_ks: FXS (Kewl Start)
            • fxo_ls: FXO (Loop Start)
            • fxo_gs: FXO (Ground Start)
            • fxo_ks: FXO (Kewl Start)
            • pri_cpe: PRI signalling, CPE side
            • pri_net: PRI signalling, Network side (for instance, side that provides the dialtone)
            • sf: SF (Inband Tone) Signalling
            • sf_w: SF Wink
            • sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
            • sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
            • sf_featb: SF Feature Group B (MF (domestic, US))
            • e911: E911 (MF) style signalling. Originating switch goes off-hook, far-end winks, originating sends KP-911-ST, far-end gives answer supervision, Originating-end sends KP-0-ANI-ST
            • The following are used for Radio interfaces:
            • fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the channel bank)
            • fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the channel bank)
            • fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the channel bank)
            • fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at the channel bank)
            • em_rx: Receive audio/COR on an E&M interface (1-way)
            • em_tx: Transmit audio/PTT on an E&M interface (1-way)
            • em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface (2-way)
            • em_rxtx: same as em_txrx (for our dyslexic friends)
            • sf_rx: Receive audio/COR on an SF interface (1-way)
            • sf_tx: Transmit audio/PTT on an SF interface (1-way)
            • sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface (2-way)
            • sf_rxtx: same as sf_txrx (for our dyslexic friends)

            PRI通道存在一個空閑Extension和一個微小閑置數字,只要閑置通道是空閑的,ZAP通道模塊就會嘗試在該通道上進行空閑撥號,然后Asterisk就會執行定義為idelext的Context和Extension中的命令。當通道需要進行語音呼叫時,'空閑'呼叫會斷開并讓多數通道有效。(當然盡管有微小閑置呼叫正在運行)。主要的用途是創建動態的服務,當閑置通道綁定了multilnk ppp協議后,將比傳統的多重映射提供更有效率的提供綜合的語音/數據服務。

            minunused: The minimum number of unused channels available. If there are fewer channels available, Asterisk will not attempt to bundle any channels and give them to the data connection. Takes an integer.
            minunused:最小可用閑置通道的數量。如果有很少的通道可用,Asterisk不會嘗試捆綁任何通道進行數據連接。該參數需要一個整數。
            minidle: The minimum number of idle channels to bundle for the data link. Asterisk will keep this number of channels open for data, rather than taking them back for voice channels when needed. Takes an integer.
            minidle:最小綁定進行數據連接的通道數量,Asterisk會為數據開啟這個通道數量,而不是在需要的時候返回到語音通道的使用上。該參數需要一個整數。

            idledial: The number to dial as the idle number. This is typically the number to dial a Remote Access Server (RAS). Channels being idled for data will be sent to this extension. Takes an integer that does not conflict with any other extension in the Dialplan, and has been defined as an idleext.
            idledial: 空閑撥號的數量,這是用于撥叫遠程訪問服務器最基本的一個數字,為數據預留的閑置通道被這個分機。該參數需要一個整數,與在撥號方案中定義了idleext的分機不會產生沖突。

            idleext: The extension to use as the idle extension. Takes a value in the form of exten@context. Typically, the extension would be an extension to run the ZapRAS command.
            idleext:用于空閑分機的extension,以[url=]exten@context[/url]的用法使用,典型的用法是被作為分機運行ZapRAS命令。
               minunused=2
               minidle=1
               idledial=6999
               idleext=6999@idle

            Analog Trunk Features (模擬中繼特征)usedistinctiveringdetection: Whether or not to attempt to recognize distinctive ring styles on incoming calls. This does not require audio analyisis because rings are simple transitions of the analog line. It's merely a matter of matching the transition pattern.
            usedistinctiveringdetection:是否嘗試識別來電特殊鈴音,這不需要音頻分析,因為鈴音在模擬線路上是非常簡單轉換,只需要匹配轉換樣本。缺省值:no
            Default: no.
                usedistinctiveringdetection=yes

            dring1, dring2, dring3: If you set usedistinctiveringdetection=yes, then you may define up to three different distinctive ring styles for Asterisk to attempt to recognize. Each style is defined as a comma separated list of up to three integers. Nobody has yet documented what these numbers mean, so you're on your own when it comes to trying to figure out what numbers to use for the distinctive ring syles used by your phone company in your country. But the tip is to use the Asterisk console in verbose mode, and apparently it reports numbers describing the ring patterns it sees. These patterns may be a starting point:
            dring1, dring2, dring3:如果設置了usedistinctiveringdetection=yes,就需要定義三種不同特點的鈴音風格,以便于Asterisk能夠嘗試識別。每種風格使用逗號分割三個整數來定義。沒有文檔說明三個數字的含義,因此需要自己測試鑒別在不同國家不同公司中,不同數字代表的風格。Asterisk控制臺上也會顯示識別的風格數字,具體風格可能會是以下一些情況。
                dring1=96,0,0
                dring2=325,95,0
                dring3=367,0,0

            dring1context, dring2context, dring3context: Along with setting up to three distinctive ring patterns with dring1, dring2 and dring3, you also set corresponding contexts for incoming calls matching those distinctive ring patterns to jump into. If an incoming call does not match any of the distinctive ring patterns defined, then of course it will enter Asterisk with the default context defined for this channel.
            dring1context, dring2context, dring3context:根據三種不同的鈴音風格設置不同的context進行來電跳轉,如果來電沒有定義的風格匹配,就會進入該通道缺省的congtext。
                dring1context=line2incoming
                dring2context=business
                dring3context=chocolate

            busydetect: If enabled, Asterisk will analyze the audio coming in on the line during a call or a dial attempt to attempt to recognize busy signals. This is useful on analog trunk interfaces both to detect a busy signal when dialing out, and for detecting when the person has hung up. See also Disconnect Supervision. Be sure that you don't use this on digital interfaces like QuadBri cards and so on. Otherwise you will run in "broken calls" problems. default=no
            busydetect:忙音檢測,如果開啟,Asterisk會撥號嘗試或通話中分析在線的音頻,從而嘗試識別忙音信號。這非常在模擬中繼接口上外呼時檢測忙音信號非常有用,可以檢測何時掛機。確認不能在例如QuadBri等卡上使用該參數,否則出現中斷通話的問題,缺省值:no
               busydetect=yes

            busycount: This option requires busydetect=yes. You can specify how many busy tones to wait before hanging up. The default is 3, but better results can be achieved if set to 6 or even 8. The higher the number, the more time is needed to detect a disconnected channel, but the lower the probability mistaking some other sound as being a busy tone.
               busycount=5
            busycount:這個選項需要busydetect=yes,可以定義等待掛機的忙音信號數量,缺省值是3,但能達到的最好效果可能是設置6或者8,數字越高,檢測掛機通道所需要的時間就越長,但小的數字可能會導致把其他聲音錯誤的識別為忙音信號。

            callprogress: Asterisk can attempt to monitor the state of the call to listen for a ringing tone, busy tone, congestion tone, and sounds indicating that the line has been answered. It appears that this feature is independent of the busydetect feature; it seems that both can run in parallel, and both will independently attempt to recognize a busy tone. The callprogress feature is highly experimental and can easily detect false answers, so don't count on it being very accurate. Also, it is currently configured only for standard U.S. phone tones. Default: no.
            callprogress:Asterisk 可以通過嘗試監控呼叫狀態來偵聽振鈴音,忙音,擁塞音以及線路已經應答聲音特征。這個特征不受busydetect特征影響,兩者可以并行處理,獨自嘗試識別忙音信號。callprogress的特征是高實驗證明更容易檢測錯誤應答,所以不要指望它非常準確。因此,目前僅僅在標準美國電話鈴音中配置,缺省值:no
               callprogress = yes

            pulse: The standard installation of Asterisk does not permit you to specify that a Zaptel device use pulse dialing, even though the Zaptel driver supports pulse dialing. But you can apply a patch file to enable you to specify pulse dialing with the pulse keyword. See Pulse Dialing on Zap Channels for the patch.
            pulse:Asterisk標準安裝中,沒有允許定義Zaptel卡使用脈沖撥號,盡管Zaptel驅動支持脈沖撥號,但可以更新補丁文件,使用pulse關鍵字去開啟脈沖撥號。
                pulse=yes


            Analog Handset Features 模擬電話特征adsi: If your handset has ADSI (Analog Display Services Interface) capability, set set adsi=yes. The ADSI specification is system similar to Caller ID to pass encoded information to an analog handset. It allows the creation of interactive visual menus on a multiline display, offering access to services such as voicemail through a text interface.
            adsi:如果手持設備支持ADSI(模擬顯示服務接口),設置set adsi=yes,ADSI類似來電顯示功能,傳遞編碼信息到手持設備。它可以在多行顯示的手持設備上創建交互式可視化菜單,通過文本接口提供類似語音郵件的訪問服務。

            immediate: Normally (i.e. with immediate set to 'no', the default), when you lift an FXS handset, the Zaptel driver provides you a dialtone and listens for digits that you dial, passing them on to Asterisk. Asterisk waits until the number you've dialed matches an extension, and then begins executing the first command on the matching extension. If you set immediate=yes, then Asterisk will instruct the Zaptel driver to not generate a dialtone when you lift a handset, instead passing control immediately to Asterisk. Asterisk will start executing the commands for this channel's "s" extension. This is sometimes referred to as "batphone mode". Default: no.
            immediate:通常(immediate設置為no,缺省值),當FXS話機掛機時,Zaptel驅動會馬上提供撥號音,等待撥號并傳遞給Asterisk。 Asterisk等到接收到extension匹配號碼時,就會開始執行相應的命令,如果設置 immediate=yes,Asterisk會命令 Zaptel驅動不要在FXS掛機時產生撥號音,而是把控制權交還給Asterisk,Asterisk會開始執行這個通道的s extension。這通常應用于batphone 模式(蝙蝠電話?),缺省No
                immediate=yes

            callwaiting: If enabled, Asterisk will generate "call waiting pips" when you are already in a conversation on your FXS handset when someone tries to call you. If the channel has call waiting by default, you can temporarily disable it by lifting the handset and dialing *70, whereupon you will get a dialrecall tone and may then dial the intended number. There is no corresponding way to temporarily enable call waiting for channels that have it off by default. Default: no.
            callwaiting:如果開啟,在通話過程中如果有來電時,Asterisk就會產生呼叫等待提示音。如果通道缺省有呼叫等待,可以臨時摘機按鍵*70取消,這種情況下,會收到重播提示音去撥打希望撥打的號碼。沒有合適的方法臨時開啟缺省設置為關閉的通道的呼叫等待。缺省為no
                callwaiting=yes

            callwaitingcallerid: Sets whether Asterisk will send Caller ID data to the handset during call waiting indication. Requires also setting callwaiting=yes. Default: no.
            callwaitingcallerid:設置在呼叫等待過程中是否傳送主叫號碼等數據,需要設置callwaiting=yes,缺省值:no
                callwaitingcallerid=yes

            threewaycalling: If enabled, you can place a call on hold by pressing a hook flash, whereupon you get a dialrecall tone and can make another call. Default: no.
            threewaycalling:(三方通話)如果設置開啟,可以在按保持鍵切換話路,讓原通話處于保持狀態,這時會收到重撥提示音,并開啟另外一方通話。缺省值:no
                threewaycalling=yes

            transfer: This option has effect only when threewaycalling=yes. If threewaycalling=yes and transfer=yes, then once you've placed a call on hold with a hook flash, you can transfer that call to another extension by dialing the extension and hanging up. Default: no.
            transfer:(呼叫轉接)這個選項僅當三方通話=yes時有效,當設置了三方通話和呼叫轉接,一旦通過或呼叫保持按鍵把當前話路置于保持狀態,就可以撥號呼叫另外分機,把2個話路橋接起來,然后掛機。缺省值:no
                transfer=yes

            cancallforward: If enabled, you may activate "call forwarding immediate" by dialing *72 (whereupon you get a dialrecall tone) followed by the extension number you wish to forward your calls to. If someone dials your extension, the call will be redirected to the forwarding number. You may disable the call forwarding by dialing *73. Default: no.
            cancallforward:如果呼叫前轉啟用,可以通過撥號*72+想要轉向的Extension,立刻激活呼叫前轉(同時會有重撥提示音),這時如果有來話,那么呼叫會被重定向到設置的轉移號碼上,可以通過撥打*73取消呼叫前轉。缺省值:no
                cancallforward=yes

            callreturn: If enabled, you may dial *69 to have Asterisk read to you the caller ID of the last person to call. You will hear the dialrecall tone if there is no record of a last caller. Default: no.
            callreturn:如果開啟此設置,可以通過撥打*69讓Asterisk讀出最后呼入的主叫號碼,如果沒有記錄最后呼叫主叫號碼,將聽到重撥提示音,缺省值:no
                callreturn=yes

            callgroup: A channel may belong to zero or more callgroups. Callgroups specify who may answer this phone when it is ringing. If this channel is ringing, then any other channel whose pickupgroups include one of this channel's callgroups may answer the call by dialing *8#. This feature is supported by Zap, SIP, Skinny and MGCP channels. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
            callgroup:通道可以不屬于或者屬于多個呼叫群組。呼叫群組定義了當電話振鈴時,誰可以接聽。當一個通道振鈴時,其它那些pickupgroups中包含該通道 callgroups其中之一的通道可以通過按*8#來接聽電話。這個特性支持在ZAP,SIP。skinny和MGCP通道類型上使用,群組數字范圍為 0-31,,缺省值是空字符串,即沒有組。
               group=1
               callgroup=1,2,3

            pickupgroup: A channel may belong to zero or more pickupgroups. Pickupgroups specify whose phones you may answer. If another channel is ringing, and this channel's pickupgroups include one of the ringing channel's callgroups, then this channel may answer the call by dialing *8#. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
            pickupgroup:通道可以不屬于或者屬于多個摘機群組,摘機群組定義了可以應答那些電話。如果其他通道振鈴,而本通道pickupgroup是振鈴通道callgroups群組其中之一,那么本通道可以通過按*8#來接聽振鈴通道。群組范圍為0-31,缺省值為空字符串,即沒有群組。
               group=1

            See more about Channels and Groups

            If you dial *8# when there is more than one channel whose calls you are eligible to answer, then it just answers the "first ringing channel", i.e. you have no control which one you pick up.
            如果同時不止一路通道振鈴符合條件可以通過按鍵*8#接聽,只能接聽第一條振鈴通道,即不能控制選擇接聽哪一條。
               pickupgroup=3,4

            useincomingcalleridonzaptransfer: If you set this option (Use Incoming Caller ID On Zap Transfer) to 'yes', then when you transfer a call to another phone, the original caller's Caller ID will get forwarded on too. Default: no.
            useincomingcalleridonzaptransfer:如果設置了這個選項(在ZAP通道上啟用來電轉接),可以轉接來電到另外一個電話,外部呼叫的主叫號碼同時跟隨。
                useincomingcalleridonzaptransfer=yes




            Caller ID Optionscallerid: Sets the Caller ID string to forward to the recipient when calls come in from this channel. You normally use this to set the Caller ID for handsets. Specify the Caller ID name in double quotation marks, followed by the Caller ID number in <> symbols. For trunk lines, set to "asreceived" to pass the received Caller ID forward.
            callerid:當來電時設置主叫ID字符串,傳送給接收者,通常為手持設備設置callerID。定義callerid:雙引號名字后緊跟角括號數字,對中繼線路,設置asreceived來傳送主叫ID。
               callerid="Mark Spencer" <256 428-6000>
               callerid=
               callerid=asreceived

            Important Note: Caller ID can only be transmitted to the public phone network with supported hardware, such as a PRI. It is not possible to set external caller ID on analog lines.
            重要事項:CallerID只能在硬件支持的公共電話交換網上被傳輸,例如PRI。在模擬線路上設置外部CallerID是不可能的。
            usecallerid: For handsets, this option will cause Asterisk to send Caller ID data to the handset when ringing it. For trunk lines, this option causes Asterisk to look for Caller ID on incoming calls. Default: yes.
            usecallerid:對于手持設備,這個選項可以在振鈴時讓Asterisk發送CallerID數據到到手持設備,對于中繼線路,該選項致使Asterisk查找來電主叫ID,缺省值:yes
                usecallerid=no

            hidecallerid: (Not for FXO trunk lines) For PRI channels, this will stop the sending of Caller ID on outgoing calls. For FXS handsets, this will stop Asterisk from sending this channel's Caller ID information to the called party when you make a call using this handset. FXS handset users may enable or disable sending of their Caller ID for the current call only by lifting the handset and dialing *82 (enable) or *67 (disable); you will then get a "dialrecall" tone whereupon you can dial the number of the extension you wish to contact. Default: no.
            hidecallerid:主叫ID隱藏(不能應用于FXO中繼線路),對于PRI通道,在外呼時停止傳送主叫ID。對于FXS端外呼時,會停止發送主叫ID信息到被叫方。FXS端可以在話機上按*82(啟用)*67(關閉)可以控制是否傳送主叫ID傳送。
                hidecallerid=yes

            restrictcid: (PRI channels only) This option has effect only when hidecallerid=no. If hidecallerid=no and restrictcid=yes, Asterisk will prevent the sending of the Caller ID data as a presentation number when making outgoing calls (ANI data is still sent). Default: no.
            restrictcid: (僅用于PRI通道),該選項在hidecallerid=no時可以有效設置,如果hidecallerd=no并且restrictcid=yes,外呼時,asterisk會阻止以顯示號碼方式發送主叫id,但ANI消息數據仍然發送),缺省為no
                restrictcid=yes

            usecallingpres: (PRI channels only) Whether or not to use the Caller ID presentation for the outgoing call that the calling switch is sending. See also the CallingPres command. Read more in this discussion from 2003.
            usecallingpres:(僅PRI通道有效)不管是否把callerid作為外呼的顯示號碼,交換機都會傳送。
                usecallingpres=no

            Audio Quality Tuning Options (音頻質量調整選項)These options adjust certain parameters of Asterisk that affect the audio quality of Zapata channels. See also:

            relaxdtmf: If you are having trouble with DTMF detection, you can relax the DTMF detection parameters. Relaxing them may make the DTMF detector more likely to have "talkoff" where DTMF is detected when it shouldn't be. Default: no.
            relaxdtmf:如果DTMF檢測有問題,可以放寬DTMF檢測的參數。
                relaxdtmf=yes

            echocancel: Disable or enable echo cancellation (default is 'yes'). It is recommended that you do not turn this off. You may specify echocancel as 'yes' (128 taps), 'no' (0 taps, disabled), or a preset number of taps which are one of 16, 32, 64, 128, or 256. Each tap is one sample from the data stream, so on a T1 this will be 1/8000 of a second. Accordingly the number of taps equate to a 2ms, 4ms, 8ms, 16ms or 32ms tail length. Beware that if you set echocancel to a different value, Asterisk will fall back to the default of 128 taps without warning.
            echocancel: 開啟或關閉回音消除(缺省值:是),建議不要關閉該設置,可以定義回音消除yes(128濾波參數)或者no(0濾波),或者定義參數為 16,32,64,128,256中一個,每種濾波參數都是一種數據流樣本,在T1線路上會是每秒1/8000,因此濾波參數值等于2ms,4ms, 8ms,16ms,32ms尾長,如果設置的回音消除為不同的值,Asterisk將直接使用128而不會警告。
                echocancel=no

            echocancelwhenbridged: Enables or disables echo cancellation during a bridged TDM call. In principle, TDM bridged calls should not require echo cancellation, but often times audio performance is improved with this option enabled. Default: no.
            echocancelwhenbridged:開啟或關閉在橋接的TDM呼叫中的回音消除,原則:TDM橋接呼叫不需要回音消除,但開啟這個選項通常可以提高語音效果。
                echocancelwhenbridged=yes

            echotraining: In some cases, the echo canceller doesn't train quickly enough and there is echo at the beginning of the call which then quickly fades out. Enabling echo training will cause Asterisk to briefly mute the channel, send an impulse, and use the impulse response to pre-train the echo canceller so it can start out with a much closer idea of the actual echo. However, the characteristics of some trunks may change as the endpoints become connected and, if there is a considerable delay between the circuit being 'up' and the endpoints being finalised, the training impulse may measure the characteristics of the open trunk rather than the completed circuit. Accordingly you may either specify a value between 10ms and 4000ms to delay before starting the impulse response process or 'yes', which equates to 400ms. Default: undefined.
            echotraining:有時回音消除不能夠很快的自學習,通話開始時會有回音,然后很快消除。開啟回音訓練可以讓Asterisk使通道暫時無聲而發送一個刺激信號,并根據響應效果預訓練回音消除,從而能夠更接近真實的回音。然而如果在電路up和終端響應定位之間有相當的延時,某些典型中繼被會作為終端進行連接,訓練刺激信號會檢測open中繼的特性而不是實際電路。因此,在開始響應刺激信號處理之前,可以在10ms和4000ms延時之間定義一個值,或者定義yes,缺省就是 400ms。默認值沒有定義。
                echotraining=no

            rxgain: Adjusts receive gain. This is the audio recieved by Asterisk from the device. E.g: in a phone connected to a FXS channel, this would control the audio that is sent from the phone to Asterisk. This can be used to raise or lower the incoming volume to compensate for hardware differences. You specify gain as a decimal number from -100 to 100 representing dB. 10 is significantly high. Change these options by only a few dB at a time. Default value: 0.0
            rxgain:調整接收獲取強度值,這是指Asterisk從例如連接到FXS通道上的電話設備上接收到的音頻,該選項能控制由電話發送給Asterisk的音頻,可以用于提高或降低進入的聲音音量,從而補償硬件損耗。可以定義獲得值從-100db到100db,10db就意味著很高了。修改時應進行微調。
                rxgain=4.2

            txgain: Adjusts transmit gain. This is the audio transmitted by Asterisk to the device. E.g: in a phone connected to a FXS device this would control the audio that is heard in the handset. This can be used to raise or lower the outgoing volume to compensate for hardware differences. Takes the same type of argument as rxgain. Default: 0.0
            txgain:調整傳出強度值,這是指由Asterisk發送給連接到FXS上的電話等設備的音頻,Asterisk可以控制音頻音量傳送給手持設備端收聽。這用于提高或降低外呼音量從而降低設備損耗。使用方法參數雷同fxgain,缺省值為0.0
                txgain=-10.2

            See: Asterisk zapata gain adjustment

            Call Logging OptionsAsterisk normally generates Call Detail Records (CDR), being a log or database of the calls made through Asterisk. This data can be used for Automated Machine Accounting (AMA). See Asterisk Billing.
            Asterisk通常會產生詳單記錄,記錄是由Asterisk呼叫產生的,以日志或數據庫存儲。通話詳單記錄可以用作自動記賬AMA。

            accountcode: Sets the data for the "account code" field in the CDR for calls placed from this channel. The account code may be any alphanumeric string. It may be overridden at call time with the Asterisk cmd SetAccount|SetAccount command.
            accountcode:設置通話詳單中account code字段的數據,用于通道呼叫處理。計費代碼可以是數字和文字字符串,可能在呼叫時被Asterisk命令setaccount重置。
               accountcode=spencer145

            amaflags: Sets the AMA flags, affecting the categorization of entries in the call detail records. Possible values are:
            amaflags:設置AMA自動記賬標記,影響通話詳單中的分類條目。
            • default: Let the CDR system use its default value. (CDR采用缺省值)
            • omit: Do not record calls. (不記錄)
            • billing: Mark the entry for billing (產生記賬條目)
            • documentation: Mark the entry for documentation. (標記條目文檔)
               amaflags=billing

            Timing Parameters (定時參數)
            These keywords are used only with (non-PRI) T1 lines. All values are in milliseconds. These do not need to be set in most configurations, as the defaults work with most hardware. It has been noted that the common Adtran Atlas uses long winks of about 300 milliseconds, and channels from them should be configured accordingly.
            這個關鍵字僅用于T1線路,不包含pri。
            prewink: Sets the pre-wink timing.
            preflash: Sets the pre-flash timing.
            wink: Sets the wink timing.
            rxwink: Sets the receive wink timing.
            rxflash: Sets the receive flash timing.
            flash: Sets the flash timing.
            start: Sets the start timing.
            debounce: Sets the debounce timing. "The debounce settings in the Asterisk configuration affects how Asterisk
            handles hookswitch transitions on its FXO/FXS interfaces." — Derek Bruce

               rxwink=300
               prewink=20~~

            Other Featuresmailbox: If this option is defined for a channel, then when the handset is lifted, Asterisk will check the voicemail mailbox(es) specified here for new (unheard) messages. If there are any unheard messages in any of the mailboxes, Asterisk will use a stutter dialtone rather than the ordinary dialtone. On supported hardware, the message waiting light will also be activated — this probably requires that you also set adsi=yes. Update: This option does NOT require ADSI. It will send a standard FSK tone down the line that lights up the MWI on any capable analog phone.
            mailbox:這個選項為通道定義的。當摘機時, Asterisk會檢測語音郵箱中未讀的郵件。如果有未讀郵件,Asterisk會有摘機警告音而不是通常的撥號音。在支持的硬件上,等待消息同樣激活,這需要設置adsi=yes。這個選項不需要ADSI支持,它會發送一個 標準的頻移鍵控提示音(也稱為移頻調制和移頻信號)來掛掉支持WMI(消息等待支持)的模擬線路。

            The parameters to this option are one or more comma-separated mailbox numbers, as defined in voicemail.conf.

                mailbox = 1234
                mailbox = 1,2

            For each mailbox, if the mailbox is in a context other than "default", place the context after the mailbox number
            separated by an at sign (@).
            如果語音郵件不是在default而是在context,按照[url=]mailbox@context[/url]的格式

                mailbox = 1234@office
                mailbox = 12@office,34@home

            group: Allows you to group together a number of channels so that the Dial command will treat the group as a single channel. When Dial tries to make a call on a Zap group, the Zap channel module will use the first available (i.e. non-busy) channel in the group for the call. Multiple group memberships may be specified with commas, and to signify no group membership, the portion after the equals sign may be omitted. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
            group:允許把多個通道組成一組,Dial命令撥號的時候把群組視為一個單一通道。當Dial試圖在ZAP組上撥號時,Zap通道模塊使用組中第一個可用通道。多群組關系可以通過逗號來定義,等號后面省略表示沒有群組。群組范圍從0-31,缺省值時空字符串,即沒有群組。

                group=1
                group=2,3
                group=

            See more about Channels and Groups

            language: Each channel has a default language code that affects which language version of prerecorded sounds Asterisk uses for this channel. See Setting up a Multi-Language Asterisk Installation. The default is an empty string.
            language:每個通道有一個缺省的語言編碼,這是由預先錄制聲音的語言版本來定義的
                language=en

            progzone: This defines the timing and frequencies for call progress detection, which are buried in the sources in asterisk/dsp.c. This is DIFFERENT than the call progress timing defined in zaptel/zonedata.c and in /etc/asterisk/indications.conf, and so far only options you can use (defined in dsp.c) are us, ca, br, cr and uk. (This was added sometime between 1.0.9 stable and 1.2 beta). Default is: us
            progzone:該選項為呼叫處理檢測(在asterisk/dsp.c源代碼中)定義了時間和頻率,這與在zaptel/zonedata.c和 /etc/asterisk/indications.conf中的定時呼叫處理不同。到目前為止該參數只能是:us,ca,br,uk,缺省是us

            Important Stuffcontext: This specifies which context a call will start in. The context controls how Asterisk will handle the call. Contexts are defined in the Dialplan. Default: "default".
            context:定義了呼叫開始的context,context控制Asterisk如何處理呼叫。Context在dialplan中定義,缺省為"default"
                context=internal

            channel: This keyword is unlike all the other keywords in this configuration file, because where all the other keywords merely specify settings to use, this keyword causes Asterisk to actually allocate a channel with the settings that have been specified earlier in the file.
            channel:這個關鍵字與配置文件中的其他關鍵字不同。原因是其他關鍵字僅僅定義設置來使用,這個關鍵字可以使Asterisk把前面定義的設置分配到通道中。

            The channel keyword defines one or more channels. Each channel definition will inherit all options stated ahead of it in this file. Channels maybe specified individually, separated by commas, or as a range separated by a hyphen. Allocating a channel will not "clear" the settings, so any channels defined later on in this file will inherit the options for this channel unless you override settings.
            通道關鍵字定義一個或多個通道,每行通道定義都會繼承前面所有的選項配置狀態。通道可以通過逗號分離單獨定義,或者用連接符連接一組,分配通道不會清空設置,所以任何在后面定義的通道都會繼承前面的選項除非覆蓋設置。

                channel => 16
                channel => 2,3
                channel => 1-8

            Obsolete Settingsstripmsd: (Obsolete) Strip the 'Most Significant Digit,' the first digit or digits from all calls outbound on the given trunk channels. Takes as an argument the number of digits to strip. Use ${EXTEN:x} for this functionality.

            posted on 2011-11-24 11:37 八葉草 閱讀(7278) 評論(2)  編輯 收藏 引用 所屬分類: asterisk

            評論

            # re: dahdi 2011-12-28 06:19 lexunix

            感謝分享,受益良多。可以轉載嗎?  回復  更多評論   

            # re: dahdi 2011-12-28 08:55 byc

            可以轉載,我也是網上整理的 @lexunix
              回復  更多評論   

            久久免费高清视频| 奇米影视7777久久精品人人爽 | 精品一区二区久久久久久久网站| 久久久精品国产亚洲成人满18免费网站 | 欧美国产成人久久精品| 国产成人久久久精品二区三区| 91精品国产91久久久久福利| 国产精品美女久久久久| 精品久久久久久无码专区不卡| 久久国产精品成人影院| 国产一级持黄大片99久久| 99久久99久久精品国产| 久久WWW免费人成—看片| 香蕉久久永久视频| 久久99精品国产麻豆宅宅| 色综合久久久久无码专区 | 激情伊人五月天久久综合| 国产精品99久久免费观看| 夜夜亚洲天天久久| 思思久久99热只有频精品66| 亚洲国产精品无码久久久秋霞2| 人妻丰满AV无码久久不卡| 亚洲国产天堂久久综合网站| 久久久久99精品成人片三人毛片| 久久精品国产日本波多野结衣| 日本久久久久亚洲中字幕 | 久久精品不卡| 无码国内精品久久人妻| 99久久精品免费看国产| 精品国产99久久久久久麻豆| 久久99国产精品久久久| 香蕉99久久国产综合精品宅男自 | 91久久九九无码成人网站| 久久精品视频一| 久久精品嫩草影院| 久久久亚洲裙底偷窥综合| 亚洲成色999久久网站| 99精品久久精品一区二区| 国产精品欧美久久久久天天影视 | 浪潮AV色综合久久天堂| 性高湖久久久久久久久AAAAA |