Voicemail ties up line

I’ve been trying to work this bug out for weeks now and i’m completely stumped at this point, so any help will be greatly appreciated! 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 to see how they signal hangups, and apparently they dont do 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/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) [code]
[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[/code]

[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: 100@default|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: lastdata=100@default|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

[size=150]P.s. I will fscking paypal you $$ if you can help solve this once and for all. Not even kidding.[/size]

Also here’s my dahdi.conf

[code];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]
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
[/code]

Here’s a debug output on the DAHDI 3-1 that is tied up at the moment.

[code]

[Jun 6 19:10:18] VERBOSE[7177] logger.c: – Executing [s@macro-vm: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(/)
[Jun 6 19:10:18] VERBOSE[7177] logger.c: – Executing [s@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [vmx@macro-vm: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 [s-NOANSWER@macro-vm:1] Macro(“DAHDI/3-1”, “get-vmcontext|100”) in new stack
[Jun 6 19:10:18] VERBOSE[7177] logger.c: – Executing [s@macro-get-vmcontext: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 [s@macro-get-vmcontext: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 [s@macro-get-vmcontext: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 [s-NOANSWER@macro-vm:2] VoiceMail(“DAHDI/3-1”, “100@default|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[/code]

zachsis,

check out /etc/asterisk/indications.conf for the correct hangup tones for your country / region. I’ve had a similar issue with Linksys boxes not detecting remote hangups and it turned out to be the indications.

Hope this helps

Stoyan

Thanks for writing back. If you’re in the US, can I look at yours for comparison?

[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. ;
;--------------------------------------------------------------------------------;

[general]
country=us

[us]
description = United States / North America
ringcadence = 2000,4000
dial = 350+440
busy = 480+620/500,0/500
ring = 440+480/2000,0/4000
congestion = 480+620/250,0/250
callwaiting = 440/300,0/10000
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
record = 1400/500,0/15000
info = !950/330,!1400/330,!1800/330,0
stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
[/code]

Unfortunately I’m not in the US. Generally those settings in indications.conf are accurate, but they might be some more specific for your telco. If you could tell me which is your telco and where are you located (PM me the last for privacy) I could try to lookup the correct tones for you.