Hangup()-command does not hang up the call

I have a TDM410P-card with 3 FXO-modules.
When I call the number of one of these PSTN-lines that terminate in an FXO-module of my Asterisk-server, the call is excepted.

In the weekend there’s an IVR that states that the store is closed.
At the end of the IVR-prompt, Asterisk need to hang up the line after the message was read to the caller.
I use the Hangup()-command in my dialplan.

But the line is not hanged up. There is no tone send to the caller that gives the impression that the call was hung up by Asterisk.

When I look at the time, that indicates the duration of the call, it just keeps on counting…
The call is only really terminated when the caller puts down his phone and ends the call.

I see one temporary solution to this : I use the congestion()-command to make the caller put down the phone when he hears the congestion-tone.

But this is certainly not the way to go ?

How can I force Asterisk to hang up the line ?!

What is your Asterisk version? Try with busydetect=yes in chan_dahdi.conf

Asterisk 1.4.24

This in my chan_dahdi.conf :


But it is not that Asterisk does not detect a call that has been hanged up, it is Asterisk himself who does not hangs up the line properly !

The Hangup()-command ends the conversation so it seems to Asterisk, but the caller is still connected.

When I call with my cellphone to my Asterisk-server en I come to the line in my dialplan that executes the Hangup()-command, time still keeps on counting on my cell phone as if the call is still in progress.

There is no tone on the line, just silence…

It is common practice (e.g. it is standard for UK domestic lines) not to support called party clearing on POTS when the call is from a landline. It may well be the case that there is nothing that Asterisk can do to clear the call faster that the five or so minutes it takes for the call to time out.

The reason this is done is to allow the callee to put down one extension and pick the call up on a more appropriate one.

Normally mobile originated calls can be called party cleared, so one test is to try calling from a mobile. I can only guarantee this for the UK.

It takes 2 minutes before the channel clears. 2 minutes, counting from initiation of the call till the channel clears…

So if one ends up at the voicemail-system, leaves a message of about 30 seconds, then the channels stays open until 2 minutes pass…

So lets say it takes 10 seconds to arrive at the voicemail (after the prompts), then a message is left of about 30 seconds… then the Hangup()-command is called from the dialplan after the message is recorded BUT the line stays occupied for another80 seconds…

Any other tips ?

In that case, the problem is definitely outside of Asterisk.

You could ask your PSTN supplier if they are able to offer a called party clearing service. That might require a change of line type.

Alternatively, you need to generate an announcement or tone to encourage the caller to clear.