Incoming calls hang up after 5 minutes

Hi everyone! I just downloaded AsteriskNow a few days ago (I’m very new to this). I managed to set up a handful of extensions and a SIP trunk. Everything appears to be working great except for one issue. When I answer an incoming call, Asterisk will hang up exactly after 5 minutes (not a second later). When I place an outbound call this never happens.

If I look in the Asterisk log file, this is what happens when the call hangs up …

[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: -- Executing [h@macro-dial:1] Macro("SIP/phonepower-sip-00000015", "hangupcall") in new stack
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: -- Executing [s@macro-hangupcall:1] ExecIf("SIP/phonepower-sip-00000015", "0?Set(CDR(recordingfile)=.wav)") in new stack
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: -- Executing [s@macro-hangupcall:2] GotoIf("SIP/phonepower-sip-00000015", "1?theend") in new stack
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: -- Goto (macro-hangupcall,s,4)
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: -- Executing [s@macro-hangupcall:4] Hangup("SIP/phonepower-sip-00000015", "") in new stack
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/phonepower-sip-00000015' in macro 'hangupcall'
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: == Spawn extension (macro-dial, h, 1) exited non-zero on 'SIP/phonepower-sip-00000015'
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] app_macro.c: == Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/phonepower-sip-00000015' in macro 'dial'
[2016-04-06 21:57:42] VERBOSE[21331][C-00000007] pbx.c: == Spawn extension (ext-group, 600, 11) exited non-zero on 'SIP/phonepower-sip-00000015'

I’m not sure how to diagnose this. I should note I have absolutely no ports forwarded to my Asterisk server. I’ve read that I shouldn’t open 5060, and I’m not sure if I need to open RTP port range (10000 - 20000). Anyway, any pointers would be great! Thanks!

Your logs show a nornal hangup but check session timer and rtp timeout settings

Actually, the logs don’t show the reason for the hangup at all, as they start after it has happened.

For five minutes, I would agree with session timers, but, if RTP timers are involved, I would suggest a temporary NAT or firewall rule has dropped as being the primary cause.

@ambiorixg12 - Yeah I’ve looked through the FreePBX panel and I don’t see anything related to a 300 second timeout

My RTP Timers are set like this …

rtptimeout - 60
rtpholdtimeout - 600
rtpkeepalive - 0

@david551 - Yes that’s the problem, the logs are very unhelpful. The line directly before the logs I posted is 5 minutes earlier related to the call incoming to Asterisk. So it doesn’t really help.

I agree it does seem like a timer of some sort, but I’ve looked through all the settings and I can’t find any 5 minute or 300 second timer anywhere. Is there a way to show a more detailed log? I’m looking at (in FreePBX) Reports -> Asterisk Logfiles -> full.

Thanks again!

The timer can be in a router or in a parameter specified by the remote peer.

disable SIP ALG on the router. thanks

hi, is this issue solved ? I happen the problem like you .if you have any answer ,tell me please.!the reason is after 5mins the server send a invite message to the provider without any reason.

try to make bigger you timer it look like A reinvite which the other system isn’t replying

THE another system replay 603,and then say bye…
how disable the second replay , and there is no reason to send the second replay

any body can help,and how to handle it.

You check firewall, port 10000-65000

the system is not under firewall. and the iptables is not running.
the call hangup case asterisk send second invite message .that’s the problem.why asterisk send invite message ,there is no reason. and the cli shows no message .

Please provide tthe protocol debugging logs from Asterisk.

As already suggested, sending after five minutes sounds like session timers, not “no reason”.

With the current level of detail, I would have to assume that the peer incorrectly rejecting the request.

thanks,david.
the session timeres are below.
vctg*CLI> sip show settings

Global Settings:

UDP Bindaddress: 192.168.141.245:5060
TCP SIP Bindaddress: 192.168.141.245:5060
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: No
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: Yes
SIP domain support: No
Realm. auth: No
Our auth realm vidanetwork.net
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: Yes
User Agent: vcloud
SDP Session Name: Asterisk PBX certified/11.6-cert16
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: vCloud
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: -1
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No

Network QoS Settings:

IP ToS SIP: CS0
IP ToS RTP audio: CS0
IP ToS RTP video: CS0
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: Yes
Jitterbuffer forced: No
Jitterbuffer max size: 200
Jitterbuffer resync: 1000
Jitterbuffer impl: adaptive
Jitterbuffer tgt extra: 40
Jitterbuffer log: No

Network Settings:

SIP address remapping: Enabled using externaddr
Externhost:
Externaddr: 14.12.0.83:0
Externrefresh: 10
Localnet: 192.168.141.0/255.255.255.0
192.168.0.0/255.255.0.0

Global Signalling Settings:

Codecs: (nothing)
Codec Order: none
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 0 (Disabled)
RTP Hold Timeout: 0 (Disabled)
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: Yes
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 3600 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Include CID: No
Notify hold state: No
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70

Default Settings:

Allowed transports: UDP,TCP
Outbound transport: UDP
Context: default
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language: zh
Tone zone:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: asterisk

As a workround, try setting them to refuse.

300-sec.TXT (10.8 KB)this is the full cli output

As a workround, try setting them to refuse? what does that mean , english not good…heh
setting what to refuse?

^those - in sip.conf try:

session-timers=refuse

penguinpbx ,david551, that’s works …thanks very much…:grinning:
thanks so much.