My Asterisk server has problems with hangups.
When a phone hangup don’t cut the call, usually the problem is with PSTN calls.
The call comes from the PSTN, through the IVR
exten => s,1,Background(SoundHCSB2)
exten => 0,1,Goto(from-internal,100,1)
exten => 1,1,Goto(from-internal,154,1)
exten => 2,1,Goto(from-internal,180,1)
exten => 3,1,Goto(from-internal,164,1)
exten => 4,1,Goto(from-internal,200,1)
exten => 5,1,Goto(from-internal,151,1)
exten => _XXX,1,Goto(from-internal,${EXTEN},1)
Later…
exten => _164,1,Answer()
exten => _164,n,Dial(SIP/164,15)
exten => _164,n,GotoIf($["${DIALSTATUS}"=“BUSY”]?ocupado:nodisp)
exten => _164,n(ocupado),Dial(SIP/100)
exten => _164,n(nodisp),Dial(SIP/100)
exten => _164,n,Hangup()