Call does not disconnect

Looking for some guidance. I am running Asterisk 11 with freePBX 2.11.023. I am using an 8-port Digium telephony with FXO ports. There are 4 analog lines coming into that card.

The problem I am seeing is that when calls come in, the user will answer the call, talk for a minute, and hang up the phone. But the channel stays active. Pretty soon all 4 channels are active even though none of the SIP devices are in use. I have to restart the entire server to get it to clear.

Any suggestions on how to resolve this?

I have found that I can use the ‘channel request hangup all’ command at the CLI to clear it out, but this is obviously not a long term solution. Any help would be appreciated.

You have to find out if your provider gives you disconnect supervision and set your dahdi config to suit, if they don’t provide it you will need to rely on your busydetect= settings in the same place. Many many recipes out there in google lamd.

After doing some more troubleshooting, there is a new wrinkle.

As I mentioned in the original post, I have 4 analog lines going into an 8-port Digium card. These 4 lines are in a hunt group from telco. I configured “DAHDI Channel DIDs” for those 4 lines as seen here - http://s27.postimg.org/a6o9nqr7n/Untitled.png.
It seems that when there are 3 active calls, and that 4th call tries to come in, it just rings and rings and rings. No voicemail, no ringing on the phones, nothin.
I should be able to have 4 simultaneous external calls, correct?

Check your hunt group from the telco behaves exactly as advertised , check that you have the ports in the correct order.

Guys - having the same problem at a different site. It happened after I did yum update this morning. It was working flawlessyly prior to the updates this morning. Is one of the modules broken? It happens more frequently than on the other system though. I am having to clear the channels manually every hour or so. I have pasted the CLI output during one of these calls. Please advise…

== Spawn extension (dpma_message_context, digium_phone_module, 7) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]:1] Macro(“DAHDI/3-1”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/3-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“DAHDI/3-1”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“DAHDI/3-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/3-1’ in macro ‘hangupcall’
== Spawn extension (macro-dial, h, 1) exited non-zero on ‘DAHDI/3-1’
== Extension Changed auto_hint_108[from-internal] new state Idle for Notify User 106
== Extension Changed auto_hint_108[from-internal] new state Idle for Notify User 108
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘DAHDI/3-1’ in macro ‘dial’
== Spawn extension (ext-group, 600, 11) exited non-zero on ‘DAHDI/3-1’
– Hanging up on ‘DAHDI/3-1’
– Hungup ‘DAHDI/3-1’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=sip:192.168.0.110:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=sip:192.168.0.110:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] MessageSend(“Message/ast_msg_queue”, “digium_phone:blah”) in new stack
– Executing [[email protected]_message_context:5] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, proxy, 5) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “TMP_RESPONSE_URI=sip:192.168.0.110:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(Request-URI)=sip:192.168.0.110:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=”) in new stack
– Executing [[email protected]_message_context:5] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=”) in new stack
– Executing [[email protected]_message_context:6] MessageSend(“Message/ast_msg_queue”, “sip:192.168.0.110:5060,proxy”) in new stack
– Executing [[email protected]_message_context:7] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, digium_phone_module, 7) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=sip:192.168.0.111:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=sip:192.168.0.111:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] MessageSend(“Message/ast_msg_queue”, “digium_phone:blah”) in new stack
– Executing [[email protected]_message_context:5] Hangup(“Message/ast_msg_queue”, “”) in new stack
[2014-03-13 16:05:03] WARNING[1909][C-00000000]: channel.c:1309 __ast_queue_frame: Exceptionally long queue length queuing to Message/ast_msg_queue
== Spawn extension (dpma_message_context, proxy, 5) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “TMP_RESPONSE_URI=sip:192.168.0.111:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(Request-URI)=sip:192.168.0.111:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=”) in new stack
– Executing [[email protected]_message_context:5] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=”) in new stack
– Executing [[email protected]_message_context:6] MessageSend(“Message/ast_msg_queue”, “sip:192.168.0.111:5060,proxy”) in new stack
– Executing [[email protected]_message_context:7] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, digium_phone_module, 7) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=sip:192.168.0.103:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=sip:192.168.0.103:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] MessageSend(“Message/ast_msg_queue”, “digium_phone:blah”) in new stack
– Executing [[email protected]_message_context:5] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, proxy, 5) exited non-zero on ‘Message/ast_msg_queue’
– Executing [[email protected]_message_context:1] Set(“Message/ast_msg_queue”, “MESSAGE(custom_data)=mark_all_outbound”) in new stack
– Executing [[email protected]_message_context:2] Set(“Message/ast_msg_queue”, “TMP_RESPONSE_URI=sip:192.168.0.103:5060”) in new stack
– Executing [[email protected]_message_context:3] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(Request-URI)=sip:192.168.0.103:5060;ob”) in new stack
– Executing [[email protected]_message_context:4] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-URI)=”) in new stack
– Executing [[email protected]_message_context:5] Set(“Message/ast_msg_queue”, “MESSAGE_DATA(X-Digium-AppServer-Response-FullContact)=”) in new stack
– Executing [[email protected]_message_context:6] MessageSend(“Message/ast_msg_queue”, “sip:192.168.0.103:5060,proxy”) in new stack
– Executing [[email protected]_message_context:7] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, digium_phone_module, 7) exited non-zero on ‘Message/ast_msg_queue’

Currently, there is nobody on the phones and this is the output of core show channels:

SRVAST-VV3*CLI> core show channels
Channel Location State Application(Data)
DAHDI/1-1 [email protected]: Up VoiceMail([email protected],u)
DAHDI/3-1 [email protected]: Up VoiceMail([email protected],u)
2 active channels
2 active calls
1208 calls processed

This is one of the channels that is currently showing active even though it shouldn’t be…

SRVAST-VV3*CLI> core show channel DAHDI/3-1
– General –
Name: DAHDI/3-1
Type: DAHDI
UniqueID: 1394759817.278
LinkedID: 1394759817.278
Caller ID: (N/A)
Caller ID Name: (N/A)
Connected Line ID: 105
Connected Line ID Name: -> Rachel (via sip:[email protected])
Eff. Connected Line ID: 105
Eff. Connected Line ID Name: -> Rachel (via sip:[email protected])
DNID Digits: (N/A)
Language: en
State: Up (6)
Rings: 1
NativeFormats: (ulaw)
WriteFormat: slin
ReadFormat: ulaw
WriteTranscode: Yes (slin)->(ulaw)
ReadTranscode: No
1st File Descriptor: 25
Frames in: 414602
Frames out: 413588
Time to Hangup: 0
Elapsed Time: 2h17m50s
Direct Bridge:
Indirect Bridge:
– 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
Call Identifer: [C-00000030]
Variables:
MACRO_DEPTH=2
MACRO_PRIORITY=23
MACRO_CONTEXT=macro-exten-vm
MACRO_EXTEN=s
ARG1=105
VMCONTEXT=default
DB_RESULT=default
MODE=unavail
RETVM=
MMODE=NOANSWER
MEXTEN=105
GOSUB_RETVAL=
VMGAIN=
AMPUSERCIDNAME=
AMPUSER=
REALCALLERIDNUM=
TOUCH_MONITOR=1394759817.278
ARG3=
ARG2=NOANSWER
DIALSTATUS=NOANSWER
SV_DIALSTATUS=NOANSWER
DIALEDTIME=
ANSWEREDTIME=
DIALEDPEERNAME=
DIALEDPEERNUMBER=
KEEPCID=TRUE
CWIGNORE=
D_OPTIONS=TtrM(auto-blkvm)
DSTRING=SIP/105
ITER=2
THISDIAL=SIP/105
ITER2=2
NEWDIAL=SIP/105&
THISPART2=SIP/105
LOOPCNT2=1
LOOPCNT=1
DEVICES=105
EXTHASCW=ENABLED
DIALSTATUS_CW=
DEXTEN=105
MON_FMT=wav
REC_POLICY_MODE_SAVE=dontcare
RT=15
PICKUPMARK=105
EXTTOCALL=105
RingGroupMethod=none
TTL=63
ARG5=0
ARG4=0
RINGTIMER=15
SIPTRANSFER_REFERER=sip:[email protected]
SIPTRANSFER=yes
SIPDOMAIN=192.168.0.1
BLINDTRANSFER=SIP/109-00000104
SIPREFERREDBYHDR=sip:[email protected];ob
SIPREFERRINGCONTEXT=from-internal
[email protected]:5060
BRIDGEPEER=SIP/109-00000104
FORWARD_CONTEXT=from-internal
CFIGNORE=
AGISTATUS=SUCCESS
ds=SIP/100&SIP/101&SIP/103&SIP/104&SIP/105&SIP/106&SIP/107&SIP/108&SIP/109&SIP/110&SIP/111,20,TtrM(auto-blkvm)
FILTERED_DIAL=100-101-103-104-105-106-107-108-109-110-111
CALLFILENAME=rg-600-unknown-20140313-181702-1394759817.278
FROMEXTEN=unknown
TIMESTR=20140313-181702
YEAR=2014
MONTH=03
DAY=13
NOW=1394759822
REC_STATUS=INITIALIZED
REC_POLICY_MODE=dontcare
NODEST=600
RRNODEST=
BLKVM_CHANNEL=DAHDI/3-1
CALLINGPRES_SV=allowed_not_screened
MOHCLASS=default
FROM_DID=7609510321
CHAN=3
DID=s

CDR Variables:
level 1: cnam=
level 1: cnum=
level 1: dnid=
level 1: dst=600
level 1: dcontext=ext-group
level 1: channel=DAHDI/3-1
level 1: dstchannel=SIP/105-00000107
level 1: lastapp=VoiceMail
level 1: [email protected],u
level 1: start=2014-03-13 18:17:23
level 1: duration=8270
level 1: billsec=0
level 1: disposition=NO ANSWER
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1394759817.278
level 1: linkedid=1394759817.278
level 1: sequence=315

We talked about that before, until you resolve your disconnect supervision misconfiguration, then you will continue to have these problems.

This is a different system and it was working perfectly until I upgraded all the modules this morning and performed a yum update on CentOS. How can this be a telco issue?

It’s not a telco problem it is your dahdi configuration problem.

That’s what I’m asking for…some help in that configuration. What do I need to change and where?

that would depend on how your telco has provisioned the lines, no mind readers here.

Not only is it telco dependent it varies by country.

Are you using the DAHDI module inside FreePBX?

Yes, I am. I will call telco today and ask the question

Did you at least set your country code?

To let you know how hard this I have trunks in China on a Cisco gateway that I have never gotten perfect after 2 years of fiddling and I have taken recordings of the disconnect supervision tones. Removed the harmonics, identified the frequency and duration of the tones and programmed that as a custom cadence into the busy detection field (works same in Asterisk)

Take this analogy, when a human does the process, they make a phone call, hang the phone up and pick it up again to make another.

If they are greeted with an odd tone we know to reapply the hookswitch for a longer period of time, repeat and wait for dial tones. The human comes in handy. Getting a computer to do this is harder.

The one I find the funniest is people that pickup the phone, set the receiver down then dial and pickup the receiver. It’s called dial tone for a reason. It is a feedback mechanism if a switch is too busy to complete a call.

Fact for the day Dial Tone in US is a mixing (heterodyne) of 350 and 440hz - an A and an F in standard tune. Dial tone was important as exchanges became automated and with party lines. There are still rural areas in the US with party lines.

Thank you for the info. Where do I set the country code in FreePBX?

In the DAHDI config. Have you looked at the sample DAHDI configuration in the Asterisk documentation? It explains every variable. Even though you are using he FreePBX tool to program DAHDI you still have to understand what the options are.

What if I did not install Asterisk from source? I used Asterisk Now to install. Where can I find the sample files?

Google?