Asterisk doesn't hang up calls

Hello…

I’m using Asterisk version 11.6.0 and have a problem with outgoing calls and hangups of calls.
When we make outgoing calls we bridge it in asterisk, we make 2 outgoing calls and connect them together in Asterisk. The problem is when I callout to mobile phones and some of the parties hangs up the call ends OK, but if one phone is a PSTN phone and the other is mobilephone the call is not ended when the pstn phone hangs up, the call continues if i hang up the mobile phone the call is ended.
Is there any configuration that can be made so the PSTN call is hanged up in asterisk when the call is ended on the PSTN phone?

If your line is analog you can set in the chan_dahdi.conf the parameters busydetec & busycount.

That may not help. I think the problem here is calling party only clearing.

When an analogue PSTN line hangs up, most networks assume that someone put the phone down before picking up another phone on the same line. Consequently the call will not be cleared. Typically the network will force a clear some minutes later (there have been reports that BT in the UIK have, or about, to, greatly reduce this timeout.

It is possible that lines sold for PABX use will have either party clearing, but you will need to consult the PSTN operator.

Digital lines have both a clear and a release. If I have them the right way round, clear is hangup and release is the final dropping of the call. If your outgoing line were digital, you would get a clear when the the callee hungup, but there is no way of signalling this on an analogue line, except possibly for some sort of on hold tone (which might or might not be treated as hangup by Asterisk).

Mobile phones are digital, and because transferring to another direct wired extension doesn’t make sense, they will go straight to release. (On the other hand, some mobile phones/networks, will treat a clear from an analogue line as hold.)

BT have a supplier information note that clearly explains how call clearing is handled on analogue lines. Other PTTs may or may not have such documents.

Hi…

Thanks for your replys, I have continued looking at this, made a dump of the sip setup and see
that the BYE message comes almost after minute after we hangup, will talk to the operator regarding this.