Call being dropped after 15 minutes [RESOLVED]

Hello,

I’m having a weird problem, tried a few possible solutions with no success and now I need help from you guys.

Scenario:
A have three asterisk boxes one as E1 gateway and the other two as a PBX machines, all of them connected through SIP trunks. So far so good.

Problem:
SIP calls between the PBX machines are fine, but all inbound calls (outbound calls are fine) coming from the asterisk E1 gateway are being dropped by the PBX machines after 15 minutes and the following warning can be seen on the logs:

p-retransmit.txt.
[Oct  4 11:05:43] WARNING[6066] chan_sip.c: Maximum retries exceeded on transmission 636c243a08a8d9bd1154c1ed0dfd53f3@10.145.80.10 for seqno 102 (Critical Request) -- See doc/sip-retransmit.txt.
[Oct  4 11:05:43] WARNING[6066] chan_sip.c: Hanging up call 636c243a08a8d9bd1154c1ed0dfd53f3@10.145.80.10 - no reply to our critical packet (see doc/sip-retransmit.txt).
[Oct  4 11:05:43] VERBOSE[16590] logger.c:     -- Executing [h@macro-dial:1] Macro("SIP/TRONCO-85-00000d61", "hangupcall") in new stack
[Oct  4 11:05:43] VERBOSE[16590] logger.c:     -- Executing [s@macro-hangupcall:1] GotoIf("SIP/TRONCO-85-00000d61", "1?skiprg") in new stack

What has been tried:

  • I fiddled a little with the t1min parameter (from 200 to 800) but the problem persists.
  • Disabled the qualify param.

Trunk config the same on both sides, execpt the IP adress and trunk name:

[TRONCO-85]
type=friend
qualify=no
host=10.145.80.10
disallow=all
allow=alaw&ulaw&h264
context=from-internal

General section from sip.conf:

[general]
videosupport=yes
disallow=all
allow=alaw
allow=ulaw
canreinvite=no
qualifyfreq=120
callcounter=yes
limitonpeers=yes
rtptimeout=240
rtpholdtimeout=600

Data (for all machines):
asterisk 1.6.0.26
dahdi 2.3.0.1
libpri 1.4.10.2

It’s old, I know, but update is not an option for now :confused:

Wrapping up
What may be causing that kind of behaviour? Calls being dropped after 15 minutes ONLY if they came from the E1 gateway asterisk and only the inbound calls.

SIP Session timers turned on?

It is not set, therefore it defaults to ‘accept requests’, but never originate.

Here’s the result of ‘sip show settings’

[code]Global Settings:

UDP SIP Port: 5060
UDP Bindaddress: 0.0.0.0
TCP SIP Port: Disabled
TLS SIP Port: 5061
TLS Bindaddress: 127.0.0.1
Videosupport: Yes
Textsupport: No
AutoCreate Peer: No
Ignore SDP sess. ver.: No
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promsic. redir: No
Enable call counters: Yes
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Call limit peers only: Yes
Direct RTP setup: No
User Agent: Asterisk PBX 1.6.0.26-FONCORE-r78
SDP Session Name: Asterisk PBX 1.6.0.26-FONCORE-r78
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: -1
SIP realtime: Disabled
Qualify Freq : 120000 ms

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
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: No
Jitterbuffer forced: No
Jitterbuffer max size: -1
Jitterbuffer resync: -1
Jitterbuffer impl:
Jitterbuffer log: No

Network Settings:

SIP address remapping: Disabled, no localnet list
Externhost:
Externip: 0.0.0.0:0
Externrefresh: 10
Internal IP: 127.0.0.1:5060
STUN server: 0.0.0.0:0

Global Signalling Settings:

Codecs: 0x10000e (gsm|ulaw|alaw|h263p)
Codec Order: alaw:20,ulaw:20,gsm:20
Relax DTMF: No
RFC2833 Compensation: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 240
RTP Hold Timeout: 600
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: Yes
Pedantic SIP support: No
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Notify hold state: Yes
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: No

Default Settings:

Context: from-sip-external
Nat: RFC3581
DTMF: rfc2833
Qualify: 0
Use ClientCode: No
Progress inband: Never
Language: pt_BR
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97


[/code]

So if you do a sip show channel on the call, do you see a timer active that would expire at 15 minutes?

No, i dont. But just in case I’m missing something, here’s the output:

E1 Gateway <—> PBX

* SIP Call Curr. trans. direction: Outgoing Call-ID: 3b04171063139c67468865cd3b235399@10.145.80.10 Owner channel ID: SIP/TRONCO-84-00001168 Our Codec Capability: 12 Non-Codec Capability (DTMF): 1 Their Codec Capability: 12 Joint Codec Capability: 12 Format: 0x8 (alaw) T.38 support No Video support No MaxCallBR: 384 kbps Theoretical Address: 10.144.80.10:5060 Received Address: 10.144.80.10:5060 SIP Transfer mode: open NAT Support: RFC3581 Audio IP: 10.145.80.10 (local) Our Tag: as433f0ecd Their Tag: as53493711 SIP User agent: Asterisk PBX 1.6.0.26-FONCORE-r78 Username: 8412 Peername: TRONCO-84 Original uri: sip:8412@10.144.80.10 Need Destroy: No Last Message: Tx: ACK Promiscuous Redir: No Route: sip:8412@10.144.80.10 DTMF Mode: rfc2833 SIP Options: (none) Session-Timer: Active S-Timer Interval: 1800 S-Timer Refresher: uas S-Timer Expirys: 0 S-Timer Sched Id: 1636213 S-Timer Peer Sts: Active S-Timer Cached Min-SE: 0 S-Timer Cached SE: 0 S-Timer Cached Ref: auto S-Timer Cached Mode: Accept

PBX <—> E1 gateway

* SIP Call Curr. trans. direction: Incoming Call-ID: 3b04171063139c67468865cd3b235399@10.145.80.10 Owner channel ID: SIP/TRONCO-85-0000091d Our Codec Capability: 12 Non-Codec Capability (DTMF): 1 Their Codec Capability: 12 Joint Codec Capability: 12 Format: 0x8 (alaw) T.38 support No Video support No MaxCallBR: 384 kbps Theoretical Address: 10.145.80.10:5060 Received Address: 10.145.80.10:5060 SIP Transfer mode: open NAT Support: RFC3581 Audio IP: 10.144.80.10 (local) Our Tag: as53493711 Their Tag: as433f0ecd SIP User agent: Asterisk PBX 1.6.0.26-FONCORE-r78 Peername: TRONCO-85 Original uri: sip: 6870@10.145.80.10 Caller-ID: 6870 Need Destroy: No Last Message: Rx: ACK Promiscuous Redir: No Route: sip: 6870@10.145.80.10 DTMF Mode: rfc2833 SIP Options: replaces replace timer Session-Timer: Active S-Timer Interval: 1800 S-Timer Refresher: uas S-Timer Expirys: 0 S-Timer Sched Id: 2274159 S-Timer Peer Sts: Active S-Timer Cached Min-SE: 90 S-Timer Cached SE: 0 S-Timer Cached Ref: uas S-Timer Cached Mode: Accept

PBX <–> Telephone

* SIP Call Curr. trans. direction: Outgoing Call-ID: 530c6cba1f794d5d1237bdac28c97eeb@10.144.80.10 Owner channel ID: SIP/8412-0000091e Our Codec Capability: 12 Non-Codec Capability (DTMF): 1 Their Codec Capability: 8 Joint Codec Capability: 8 Format: 0x8 (alaw) T.38 support No Video support No MaxCallBR: 384 kbps Theoretical Address: 10.140.84.22:5062 Received Address: 10.140.84.22:5062 SIP Transfer mode: open NAT Support: Always Audio IP: 10.144.80.10 (local) Our Tag: as3527cea2 Their Tag: 1723306290 SIP User agent: Yealink SIP-T22P 7.61.0.80 Username: 8412 Peername: 8412 Original uri: sip:8412@10.140.84.22:5062 Need Destroy: No Last Message: Tx: ACK Promiscuous Redir: No Route: sip:8412@10.140.84.22:5062 DTMF Mode: rfc2833 SIP Options: (none) Session-Timer: Inactive

Thanks for the help, btw

On both servers, go ahead and set session-timers=refuse in the [general] section of sip.conf and let’s see what happens.

It worked, malcolmd.

After seting ‘session-timers=refuse’ in the [general] section of sip.conf, just like you said, there where no hangups after 15min.

Thanks for the help.

But, if no one where originating sip-timers, how come this could be a problem?

Session timer support in Asterisk was fairly extensively re-worked, to work properly, in the most recent versions, so all bets are off for previous versions. :smiley: