Cursos Asterisk en México

Canal dahdi bloqueado "FORCED R" MFC/R2

Colapsar

Anuncio

Colapsar
No hay anuncio todavía.
X
 
  • Filtrar
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes

  • Canal dahdi bloqueado "FORCED R" MFC/R2

    Buenos días,

    tengo un E1 con 30 canales de Telmex, todo funciona muy bien excepto cuando un canal se queda bloqueado como lo muestro a continuación (omito algunos canales)

    Código:
    # asterisk -rx 'mfcr2 show channels'
    Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS   Rx CAS  
       1 MX      10      4        No        No               ANSWER   SEIZE  
       2 MX      10      4        No        No               ANSWER   SEIZE  
       3 MX      10      4        No        No               ANSWER   SEIZE  
       4 MX      10      4        No        No               ANSWER   SEIZE  
       [B]5 MX      10      4        No        No               IDLE     FORCED R [/B]  
       6 MX      10      4        No        No               ANSWER   SEIZE  
       7 MX      10      4        No        No               ANSWER   SEIZE  
       8 MX      10      4        No        No               ANSWER   SEIZE  
       9 MX      10      4        No        No               ANSWER   SEIZE  
      10 MX      10      4        No        No               ANSWER   SEIZE  
      11 MX      10      4        No        No               IDLE     IDLE    
      12 MX      10      4        No        No               IDLE     IDLE    
      13 MX      10      4        No        No               IDLE     IDLE    
      14 MX      10      4        No        No               SEIZE    ANSWER
    Como pueden ver el canal 5 solo esta libre de salida pero no de entrada, cuando alguien intenta hacer una llamada dahdi asigna ese canal puesto que lo ve libre y cuando busca la manera de salir se encuentra con que el canal esta ocupado y reproduce el audio "Todas las lineas están ocupadas, por favor intente mas tarde". El canal tarda mucho tiempo en liberarse pero si lo hace. Lo que hice fue poner round robin para que tome los siguientes canales en lo que se libera ese canal bloqueado pero ni con eso puesto que las llamadas dan una vuelta completa a todos los canales y en este caso el canal 5 aún no se libera.

    Anexo el log de MFC/R2

    Código:
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Requested to make call (ANI=(restricted), DNIS=58552634, category=National Subscriber)
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Outgoing call proceeding: ANI=(restricted), DNIS=58552634, Category=National Subscriber
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - CAS Tx >> [SEIZE] 0x00
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - CAS Raw Tx >> 0x01
    [Jan 20 14:21:35] VERBOSE[3564] app_dial.c: -- Called DAHDI/r2/58552634
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: bits changed in chan 13
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Bits changed from 0x08 to 0x0C
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - CAS Rx << [SEIZE ACK] 0x0C
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MFC/R2 call acknowledge!
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 5
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [ON]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [OFF]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 8
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 8 [ON]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:35] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 8 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 5
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 5
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 5 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 2
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 2 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 2 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 6
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 6 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 6 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 3
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 3 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 3 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 1 [OFF]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending DNIS digit 4
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 4 [ON]
    [Jan 20 14:21:36] DEBUG[3564] chan_dahdi.c: Chan 13 - Group A DNIS request handled
    [Jan 20 14:21:37] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 3 [ON]
    [Jan 20 14:21:37] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 4 [OFF]
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 3 [OFF]
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - Sending category National Subscriber
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 1 [ON]
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 4 [ON]
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Tx >> 1 [OFF]
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - MF Rx << 4 [OFF]
    [Jan 20 14:21:38] VERBOSE[3564] chan_dahdi.c: Chan 13 - Far end disconnected. Reason: Network Congestion
    [Jan 20 14:21:38] VERBOSE[3564] chan_dahdi.c: MFC/R2 call disconnected on channel 13
    [Jan 20 14:21:38] VERBOSE[3564] app_dial.c: -- DAHDI/13-1 is circuit-busy
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: disconnecting MFC/R2 call on chan 13
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: ast cause 0 resulted in openr2 cause 6/Normal Clearing
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - CAS Tx >> [CLEAR FORWARD] 0x08
    [Jan 20 14:21:38] DEBUG[3564] chan_dahdi.c: Chan 13 - CAS Raw Tx >> 0x09
    [Jan 20 14:21:38] VERBOSE[3564] chan_dahdi.c: -- Hungup 'DAHDI/13-1'
    [Jan 20 14:21:38] VERBOSE[3564] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
    [Jan 20 14:21:38] VERBOSE[3564] pbx.c: -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/420-00005995", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 0") in new stack
    Código:
    [B]cat /etc/dahdi/system.conf[/B]
    #For detailed Dahdi options, view /etc/dahdi/system.conf.bak
    loadzone=mx
    defaultzone=mx
    
    #Sangoma A101 port 1 [slot:4 bus:2 span:1] <wanpipe1>
    span=1,1,0,cas,hdb3
    cas=1-15:1101
    cas=17-31:1101
    
    #Sangoma AFT-A200 [slot:0 bus:5 span:2] <wanpipe2>
    fxsks=32
    echocanceller=oslec,32
    fxsks=33
    echocanceller=oslec,33
    fxsks=34
    echocanceller=oslec,34
    fxsks=35
    echocanceller=oslec,35
    fxsks=36
    echocanceller=oslec,36
    fxsks=37
    echocanceller=oslec,37
    fxsks=38
    echocanceller=oslec,38
    fxsks=39
    echocanceller=oslec,39

    Código:
    [B]cat /etc/asterisk/chan_dahdi.conf[/B]
    ;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
    ;autogenrated on 2014-10-01
    ;Dahdi Channels Configurations
    ;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak
    
    [trunkgroups]
    
    [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
    echotraining=800
    relaxdtmf=yes
    rxgain=4.0
    txgain=6.0
    group=1
    callgroup=1
    pickupgroup=1
    immediate=no
    ;callerid = asreceived
    ;useincomingcalleridondahditransfer = yes
    
    ;Sangoma A101 port 1 [slot:4 bus:2 span:1] <wanpipe1>
    signalling=mfcr2
    mfcr2_variant=mx
    mfcr2_get_ani_first=no
    mfcr2_max_ani=10
    mfcr2_max_dnis=4
    mfcr2_category=national_subscriber
    mfcr2_mfback_timeout=-1
    mfcr2_metering_pulse_timeout=-1
    ; this is for debugging purposes
    mfcr2_logdir=log
    mfcr2_logging=all
    ; end debugging configuration
    context=from-pstn
    group=2
    restrictcid=yes
    hidecallerid=yes
    channel => 1-15
    channel => 17-31
    
    
    ;Sangoma AFT-A200 [slot:0 bus:5 span:2]  <wanpipe2>
    context=from-zaptel
    group=0
    echocancel=yes
    signalling = fxs_ks
    channel => 32
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 33
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 34
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 35
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 36
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 37
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 38
    
    context=from-zaptel
    group=1
    echocancel=yes
    signalling = fxs_ks
    channel => 39
    De antemano agradezco su ayuda
    Editado por última vez por poseidon_xk; https://asteriskmx.org/foros/member/2346-poseidon_xk en 01-21-2015, 11:35 AM.
    El software es como el sexo, es mejor si es libre y seguro

  • #2
    El personal de soporte técnico de Telmex me llamó y me dijo que de su parte todo lo ven correcto (inclusive resetearon el E1), dicen que podría ser el "timer" del conmutador y que posiblemente se tarde mucho en recibir la señal de colgado o que ni siquiera la esta recibiendo, yo puse el reloj del conmutador en "NORMAL" cuando hice la configuración, les pongo la configuración de WANPIPE

    Código:
    cat /etc/wanpipe/wanpipe1.conf
    #================================================
    # WANPIPE1 Configuration File
    #================================================
    #
    # Date: Wed Dec  6 20:29:03 UTC 2006
    #
    # Note: This file was generated automatically
    #       by /usr/local/sbin/setup-sangoma program.
    #
    #       If you want to edit this file, it is
    #       recommended that you use wancfg program
    #       to do so.
    #================================================
    # Sangoma Technologies Inc.
    #================================================
    
    [devices]
    wanpipe1 = WAN_AFT_TE1, Comment
    
    [interfaces]
    w1g1 = wanpipe1, , TDM_VOICE, Comment
    
    [wanpipe1]
    CARD_TYPE     = AFT
    S514CPU     = A
    CommPort     = PRI
    AUTO_PCISLOT     = NO
    PCISLOT     = 4
    PCIBUS      = 2
    FE_MEDIA    = E1
    FE_LCODE    = HDB3
    FE_FRAME    = NCRC4
    FE_LINE        = 1
    [B]TE_CLOCK     = NORMAL[/B]
    TE_REF_CLOCK    = 0
    TE_SIG_MODE     = CAS
    TE_HIGHIMPEDANCE    = NO
    [B]TE_RX_SLEVEL    = 120[/B]
    HW_RJ45_PORT_MAP = DEFAULT
    LBO         = 120OH
    FE_TXTRISTATE    = NO
    MTU         = 1500
    UDPPORT        = 9000
    TTL        = 255
    IGNORE_FRONT_END    = NO
    TDMV_SPAN        = 1
    TDMV_DCHAN        = 0
    TE_AIS_MAINTENANCE = NO         #NO: defualt  YES: Start port in AIS Blue Alarm and keep line down
                                    #wanpipemon -i w1g1 -c Ttx_ais_off to disable AIS maintenance mode
                                    #wanpipemon -i w1g1 -c Ttx_ais_on to enable AIS maintenance mode  
    TDMV_HW_DTMF        = YES        # YES: receive dtmf events from hardware
    TDMV_HW_FAX_DETECT        = NO        # YES: receive fax 1100hz events from hardware
    HWEC_OPERATION_MODE     = OCT_NORMAL    # OCT_NORMAL: echo cancelation enabled with nlp (default)
                                            # OCT_SPEECH: improves software tone detection by disabling NLP (echo possible)
                                            # OCT_NO_ECHO:disables echo cancelation but allows VQE/tone functions.
    HWEC_DTMF_REMOVAL       = NO    # NO: default  YES: remove dtmf out of incoming media (must have hwdtmf enabled)
    HWEC_NOISE_REDUCTION    = NO    # NO: default  YES: reduces noise on the line - could break fax
    HWEC_ACUSTIC_ECHO       = NO    # NO: default  YES: enables acustic echo cancelation
    HWEC_NLP_DISABLE        = NO    # NO: default  YES: guarantees software tone detection (possible echo)  
    HWEC_TX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio level to be maintained (-20 default)
    HWEC_RX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio level to be maintained (-20 default)  
    HWEC_TX_GAIN            = 0        # 0: disable   -24-24: db values to be applied to tx signal
    HWEC_RX_GAIN            = 0        # 0: disable   -24-24: db values to be applied to tx signal
    
    [w1g1]
    ACTIVE_CH    = ALL
    TDMV_HWEC    = YES
    MTU         = 8
    El software es como el sexo, es mejor si es libre y seguro

    Comentario


    • #3
      ¿Qué versión de OpenR2 estás usando?

      Yo he tenido problemas similares con el CLEAR FO/CLEAR BA. Mi solución en su momento, es crear un script que detecte que canales están bloqueados y los ponga en modo BLOCK. De esta manera, Asterisk no los ocupa, y pasados unos minutos los canales se desbloquean automáticamente, con lo que mi script los vuelve a pasar a IDLE.
      dCAP Christian Cabrera R.
      Para aprender a usar Asterisk, asiste a uno de mis cursos Asterisk
      Si deseas asesoría pagada, por favor contáctame

      Comentario


      • #4
        Christian,

        la version de OpenR2 es:

        libopenr2-1.3.1-0
        libopenr2-devel-1.3.1-0

        He hecho un script muy básico que pienso ejecutarlo con un cron cada minuto (espero que no sea exagerado), solo que lo que yo haré es ponerlo directamente en "IDLE" en lugar de "BLOCK", el script es el siguiente:

        Código:
        ESTADO=$(/usr/sbin/asterisk -rx "mfcr2 show channels" | grep "FORCED R" | awk ' NR==1 { print $8 } ' )
        if [ "$ESTADO" == "FORCED R" ]; then
                CANAL=$(/usr/sbin/asterisk -rx "mfcr2 show channels" | grep "FORCED R" | awk 'NR==1 { print $1 } ')
                /usr/sbin/asterisk -rx 'mfcr2 set idle '$CANAL
                FECHA=$(date "+%Y:%m:%d %T")
                echo $FECHA" El canal "$CANAL" se bloqueo y fue cambiado a idle"
                ESTADO=$(/usr/sbin/asterisk -rx "mfcr2 show channels" | grep "FORCED R" | awk ' NR==1 { $8 } ')
        
                if [ "$ESTADO" == "FORCED R" ]; then
                        CANAL=$(/usr/sbin/asterisk -rx "mfcr2 show channels" | grep "FORCED R" | awk 'NR==1 { print $1 } ')
                        FECHA=$(date "+%Y:%m:%d %T")
                        echo $FECHA" El canal "$CANAL" aun continua bloqueado"          
                else
                        FECHA=$(date "+%Y:%m:%d %T")
                        echo $FECHA" Todos los canales estan libres"
                fi
        
        else
                FECHA=$(date "+%Y-%m-%d %T")
                echo $FECHA "No hay canales bloqueados"
                exit 0
        fi
        Lo voy a probar para ver si funciona bien y comento los resultados
        Editado por última vez por poseidon_xk; https://asteriskmx.org/foros/member/2346-poseidon_xk en 01-22-2015, 03:19 PM.
        El software es como el sexo, es mejor si es libre y seguro

        Comentario


        • #5
          Les comento que por desgracia el script que hice no me funcionó correctamente ya que aún hay canales bloqueados, Christian me puedes decir como hiciste tu script para monitorear los canales, te lo agradeceré mucho.

          Saludos
          El software es como el sexo, es mejor si es libre y seguro

          Comentario

          Nube de Etiquetas

          Colapsar

          Principales Usuarios Activos

          Colapsar

          No hay usuarios activos superiores.
          Trabajando...
          X