0

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?

nguoitotkhomaisao
  • 1,247
  • 1
  • 13
  • 24

2 Answers2

0

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

Alan
  • 10,465
  • 2
  • 8
  • 9
0

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
nguoitotkhomaisao
  • 1,247
  • 1
  • 13
  • 24
  • Interesting, Twilio doesn't support session-timers, https://www.twilio.com/docs/sip-trunking/troubleshooting#problem27. I guess the Asterisk platform behavior is modified somehow? – Alan Nov 21 '19 at 14:33