เพิ่งจะมีโอกาสได้ต่อสาย E1 แต่มีปัญหาเยอะเหลือเกิน ไว้จะบ่นทีหลัง ตอนนี้บันทึกความรู้ไว้ก่อน  ก่อนอื่นต้องรู้ก่อนว่า จะเชื่อมสัญญาณนั้น ควรจะรู้อะไรบ้าง?

ก่อนจะเชื่อมต่อระบบ ควรเตรียมตัวให้พร้อม หาข้อมูล ซึ่งสิ่งที่ควรทราบมีดังนี้
<ul>

  • Media type
  • Line decoding
  • Signal type
  • Signals mode
  • Switch type
  • </ul>Media type
    นิยมใช้ E-carrier เป็นส่วนใหญ่ สำหรับ T-carrier จะใช้ใน อเมริกา,เกาหลี ในญีปุ่นจะเรียกว่า J-carrier

    E-carrier
    E1 สายมีความเร็ว 2.048 Mbps มี 32 timeslot (หรือบางทีก็เรียกว่า circuit) เมื่อนำไปใช้กับ voice จะใช้ได้จริง 30 ช่อง (เรียว่า D-Channel)
    ช่อง 0(TS0) ถูกใช้สำหรับ timing, CRC ช่อง 16 (TS16) ถุกใช้สำหรับ telecommunications
    signalling (เรียกกว่า B-Channel) เช่น CAS และ CCS ปัจจุบันจะนิยมใช้ CCS เป็นส่วนใหญ่ นอกจากนี้ CCS มักใช้สำหรับ ISDN และ SS7 สาย E1 นี้ รู้จักในชื่อของ DSS1 หรือ E-DSS1 หรือ Euro-ISDN

    ส่วน E3 นั้นจะมีความเร็ว 34.368 Mbps มี timeslot 480 ช่องต่อสาย


    Line Decoding
    E1
    HDB3 - High Density Bipolar of order 3 code พัฒนาจาก AMI มี spec ใกล้เคียงกับ b8zs **นิยมใช้
    AMI - Alternate Mark Inversion
    T1
    B8ZS - Bipolar with 8 Zeros Substitution หรืออีกชื่อว่า Binary Eight Zero Substitution พัฒนามาจาก AMI เช่นกัน
    **นิยมใช้
    AMI - Alternate Mark Inversion
    ** AMI ใช้ได้ทั้ง E1 และ T1

    Signals Mode
    E1
    CAS - Channel Associated Signaling (เลือกใช้แทน RBS ได้)
    CCS - Common Channel Signaling *นิยมใช้
    T1
    ESF- Extended superframe
    D4 (ใช้กับ TDM แบบเก่า)… (d4 มาจาก default หรือเปล่า?)

    note
    :
    เป็นไปได้ว่า CCS ก็ใช้ได้ใน T1 แต่ไม่นิยม

    Signal type (Sub Protocol)
    ค่าที่เป็นไปได้มีดังนี้ (เอามาจาก zaptel.conf เลย ขีเกียจพิมพ์)
    em: E & M
    em_w: E & M Wink
    featd: Feature Group D (The fake, Adtran style, DTMF)
    featdmf: Feature Group D (The real thing, MF (domestic, US))
    featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
    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
    gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side
    gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side
    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


    ด้านล่างสำหรับ 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)


    note: T1 นิยม signals เป็น CAS และมักจะใช้ E&M, FXO & FXS


    Switch type
    เป็นประเภทของ Media Gateway ฝั่งผู้ให้บริการ
    national: National ISDN 2 (default)
    dms100: Nortel DMS100
    4ess: AT&T 4ESS
    5ess: Lucent 5ESS
    euroisdn: EuroISDN
    ni1: Old National ISDN 1
    qsig: Q.SIG




    บันทึกปัญหา
    ข้อผิดพลาด: CAS signalling on span 1 conflicts with HDLC with FCS check on channel 16
    สาเหตุ: กำหนด signal type ผิด
    วิธีแก้ไข: ลองกำหนดเป็นแบบอื่น หรือสอบถามผู้ให้บริการ


    ข้อผิดพลาด: Everyone is busy/congested at this time หรือ CHANUNAVAIL หรือ all-circuits-busy-now ทั้งที่ช่องสัญญาณไม่ได้ถูกใช้งาน
    สาเหตุ: อาจเกิดจากการส่ง signal ไปให้ media gateway ไม่ถูกต้อง
    วิธีแก้ไข: ลองกำหนดเป็นแบบอื่น หรือสอบถามผู้ให้บริการ กรณีของผมเพิ่ม pridialplan=international และ prilocaldialplan=national ในไฟล์ zapata.conf



    ตัวอย่างไฟล์ config

    zaptel.conf
    # Autogenerated by /usr/local/sbin/sangoma/setup-sangoma – do not hand edit
    # Zaptel Channels Configurations (zaptel.conf)
    #
    loadzone=us
    defaultzone=us

    #Sangoma A102 port 1 [slot:1 bus:4 span: 1]
    span=1,0,0,[color=”#8b0000”]ccs
    ,hdb3,crc4
    bchan=1-15,17-31
    dchan=16

    zaptel.conf
    [channels]
    context=default
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    usecallingpres=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    canpark=yes
    cancallforward=yes
    callreturn=yes
    echocancel=yes
    echocancelwhenbridged=yes
    relaxdtmf=yes
    rxgain=0.0
    txgain=0.0
    group=1
    callgroup=1
    pickupgroup=1
    immediate=no
    cidsignalling=dtmf
    cidstart=ring
    pridialplan=international
    prilocaldialplan=
    international
    ;internationalprefix = 00
    ;nationalprefix = 0
    ;localprefix = 0711
    ;privateprefix = 07115678
    ;unknownprefix =

    ;Sangoma A102 port 1 [slot:1 bus:4 span: 1]
    switchtype=euroisdn
    context=from-internal
    group=1
    signalling=pri_cpe
    channel => 1-15,17-31



    Links

    PRI, BRI
    [Asterisk-Dev] Question about E1 Card / ISDN PRI
    How do I configure Digium’s T1/E1/J1 cards?
    SolutionBase: Configure Asterisk to support a T1 PRI connection by techrepublic
    How to configure the low-level Zapata Interface Library for your hardware [PDF]
    Asterisk Tutorial by Jonny Martin & Citylink
    R4T1 with PRI
    The Hitchhiker’s Guide to Asterisk
    zaptel.conf details by Sangoma wiki
    zaptel.conf sample
    Asterisk config zapata.conf (ASteriskGuru)
    FCS: Frame Check Sequence
    Cisco Frame Relay document