Inbound calls sometimes hangup after about 20 seconds

Hi.

We’ve recently started seeing a problem where sometimes (perhaps 25% of the time):

  1. An inbound call arrives at our IVR over our IAX trunk
  2. The IVR plays, caller selects an option and asterisk starts ringing 1 or more SIP phones
  3. A staff member answers the phone and starts talking
  4. We can hear the caller and they can hear us.
  5. Approximately 20 seconds later, our asterisk server hangs up the call for no apparent reason…?

I have looked in our asterisk logfile and compared a failed call with a successful call, and the difference is that for a failed call we see this happen at the hangup point:

[Sep 17 13:40:48] VERBOSE[19385] logger.c: == Spawn extension (macro-dial, s, 38) exited non-zero on ‘IAX2/faktortel-6808’ in macro ‘dial’
[Sep 17 13:40:48] VERBOSE[19385] logger.c: == Spawn extension (macro-dial, s, 38) exited non-zero on ‘IAX2/faktortel-6808’
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:1] Macro(“IAX2/faktortel-6808”, “hangupcall”) in new stack
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:1] GotoIf(“IAX2/faktortel-6808”, “1?skiprg”) in new stack
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Goto (macro-hangupcall,s,4)
[Sep 17 13:40:48] DEBUG[19385] app_macro.c: Executed application: GotoIf
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:4] GotoIf(“IAX2/faktortel-6808”, “0?skipblkvm”) in new stack
[Sep 17 13:40:48] DEBUG[19385] app_macro.c: Executed application: GotoIf
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:5] NoOp(“IAX2/faktortel-6808”, "Cleaning Up Block VM Flag: BLKVM/806/IAX2/fak
[Sep 17 13:40:48] DEBUG[19385] app_macro.c: Executed application: Noop
[Sep 17 13:40:48] DEBUG[19385] func_db.c: DB_DELETE: BLKVM/806/IAX2/faktortel-6808 not found in database.
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:6] NoOp(“IAX2/faktortel-6808”, "Deleting: BLKVM/806/IAX2/faktortel-6808 ") in
[Sep 17 13:40:48] DEBUG[19385] app_macro.c: Executed application: Noop
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:7] GotoIf(“IAX2/faktortel-6808”, “1?theend”) in new stack
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Goto (macro-hangupcall,s,9)
[Sep 17 13:40:48] DEBUG[19385] app_macro.c: Executed application: GotoIf
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Executing [[email protected]:9] Hangup(“IAX2/faktortel-6808”, “”) in new stack
[Sep 17 13:40:48] VERBOSE[19385] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘IAX2/faktortel-6808’ in macro ‘hangupcall’
[Sep 17 13:40:48] VERBOSE[19385] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘IAX2/faktortel-6808’
[Sep 17 13:40:48] VERBOSE[19385] logger.c: – Hungup ‘IAX2/faktortel-6808’

I’ve seen people reporting something similar to this in lots of places although they appear to normally be problems with a SIP trunk behind a NAT firewall. Our asterisk server is behind a NAT firewall from the public internet, but we are using an IAX trunk so this should not be the issue for us.

The SIP handsets are all on the same LAN segment as the asterisk server.

Any ideas?

Thanks.

[edited for correctness]

I’m having a very similar problem and can’t seem to find a solution