I have worked with over 20 installs of FreePBX and this is a first.
Current PBX Version:14.0.5.2
Current System Version:12.7.5-1807-1.sng7
SIP Trunk is from a local service provider and we were told, “you don’t set anything up, it just works”. Of course after 4 hours on the phone and trying different SIP trunk configs, we were able to make and receive calls. Here is trunk info:
OUTGOING:
host=XXX.XXX.XXX.XXX
keepalive=20
session-timers=refuse
allow=ulaw
type=peer
fromuser=704#######
dtmfmode=rfc2833
port=5060
INCOMING:
USER Context: 704#######
USER Details:
host=XXX.XXX.XXX.XXX
type=friend
nat=never
disallow=all
canreinvite=yes
allow=ulaw
dtmfmode=auto
context=from-trunk
insecure=port,invite
qualify=yes
NO REGISTRATION STRING
Also, I had to enable Allow Anonymous Inbound in the General SIP settings for the trunk to work. The provider stated it was IP based connection security, so no user/login details were required.
The issue we are seeing, is calls disconnect after 15:00-15:10 min. Of course the trunk provider said it was a PBX issue or firewall issue. So I have tried adjusting TRP timeouts, added session-timers=refuse on SIP, keepalive=20 on trunk, removed all firewall restrictions… all with no change.
SIP debug of trunk below (Phone and IP masked to protect the innocent):
Blockquote
Retransmitting #1 (no NAT) to XXX.XXX.XXX.XXX:5060:
OPTIONS sip:XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK38882347
Max-Forwards: 70
From: “Unknown” sip:[email protected]:5160;tag=as0c6fb61b
To: sip:XXX.XXX.XXX.XXX
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.5.2(13.22.0)
Date: Tue, 27 Nov 2018 13:49:08 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
Retransmitting #2 (no NAT) to XXX.XXX.XXX.XXX:5060:
OPTIONS sip:XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK38882347
Max-Forwards: 70
From: “Unknown” sip:[email protected]:5160;tag=as0c6fb61b
To: sip:XXX.XXX.XXX.XXX
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.5.2(13.22.0)
Date: Tue, 27 Nov 2018 13:49:08 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
[2018-11-27 08:49:10] NOTICE[6665]: chan_sip.c:29618 check_rtp_timeout: Disconnecting call ‘SIP/Spirit-0000000a’ for lack of RTP activity in 31 seconds
– Channel SIP/Spirit-0000000a left ‘simple_bridge’ basic-bridge <7c9fe39d-a3e0-47fe-90bf-c5577a559e7a>
– Channel PJSIP/1014-0000005e left ‘simple_bridge’ basic-bridge <7c9fe39d-a3e0-47fe-90bf-c5577a559e7a>
Scheduling destruction of SIP dialog ‘[email protected]:5160’ in 32000 ms (Method: INVITE)
== Spawn extension (macro-dialout-trunk, s, 25) exited non-zero on ‘PJSIP/1014-0000005e’ in macro ‘dialout-trunk’
Reliably Transmitting (NAT) to XXX.XXX.XXX.XXX:5060:
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK3899c622;rport
Max-Forwards: 70
From: sip:704#######@XXX.XXX.XXX.XXX:5160;tag=as638afa4f
To: sip:704#######@XXX.XXX.XXX.XXX:5060;tag=sip+1+1178000d+7e508ff0
Call-ID: [email protected]:5160
CSeq: 103 BYE
User-Agent: FPBX-14.0.5.2(13.22.0)
X-Asterisk-HangupCause: Requested channel not available
X-Asterisk-HangupCauseCode: 44
Content-Length: 0
== Spawn extension (restrictedroute-c81e728d9d4c2f636f067f89cc14862c, 704#######, 7) exited non-zero on ‘PJSIP/1014-0000005e’
– Executing [[email protected]:1] Hangup(“PJSIP/1014-0000005e”, “”) in new stack
== Spawn extension (restrictedroute-c81e728d9d4c2f636f067f89cc14862c, h, 1) exited non-zero on ‘PJSIP/1014-0000005e’
<— SIP read from UDP:XXX.XXX.XXX.XXX:5060 —>
SIP/2.0 481 Call/Transaction Does Not Exist
Call-ID: [email protected]:5160
CSeq: 103 BYE
From: sip:704#######@XXX.XXX.XXX.XXX:5160;tag=as638afa4f
To: sip:704#######@XXX.XXX.XXX.XXX:5060;tag=sip+1+1178000d+7e508ff0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;received=XXX.XXX.XXX.XXX;rport=5160;branch=z9hG4bK3899c622
Server: SIP/2.0
Warning: 399 sip “There is no matching INVITE session”
Content-Length: 0
<------------->
— (9 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]:5160’ Method: INVITE
Retransmitting #3 (no NAT) to XXX.XXX.XXX.XXX:5060:
OPTIONS sip:XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK38882347
Max-Forwards: 70
From: “Unknown” sip:[email protected]:5160;tag=as0c6fb61b
To: sip:XXX.XXX.XXX.XXX
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.5.2(13.22.0)
Date: Tue, 27 Nov 2018 13:49:08 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
Retransmitting #4 (no NAT) to XXX.XXX.XXX.XXX:5060:
OPTIONS sip:XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK38882347
Max-Forwards: 70
From: “Unknown” sip:[email protected]:5160;tag=as0c6fb61b
To: sip:XXX.XXX.XXX.XXX
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.5.2(13.22.0)
Date: Tue, 27 Nov 2018 13:49:08 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
Really destroying SIP dialog ‘[email protected]:5160’ Method: OPTIONS
Reliably Transmitting (no NAT) to XXX.XXX.XXX.XXX:5060:
OPTIONS sip:XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5160;branch=z9hG4bK5113f37a
Max-Forwards: 70
From: “Unknown” sip:[email protected]:5160;tag=as2e442b1c
To: sip:XXX.XXX.XXX.XXX
Contact: sip:[email protected]:5160
Call-ID: [email protected]:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.5.2(13.22.0)
Date: Tue, 27 Nov 2018 13:49:22 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
Blockquote
Any thoughts or recommendations are appreciated!