FXS remains offhook

Discussion in 'General' started by hinzinho, Dec 27, 2009.

  1. hinzinho

    Joined:
    Sep 18, 2009
    Messages:
    461
    Likes Received:
    0
    I have an AEX410 card with 3 FXS modules on it. Once in a while, one or all of my FXS ports remain offhook. The only way I can get this fix is by issuing the following commands:

    /etc/init.d/asterisk stop
    /etc/init.d/dahdi restart
    /etc/init.d/asterisk start

    Below is my Asterisk log. Please help! Thanks!

    Code:
    
    [Dec 24 08:43:35] DEBUG[31124] app_macro.c: Executed application: AGI
    [Dec 24 08:43:35] VERBOSE[31124] logger.c:     -- Executing [s@macro-dial:7] Dial("DAHDI/1-1", "DAHDI/27||tr") in new stack
    [Dec 24 08:43:35] NOTICE[31124] app_dial.c: Hey! chan DAHDI/1-1's context='macro-dial', and exten='s'
    [Dec 24 08:43:35] VERBOSE[31124] logger.c:     -- Called 27
    [Dec 24 08:43:35] VERBOSE[31124] logger.c:     -- DAHDI/27-1 is ringing
    [Dec 24 08:43:37] VERBOSE[31124] logger.c:     -- DAHDI/27-1 is ringing
    [Dec 24 08:43:43] VERBOSE[31124] logger.c:     -- DAHDI/27-1 is ringing
    [Dec 24 08:43:49] VERBOSE[31124] logger.c:     -- DAHDI/27-1 is ringing
    [Dec 24 08:43:54] DEBUG[31124] chan_dahdi.c: Engaged echo training on channel 27
    [Dec 24 08:43:54] DEBUG[31124] chan_dahdi.c: channel 27 answered
    [Dec 24 08:43:54] VERBOSE[31124] logger.c:     -- DAHDI/27-1 answered DAHDI/1-1
    [Dec 24 08:43:55] NOTICE[31124] chan_dahdi.c: Fax detected, but no fax extension
    [Dec 24 08:43:57] DEBUG[31124] chan_dahdi.c: Dunno what to do with event 27 on channel 27
    [Dec 24 08:43:57] DEBUG[31124] chan_dahdi.c: Dunno what to do with event 24 on channel 27
    [Dec 24 08:43:57] VERBOSE[31128] logger.c:     -- Starting simple switch on 'DAHDI/25-1'
    [Dec 24 08:44:13] DEBUG[31128] chan_dahdi.c: not enough digits (and no ambiguous match)...
    ....
    [Dec 24 08:46:38] VERBOSE[31124] logger.c:     -- Hungup 'DAHDI/27-1'
    [Dec 24 08:46:38] VERBOSE[31124] logger.c:   == Spawn extension (macro-dial, s, 7) exited non-zero on 'DAHDI/1-1' in macro 'dial'
    [Dec 24 08:46:38] VERBOSE[31124] logger.c:   == Spawn extension (macro-exten-vm, s, 9) exited non-zero on 'DAHDI/1-1' in macro 'exten-vm'
    [Dec 24 08:46:38] VERBOSE[31124] logger.c:   == Spawn extension (from-did-direct, 5998, 1) exited non-zero on 'DAHDI/1-1'
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: Added extension 5998 to extension map
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: Extension 5998 cf is disabled
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: Extension 5998 do not disturb is disabled
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:   dialparties.agi: Extension 5998 has ExtensionState: 4
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: Checking CW and CFB status for extension 5998
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: dbset CALLTRACE/5998 to XXXXXXXXXX
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     --  dialparties.agi: Filtered ARG3: 5998
    [Dec 24 08:47:58] VERBOSE[31167] logger.c:   == Manager 'admin' logged off from 127.0.0.1
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- AGI Script dialparties.agi completed, returning 0
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: AGI
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-dial:7] Dial("DAHDI/1-1", "DAHDI/27||tr") in new stack
    [Dec 24 08:47:58] NOTICE[31164] app_dial.c: Hey! chan DAHDI/1-1's context='macro-dial', and exten='s'
    [Dec 24 08:47:58] DEBUG[31164] chan_dahdi.c: Channel 27 off hook, can't use
    [Dec 24 08:47:58] WARNING[31164] app_dial.c: Unable to create channel of type 'DAHDI' (cause 17 - User busy)
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:   == Everyone is busy/congested at this time (1:1/0/0)
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Dial
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-dial:8] Set("DAHDI/1-1", "DIALSTATUS=BUSY") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Set
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-dial:9] GosubIf("DAHDI/1-1", "0?BUSY|1") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GosubIf
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Macro
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:10] GotoIf("DAHDI/1-1", "0?exit|return") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GotoIf
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:11] Set("DAHDI/1-1", "SV_DIALSTATUS=BUSY") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Set
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:12] GosubIf("DAHDI/1-1", "0?docfu|1") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GosubIf
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:13] GosubIf("DAHDI/1-1", "0?docfb|1") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GosubIf
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:14] Set("DAHDI/1-1", "DIALSTATUS=BUSY") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Set
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:15] NoOp("DAHDI/1-1", "Voicemail is novm") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: NoOp
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s@macro-exten-vm:16] GotoIf("DAHDI/1-1", "1?s-BUSY|1") in new stack
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Goto (macro-exten-vm,s-BUSY,1)
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GotoIf
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s-BUSY@macro-exten-vm:1] NoOp("DAHDI/1-1", "Extension is reporting BUSY and not passing to Voicemail") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: NoOp
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s-BUSY@macro-exten-vm:2] GotoIf("DAHDI/1-1", "0?exit|1") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: GotoIf
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s-BUSY@macro-exten-vm:3] PlayTones("DAHDI/1-1", "busy") in new stack
    [Dec 24 08:47:58] DEBUG[31164] app_macro.c: Executed application: Playtones
    [Dec 24 08:47:58] VERBOSE[31164] logger.c:     -- Executing [s-BUSY@macro-exten-vm:4] Busy("DAHDI/1-1", "20") in new stack
    [Dec 24 08:48:00] NOTICE[31164] chan_dahdi.c: Fax detected, but no fax extension
    [Dec 24 08:48:05] VERBOSE[28089] logger.c:     -- Channel 0/1, span 1 got hangup request, cause 16
    [Dec 24 08:48:05] VERBOSE[31164] logger.c:   == Spawn extension (macro-exten-vm, s-BUSY, 4) exited non-zero on 'DAHDI/1-1' in macro 'exten-vm'
    [Dec 24 08:48:05] VERBOSE[31164] logger.c:   == Spawn extension (from-did-direct, 5998, 1) exited non-zero on 'DAHDI/1-1'
    [Dec 24 08:48:05] DEBUG[31164] chan_dahdi.c: Set option AUDIO MODE, value: ON(1) on DAHDI/1-1
    [Dec 24 08:48:05] DEBUG[31164] chan_dahdi.c: Not yet hungup...  Calling hangup once with icause, and clearing call
    [Dec 24 08:48:05] DEBUG[31164] chan_dahdi.c: Set option AUDIO MODE, value: OFF(0) on DAHDI/1-1
    [Dec 24 08:48:05] VERBOSE[31164] logger.c:     -- Hungup 'DAHDI/1-1'
    
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You have given far too little info about your dahdi channels, either you have more than three ports or something is seriously setup wrong.

    Eliminate any fax detection, it apparently is incorrectly setup and channel 27 is confused, (as is channel 1) on a detected fax call.

    Check your from-zaptel inbound routes and your outbound routes as this call that was originated on channel 1 bounces around about four extensions tries to call itself, then an inbound route and leaves everything confused.

    try to make sure you don't try and use a busy trunk for outbound calls.
     
  3. hinzinho

    Joined:
    Sep 18, 2009
    Messages:
    461
    Likes Received:
    0
    Here is how I have my system set up.

    I have a PRI circuit with 10 DIDs, 3 of the DIDs are fax numbers, going into a TE121 card. 1 AEX410 card with 3 FXS modules for the physical fax machines. I then have 3 ZAP extensions and incoming routes to handle the fax numbers.

    I added another FXS module into the card this weekend. That is why you will see I have 4 modules in my configuration files instead of 3 as above.

    Here are my configuration files. If you need any more information, please let me know. Thanks!

    system.conf
    Code:
    # Autogenerated by /usr/sbin/dahdi_genconf on Sat Dec 26 11:43:39 2009
    # 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: WCT1/0 "Wildcard TE121 Card 0" (MASTER) 
    span=1,1,0,esf,b8zs
    # termtype: te
    bchan=1-23
    dchan=24
    echocanceller=oslec,1-23
    
    # Span 2: WCTDM/0 "Wildcard AEX410 Board 1" 
    fxoks=25
    echocanceller=oslec,25
    fxoks=26
    echocanceller=oslec,26
    fxoks=27
    echocanceller=oslec,27
    fxoks=28
    echocanceller=oslec,28
    
    # Global data
    
    loadzone	= us
    defaultzone	= us
    
    dahdi-channels.conf
    Code:
    ; Autogenerated by /usr/sbin/dahdi_genconf on Sat Dec 26 11:43:39 2009
    ; If you edit this file and execute /usr/sbin/dahdi_genconf again,
    ; your manual changes will be LOST.
    ; Dahdi Channels Configurations (chan_dahdi.conf)
    ;
    ; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
    ; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
    ;
    
    ; Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) 
    group=0,11
    context=from-pstn
    switchtype = national
    signalling = pri_cpe
    channel => 1-23
    context = default
    group = 63
    
    ; Span 2: WCTDM/0 "Wildcard AEX410 Board 1" 
    ;;; line="25 WCTDM/0/0 FXOKS"
    signalling=fxo_ks
    callerid="Channel 25" <4025>
    mailbox=4025
    group=5
    context=from-internal
    channel => 25
    callerid=
    mailbox=
    group=
    context=default
    
    ;;; line="26 WCTDM/0/1 FXOKS"
    signalling=fxo_ks
    callerid="Channel 26" <4026>
    mailbox=4026
    group=5
    context=from-internal
    channel => 26
    callerid=
    mailbox=
    group=
    context=default
    
    ;;; line="27 WCTDM/0/2 FXOKS"
    signalling=fxo_ks
    callerid="Channel 27" <4027>
    mailbox=4027
    group=5
    context=from-internal
    channel => 27
    callerid=
    mailbox=
    group=
    context=default
    
    ;;; line="28 WCTDM/0/3 FXOKS"
    signalling=fxo_ks
    callerid="Channel 28" <4028>
    mailbox=4028
    group=5
    context=from-internal
    channel => 28
    callerid=
    mailbox=
    group=
    context=default
    
    chan_dahdi.conf
    Code:
    [trunkgroups]
    
    [channels]
    context=from-pstn
    signalling=fxs_ks
    rxwink=300              ; Atlas seems to use long (250ms) winks
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    usecallingpres=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    canpark=yes
    cancallforward=yes
    callreturn=yes
    echocancel=yes
    echocancelwhenbridged=no
    faxdetect=incoming
    echotraining=800
    rxgain=0.0
    txgain=0.0
    callgroup=1
    pickupgroup=1
    
    ;Uncomment these lines if you have problems with the disconection of your analog lines
    ;busydetect=yes
    ;busycount=3
    
    
    immediate=no
    
    #include dahdi-channels.conf
    #include chan_dahdi_additional.conf
    
    chan_dahdi_additional.conf
    Code:
    ;--------------------------------------------------------------------------------;
    ; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
    ; this file must be done via the web gui. There are alternative files to make    ;
    ; custom modifications, details at: http://freepbx.org/configuration_files       ;
    ;--------------------------------------------------------------------------------;
    ;
    
    ;;;;;;[5995]
    signalling=fxo_ks
    pickupgroup=
    mailbox=5995@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    context=from-internal
    callprogress=no
    callgroup=
    callerid=device <5995>
    busydetect=no
    busycount=7
    accountcode=
    channel=>28
    
    ;;;;;;[5996]
    signalling=fxo_ks
    pickupgroup=
    mailbox=5996@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    context=from-internal
    callprogress=no
    callgroup=
    callerid=device <5996>
    busydetect=no
    busycount=7
    accountcode=
    channel=>25
    
    ;;;;;;[5997]
    signalling=fxo_ks
    pickupgroup=
    mailbox=5997@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    context=from-internal
    callprogress=no
    callgroup=
    callerid=device <5997>
    busydetect=no
    busycount=7
    accountcode=
    channel=>26
    
    ;;;;;;[5998]
    signalling=fxo_ks
    pickupgroup=
    mailbox=5998@device
    immediate=no
    echotraining=800
    echocancelwhenbridged=no
    echocancel=yes
    context=from-internal
    callprogress=no
    callgroup=
    callerid=device <5998>
    busydetect=no
    busycount=7
    accountcode=
    channel=>27
    
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    If you have inbound routes that match the DID of the fax numbers that are sent to fax machines to fxs ports with extensions 5995 and 5998, there is no fax detection necessary in the inbound routes,
    further in chan_dahdi.conf

    faxdetect=incoming

    should be

    faxdetect=no

    fax machines can detect faxes all on there own ;)
     
  5. hinzinho

    Joined:
    Sep 18, 2009
    Messages:
    461
    Likes Received:
    0
    If I change the faxdetect=no, will that fix my issue or is there something else that I need to look into?

    Thanks dicko!
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I don't know if it will "fix your issues",
    It will fix the issue of trying to detect a fax (successfully, but apparently unnecessarily) but having nowhere to send it.
    it will require a dahdi restart and then you will have to see what other "issues" remain
     

Share This Page