Asterisk cannot hang up after longer 2 minutes

580 views Asked by At

I am using Asterisk AGI to control incoming call from Twilio

After STREAM FILE command is executed (to play some audio file), I want to Hangup channel.

I tried execute HANGUP command and It worked if call duration < 2 minutes.

HANGUP command not woking after call longer 2 minutes.

Any solution to resolve my issue?

2

There are 2 answers

2
Alan On

I have seen issues with chan-sip and TCP and attempt to re-use a TCP socket it should not (it was closed).

Are you using SIP/TCP perhaps with chan-sip? If you move to pjsip, it works great.

ASTERISK-20644 - Don't always use the existing TCP connection for in-dialog requests

1
nguoitotkhomaisao On

Finally I fixed this issue by add below code to sip.conf at [general]

session-timers=originate
session-expires=120
session-minse=90
session-refresher=uas