Voicemail ties up line, hangup issue, will pay for help!

The freepbx support is outrageously expensive, so I’ll pay anyone over paypal who can help me find a workaround or diagnose wtf is going on here! no joke.

I’ve been trying to work this bug out for weeks now and i’m completely stumped at this point. Right now, we have 2 analog lines going into a sangoma A200 FXO card. Randomly (it seems) when calls go to voicemail, the call does not get hung up properly so the line stays tied up until i stop / start wanrouter and asterisk. I also called my telco provider (integra) to see how they signal hangups, and apparently they dont signal on their switch. Nor do they offer Hangup Supervision /Kewlstart etc… (the polarityflip thing.)

Pleeeease someone help me debug this, i’m losing my mind! hah. I’m willing to do any workarounds if we can’t determine why it gets locked up like this. I tried setting the following timeouts in /etc/asterisk/voicemail.conf with no luck. (when I tested the voicemail myself I was silent for 20 seconds and asterisk hung up as it should, but for some reason it doesn’t seem to be terminating for everyone else)

/etc/asterisk/voicemail.conf

[general]
maxsilence=20
silencethreshold=128
#include vm_general.inc
#include vm_email.inc
[default]

100 => 2100,voicemail,,,attach=no|saycid=no|envelope=no|delete=no

/etc/asterisk/chan_dahdi.conf

    ;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
    ;autogenrated on 2011-01-23
    ;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
    relaxdtmf=yes
    rxgain=0.0
    txgain=0.0
    group=1
    callgroup=1
    pickupgroup=1
    immediate=no
    busydetect=yes
    busycount=9
    busypattern=500,500
    hanguponpolarityswitch=yes

    ;Sangoma AFT-A200 [slot:2 bus:3 span:1]  <wanpipe1>
    context=from-zaptel
    group=0
    echocancel=yes
    signalling = fxs_ks
    channel => 1

    context=from-zaptel
    group=0
    echocancel=yes
    signalling = fxs_ks
    channel => 2

    context=from-zaptel
    group=0
    echocancel=yes
    signalling = fxs_ks
    channel => 3

    context=from-zaptel
    group=0
    echocancel=yes
    signalling = fxs_ks
    channel => 4

show core channel DAHDI/3-1 (during the time that the call has tied up the line)

    [spaPbx*CLI> show channel DAHDI/3-1

    spaPbx*CLI>
    e[0K -- General --
               Name: DAHDI/3-1
               Type: DAHDI
           UniqueID: 1307409010.782
          Caller ID: (N/A)
    Caller ID Name: (N/A)
        DNID Digits: (N/A)
              State: Up (6)
              Rings: 1
      NativeFormats: 0x4 (ulaw)
        WriteFormat: 0x40 (slin)
         ReadFormat: 0x40 (slin)
    WriteTranscode: Yes
      ReadTranscode: Yes
    1st File Descriptor: 13
          Frames in: 986706
         Frames out: 986707
    Time to Hangup: 0
       Elapsed Time: 5h29m2s
      Direct Bridge: <none>
    Indirect Bridge: <none>
    --   PBX   --
            Context: macro-vm
          Extension: s-NOANSWER
           Priority: 2
         Call Group: 0
       Pickup Group: 0
        Application: VoiceMail
               Data: [email protected]|u
        Blocking in: ast_waitfor_nandfds
          Variables:
    MACRO_DEPTH=2
    MACRO_PRIORITY=1
    MACRO_CONTEXT=ext-local
    MACRO_EXTEN=vmu100
    ARG1=100
    VMCONTEXT=default
    DB_RESULT=default
    MODE=unavail
    RETVM=
    MMODE=NOANSWER
    MEXTEN=100
    VMGAIN=
    AMPUSERCIDNAME=
    AMPUSER=
    REALCALLERIDNUM=
    ARG3=
    ARG2=NOANSWER
    CALLINGPRES_SV=allowed_not_screened
    FROM_DID=s
    CHAN=3
    DID=s
    TRANSFERCAPABILITY=SPEECH

      CDR Variables:
    level 1: dnid=
    level 1: dst=s
    level 1: dcontext=from-zaptel
    level 1: channel=DAHDI/3-1
    level 1: lastapp=VoiceMail
    level 1: [email protected]|u
    level 1: start=2011-06-06 19:10:10
    level 1: answer=2011-06-06 19:10:18
    level 1: duration=0
    level 1: billsec=0
    level 1: disposition=ANSWERED
    level 1: amaflags=DOCUMENTATION
    level 1: uniqueid=1307409010.782

Debug info from /var/log/asterisk/full of the DAHDI/3-1 line that is tied up


    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:2] Set("DAHDI/3-1", "VMGAIN=""") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] WARNING[7177] func_db.c: DB requires an argument, DB(<family>/<key>)
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:3] GotoIf("DAHDI/3-1", "1?vmx|1") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Goto (macro-vm,vmx,1)
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:1] Set("DAHDI/3-1", "MEXTEN=100") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:2] Set("DAHDI/3-1", "MMODE=NOANSWER") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:3] Set("DAHDI/3-1", "RETVM=") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:4] Set("DAHDI/3-1", "MODE=unavail") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:5] GotoIf("DAHDI/3-1", "1?chknomsg") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Goto (macro-vm,vmx,7)
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:7] GotoIf("DAHDI/3-1", "0?s-NOANSWER|1") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:8] GotoIf("DAHDI/3-1", "1?notdirect") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Goto (macro-vm,vmx,10)
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] DEBUG[7177] func_db.c: DB: AMPUSER/100/vmx/unavail/state not found in database.
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:10] NoOp("DAHDI/3-1", "Checking if ext 100 is enabled: ") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Noop
    [Jun  6 19:10:18] DEBUG[7177] func_db.c: DB: AMPUSER/100/vmx/unavail/state not found in database.
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:11] GotoIf("DAHDI/3-1", "1?s-NOANSWER|1") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Goto (macro-vm,s-NOANSWER,1)
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:1] Macro("DAHDI/3-1", "get-vmcontext|100") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:1] Set("DAHDI/3-1", "VMCONTEXT=default") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Set
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:2] GotoIf("DAHDI/3-1", "0?200:300") in new stack
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Goto (macro-get-vmcontext,s,300)
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: GotoIf
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:300] NoOp("DAHDI/3-1", "") in new stack
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: NoOp
    [Jun  6 19:10:18] DEBUG[7177] app_macro.c: Executed application: Macro
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- Executing [[email protected]:2] VoiceMail("DAHDI/3-1", "[email protected]|u") in new stack
    [Jun  6 19:10:18] DEBUG[7177] chan_dahdi.c: Took DAHDI/3-1 off hook
    [Jun  6 19:10:18] DEBUG[7177] chan_dahdi.c: No echo training requested
    [Jun  6 19:10:18] VERBOSE[7177] logger.c:     -- <DAHDI/3-1> Playing '/var/spool/asterisk/voicemail/default/100/unavail' (language 'en')
    [Jun  6 19:10:45] VERBOSE[7177] logger.c:     -- <DAHDI/3-1> Playing 'vm-intro' (language 'en')
    [Jun  6 19:10:49] VERBOSE[7222] logger.c:   == Manager 'admin' logged on from 127.0.0.1
    [Jun  6 19:10:50] VERBOSE[7222] logger.c:   == Manager 'admin' logged off from 127.0.0.1
    [Jun  6 19:10:51] VERBOSE[7177] logger.c:     -- <DAHDI/3-1> Playing 'beep' (language 'en')
    [Jun  6 19:10:51] VERBOSE[7177] logger.c:     -- Recording the message
    [Jun  6 19:10:51] VERBOSE[7177] logger.c:     -- x=0, open writing:  /var/spool/asterisk/voicemail/default/100/tmp/ca9DcL format: wav49, 0x9ff4420
    [Jun  6 19:10:51] VERBOSE[7177] logger.c:     -- x=1, open writing:  /var/spool/asterisk/voicemail/default/100/tmp/ca9DcL format: wav, 0x9ff9208

Is there a way to set the maxmum amount of time on a call or voicemail? thats about the only thing I can even think of anymore.

When the channel is stuck can you do core show channels?