Issues on Inbound Call V17

Hello

I am getting very strange problem on incoming calls. I have setup Trunks and Incoming Routes. Now incoming calls works well when I setup time condition as destination and fails saying Got SIP response 503 “Service Unavailable” back from 10.0.70.2:5060 when I use extension as destination. There is no issues with outgoing call.

Additional Info: I had migrated to V17 using migration tool.

Any help on this is highly appreciated.

Migrated Tool What you mean? You did Backup restore for FreePBX-17

Hi, Have you tried to use sngrep to see which side sending you 503 ?
Maybe you have a bad config or not upgraded modules.

Try to run sngrep 1st and send to us 503 screenshot and same time you can watch at Asterisk side CLI logs too.

Yes. That is right. Earlier I was using distro based on centos and now we have migrated to Debian based Distro.

Howdy! Welcome to the forums.

To clarify: your v17 setup works with both inbound and outbound calls, except when you have a time condition ?

There is a correction. Inbound call only works when there is time condition if I destination is extension, it doesn’t work. I shall post required logs and screenshots shortly.

You can make TimeContidion IF Destination is not existing or busy, call to redirect other Endpoint or Misc Destinations or soo… You have to play with your changes and with yours scenario.

Asterisk Version: 20.10.0
Freepbx version: 17.0.19.24

Trunk SIP Setting

Outgoing

disallow=all
allow=g722&ulaw&alaw&gsm
host=10.0.xx.2
type=peer
fromdomain=10.0.xx.2
context=from-trunk-sip-tata
canreinvite=yes
dtmfmode=RFC2833
insecure=very
qualify=yes

Incoming Register String
****2244:****[email protected]:5060/****2244

Inbound Route
Goes to Extension

Extension Setting

deny=0.0.0.0/0.0.0.0
secret=*********
dtmfmode=rfc2833
canreinvite=no
host=dynamic
defaultuser=
trustrpid=yes
user_eq_phone=no
sendrpid=pai
type=friend
session-timers=accept
nat=force_rport,comedia
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/11
accountcode=
mailbox=11@default
permit=0.0.0.0/0.0.0.0
context=from-internal
callerid=Name <11>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no

RAW Log

2025/03/17 10:08:43.425316 10.0.xx.2:5060 → 10.0.xx.106:5060
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79
2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 INVITE
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8
Route: sip:10.0.xx.106:5060;transport=UDP;lr
X-SessionId: 1884504531
User-Agent: BN4000-3.9.1-575
Supported: timer,100rel
Max-Forwards: 68
X-ZTEAG: 0001
Contact: sip:[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 168

v=0
o=BN4000 520 9390 IN IP4 10.0.xx.2
s=-
c=IN IP4 10.0.xx.2
t=0 0
m=audio 37070 RTP/AVP 8 0 97 18
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=ptime:20

2025/03/17 10:08:43.428738 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8;received=10.0.xx.2;rport=5060
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79****2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

2025/03/17 10:08:43.482256 10.0.xx.106:5060 → 10.0.xx.2:5060
INVITE sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK3cf17b66;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected]
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-17.0.19.24(20.10.0)
Date: Mon, 17 Mar 2025 10:08:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 319

v=0
o=root 542273064 542273064 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 17920 RTP/AVP 0 9 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:43.502839 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 100 Trying
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected]
Call-ID: [email protected]
CSeq: 102 INVITE
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK3cf17b66
Contact: sip:****[email protected]:5060;transport=UDP
Content-Length: 0

2025/03/17 10:08:43.530559 10.0.xx.2:5060 → 10.0.xx.106:5060
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
From: "079
2222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79****2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8
Route: sip:10.0.xx.106:5060;transport=UDP;lr
X-SessionId: 1884504541
User-Agent: BN4000-3.9.1-575
Supported: timer,100rel
Max-Forwards: 67
X-ZTEAG: 0001
Contact: sip:79****[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 293

v=0
o=BN4000 542273064 7980 IN IP4 10.0.xx.2
s=-
c=IN IP4 10.0.xx.2
t=0 0
m=audio 33902 RTP/AVP 8 0 101 9 3
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:43.531952 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79
2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

2025/03/17 10:08:43.597310 10.0.xx.106:5060 → 10.0.xx.2:5060
INVITE sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK499a3f36;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected]
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-17.0.19.24(20.10.0)
Date: Mon, 17 Mar 2025 10:08:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 321

v=0
o=root 1849530412 1849530412 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 11558 RTP/AVP 9 0 8 3 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:43.617464 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 100 Trying
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected]
Call-ID: [email protected]
CSeq: 102 INVITE
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK499a3f36
Contact: sip:****[email protected]:5060;transport=UDP
Content-Length: 0

2025/03/17 10:08:43.645460 10.0.xx.2:5060 → 10.0.xx.106:5060
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
From: "079
2222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504547-1-1742206123-2134470907
To: "79****2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 7fc9c19b-3c8d0f88-f5fed-7efb30b4cf08-6eb330a-13c9-764
CSeq: 19905 INVITE
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-2f784da6-f5fed-3c0eb9a5-7efb67deea58
Route: sip:10.0.xx.106:5060;transport=UDP;lr
X-SessionId: 1884504547
User-Agent: BN4000-3.9.1-575
Supported: timer,100rel
Max-Forwards: 67
X-ZTEAG: 0001
Contact: sip:79****[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 295

v=0
o=BN4000 1849530412 20718 IN IP4 10.0.xx.2
s=-
c=IN IP4 10.0.xx.2
t=0 0
m=audio 39472 RTP/AVP 8 0 101 9 3
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:43.646750 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-2f784da6-f5fed-3c0eb9a5-7efb67deea58;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504547-1-1742206123-2134470907
To: "79
2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 7fc9c19b-3c8d0f88-f5fed-7efb30b4cf08-6eb330a-13c9-764
CSeq: 19905 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

2025/03/17 10:08:43.693566 10.0.xx.106:5060 → 10.0.xx.2:5060
INVITE sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK596a4238;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as2abed2c6
To: sip:****[email protected]
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-17.0.19.24(20.10.0)
Date: Mon, 17 Mar 2025 10:08:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 321

v=0
o=root 1126645265 1126645265 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 16724 RTP/AVP 9 0 8 3 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:43.713657 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 100 Trying
From: sip:****[email protected];tag=as2abed2c6
To: sip:****[email protected]
Call-ID: [email protected]
CSeq: 102 INVITE
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK596a4238
Contact: sip:****[email protected]:5060;transport=UDP
Content-Length: 0

2025/03/17 10:08:43.751766 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 503 Service Unavailable
From: sip:****[email protected];tag=as2abed2c6
To: sip:****[email protected];tag=BN1884504554-0-1742206123-33258813
Call-ID: [email protected]
CSeq: 102 INVITE
Supported: record-aware
Reason: SIP;cause=503;text=“Subsystem Id: ECALLLEG Cause Code: ServiceUnavailable_503”
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK596a4238
Content-Length: 0

2025/03/17 10:08:43.751915 10.0.xx.106:5060 → 10.0.xx.2:5060
ACK sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK596a4238;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as2abed2c6
To: sip:****[email protected];tag=BN1884504554-0-1742206123-33258813
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-17.0.19.24(20.10.0)
Content-Length: 0

2025/03/17 10:08:43.969051 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-2f784da6-f5fed-3c0eb9a5-7efb67deea58;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504547-1-1742206123-2134470907
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as7c8b4d4f
Call-ID: 7fc9c19b-3c8d0f88-f5fed-7efb30b4cf08-6eb330a-13c9-764
CSeq: 19905 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Type: application/sdp
Require: timer
Content-Length: 321

v=0
o=root 1326589848 1326589848 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 17526 RTP/AVP 9 0 8 3 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:44.005017 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 183 Session Progress
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected];tag=BN1884504545-0-1742206123-1068110895
Call-ID: [email protected]
CSeq: 102 INVITE
X-SessionId: 1884504545
User-Agent: BN4000-3.9.1-575
Supported: record-aware,timer,100rel
Contact: sip:****[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK499a3f36
Content-Length: 0

2025/03/17 10:08:44.005414 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as03486793
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

2025/03/17 10:08:44.038310 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 180 Ringing
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected];tag=BN1884504537-0-1742206123-410063588
Call-ID: [email protected]
CSeq: 102 INVITE
X-SessionId: 1884504537
User-Agent: BN4000-3.9.1-575
Supported: record-aware,timer,100rel
Contact: sip:****[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK3cf17b66
Content-Length: 0

2025/03/17 10:08:44.038929 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8;received=10.0.xx.2;rport=5060
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79****2244"sip:79****[email protected]:5060;transport=UDP;tag=as59cbf946
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

2025/03/17 10:08:47.941820 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-2f784da6-f5fed-3c0eb9a5-7efb67deea58;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504547-1-1742206123-2134470907
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as7c8b4d4f
Call-ID: 7fc9c19b-3c8d0f88-f5fed-7efb30b4cf08-6eb330a-13c9-764
CSeq: 19905 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Circuit/channel congestion
X-Asterisk-HangupCauseCode: 34
Content-Length: 0

2025/03/17 10:08:47.964304 10.0.xx.2:5060 → 10.0.xx.106:5060
ACK sip:[email protected]:5060;transport=UDP SIP/2.0
From: "079
2222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504547-1-1742206123-2134470907
To: "79****2244"sip:79****[email protected]:5060;transport=UDP;tag=as7c8b4d4f
Call-ID: 7fc9c19b-3c8d0f88-f5fed-7efb30b4cf08-6eb330a-13c9-764
CSeq: 19905 ACK
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-2f784da6-f5fed-3c0eb9a5-7efb67deea58
Max-Forwards: 70
Route: sip:10.0.xx.106:5060;transport=UDP;lr
Contact: sip:79****[email protected]:5060;transport=UDP
Content-Length: 0

2025/03/17 10:08:47.980706 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 503 Service Unavailable
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected];tag=BN1884504545-0-1742206123-1068110895
Call-ID: [email protected]
CSeq: 102 INVITE
Supported: record-aware
Reason: SIP;cause=503;text=“Subsystem Id: ECALLLEG Cause Code: ServiceUnavailable_503”
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK499a3f36
Content-Length: 0

2025/03/17 10:08:47.980992 10.0.xx.106:5060 → 10.0.xx.2:5060
ACK sip:****[email protected]:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK499a3f36;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected];tag=BN1884504545-0-1742206123-1068110895
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-17.0.19.24(20.10.0)
Content-Length: 0

2025/03/17 10:08:48.191345 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as03486793
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Type: application/sdp
Require: timer
Content-Length: 319

v=0
o=root 583296761 583296761 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 10958 RTP/AVP 9 0 8 3 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:48.229556 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 183 Session Progress
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected];tag=BN1884504537-0-1742206123-410063588
Call-ID: [email protected]
CSeq: 102 INVITE
X-SessionId: 1884504537
User-Agent: BN4000-3.9.1-575
Supported: record-aware,timer,100rel
Contact: sip:****[email protected]:5060;transport=UDP
Allow: INVITE,CANCEL,ACK,BYE,OPTIONS,INFO,PRACK,UPDATE,REFER,NOTIFY,SUBSCRIBE,PUBLISH,MESSAGE,REGISTER
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK3cf17b66
Content-Type: application/sdp
Content-Length: 293

v=0
o=BN4000 583296761 5381 IN IP4 10.0.xx.2
s=-
c=IN IP4 10.0.xx.2
t=0 0
m=audio 37144 RTP/AVP 8 0 101 9 3
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:48.230527 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8;received=10.0.xx.2;rport=5060
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79****2244"sip:79****[email protected]:5060;transport=UDP;tag=as59cbf946
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Type: application/sdp
Require: timer
Content-Length: 271

v=0
o=root 1844614404 1844614404 IN IP4 10.0.xx.106
s=Asterisk PBX 20.10.0
c=IN IP4 10.0.xx.106
t=0 0
m=audio 18770 RTP/AVP 0 8 97
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

2025/03/17 10:08:52.162650 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as03486793
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Circuit/channel congestion
X-Asterisk-HangupCauseCode: 34
Content-Length: 0

2025/03/17 10:08:52.182304 10.0.xx.2:5060 → 10.0.xx.106:5060
ACK sip:[email protected]:5060;transport=UDP SIP/2.0
From: "079
2222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79****2244"sip:79****[email protected]:5060;transport=UDP;tag=as03486793
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 ACK
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8
Max-Forwards: 70
Route: sip:10.0.xx.106:5060;transport=UDP;lr
Contact: sip:79****[email protected]:5060;transport=UDP
Content-Length: 0

2025/03/17 10:08:52.196265 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 503 Service Unavailable
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected];tag=BN1884504537-0-1742206123-410063588
Call-ID: [email protected]
CSeq: 102 INVITE
Supported: record-aware
Reason: SIP;cause=503;text=“Subsystem Id: ECALLLEG Cause Code: ServiceUnavailable_503”
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK3cf17b66
Content-Length: 0

2025/03/17 10:08:52.196502 10.0.xx.106:5060 → 10.0.xx.2:5060
ACK sip:****[email protected]:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK3cf17b66;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected];tag=BN1884504537-0-1742206123-410063588
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-17.0.19.24(20.10.0)
Content-Length: 0

2025/03/17 10:08:56.378926 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8;received=10.0.xx.2;rport=5060
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79****2244"sip:79****[email protected]:5060;transport=UDP;tag=as59cbf946
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Circuit/channel congestion
X-Asterisk-HangupCauseCode: 34
Content-Length: 0

2025/03/17 10:08:56.398841 10.0.xx.2:5060 → 10.0.xx.106:5060
ACK sip:[email protected]:5060;transport=UDP SIP/2.0
From: "9x9x7x07x9x7"sip:[email protected]:5060;transport=UDP;tag=BN1884504531-1-1742206123-1727833265
To: "79
2244"sip:79****[email protected]:5060;transport=UDP;tag=as59cbf946
Call-ID: 45af7a70-76ba839-f5fed-7efb359b9428-6eb330a-13c9-764
CSeq: 20557 ACK
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-38264067-f5fed-3c0eb8c9-7efb76b357f8
Max-Forwards: 70
Route: sip:10.0.xx.106:5060;transport=UDP;lr
Contact: sip:[email protected]:5060;transport=UDP
Content-Length: 0

SNGREP screenshot attached.

I don’t understand why call to ****2244 have jumped to ****2222

You have to dig this message, Same message sngrep showing to you.

It seems like configuration level issue than an infra level issue. Provider have confirmed that their infrastructure is working well and we are able to make outgoing call without any problems.

When I dial a number it jumps from CID to different DID and CDR also makes 3-4 entries. I don’t understand why call to ****2244 have jumped to ****2222

Without a console log from Asterisk I can only guess, but it honestly looks like it’s looping back to the provider, back to you, back to the provider, back to you.

That is true but I don’t reason on why is that happening. I am also having backup setup of Freepbx 16 where everything was working well and I don’t see this observation on freepbx 16. Things that have changed is Freepbx 16 → 17 and Asterisk 18->20. Driver is same chan_sip.

Providing an Asterisk log[1] would likely yield more insight.

[1] https://sangomakb.atlassian.net/wiki/spaces/SS/pages/31162494/Support+Services+-+Providing+Great+Debug#Asterisk-Logs

You have somehow created a loop. You need to show actual setup of the Inbound Route and the Extension along with your Outbound Routes.

Provider = 10.0.xx.2
PBX = 10.0.xx.106

You will notice the incoming calls comes in and right after the PBX sends the 100 Trying to the provider for the incoming, the PBX then sends the call right back to the provider which then loops back into the system it looks like.

Every message in this output is either from 10.0.xx.2 or 10.0.xx.106. Never once is another device/endpoint involved in this call.

Here’s the first INVITE sent back to the provider after the initial 100 Trying is sent:

Note how the PBX is sending the call that should be for the extension back to the provider.

2025/03/17 10:08:43.482256 10.0.xx.106:5060 → 10.0.xx.2:5060
INVITE sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK3cf17b66;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected]
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 INVITE

Here’s the provider giving a 100 Trying to the INVITE

2025/03/17 10:08:43.502839 10.0.xx.2:5060 → 10.0.xx.106:5060
SIP/2.0 100 Trying
From: sip:****[email protected];tag=as5537d8b2
To: sip:****[email protected]
Call-ID: [email protected]
CSeq: 102 INVITE
Via: SIP/2.0/UDP 10.0.xx.106:5060;rport=5060;branch=z9hG4bK3cf17b66
Contact: sip:****[email protected]:5060;transport=UDP
Content-Length: 0

Here’s the provider sending that same call back into the PBX

2025/03/17 10:08:43.530559 10.0.xx.2:5060 → 10.0.xx.106:5060
INVITE sip:[email protected]:5060;transport=UDP SIP/2.0
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "79****2244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8
Route: sip:10.0.xx.106:5060;transport=UDP;lr
X-SessionId: 1884504541
User-Agent: BN4000-3.9.1-575
Supported: timer,100rel
Max-Forwards: 67
X-ZTEAG: 0001
Contact: sip:79****[email protected]:5060;transport=UDP

Here’s the PBX sending a 100 Trying to that new inbound call

2025/03/17 10:08:43.531952 10.0.xx.106:5060 → 10.0.xx.2:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.xx.2:5060;branch=z9hG4bK-ae05be1-f5fed-3c0eb932-7efb6c2dbee8;received=10.0.xx.2;rport=5060
From: "0792222"sip:79****[email protected]:5060;transport=UDP;tag=BN1884504541-1-1742206123-924972956
To: "792244"sip:79****[email protected]:5060;transport=UDP
Call-ID: 3a22e172-737d2013-f5fed-7efb42fe8000-6eb330a-13c9-764
CSeq: 1751 INVITE
Server: FPBX-17.0.19.24(20.10.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:****[email protected]:5060
Content-Length: 0

And here is the PBX sending the call back to the provider, again.

2025/03/17 10:08:43.597310 10.0.xx.106:5060 → 10.0.xx.2:5060
INVITE sip:****[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.xx.106:5060;branch=z9hG4bK499a3f36;rport
Max-Forwards: 70
From: sip:****[email protected];tag=as1e215d42
To: sip:****[email protected]
Contact: sip:****[email protected]:5060
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-17.0.19.24(20.10.0)
Date: Mon, 17 Mar 2025 10:08:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 321

Rinse, repeat until 503 error is thrown.

1 Like

I believe this will be faulted in this version of Asterisk; it has been deprecated for a very long time.

Best option is to use chan_pjsip.

If using chan_sip, unless there is a specific reason for making it insecure with respect to source ports, the best solution is to use remotesecret, instead of secret, but if you want to use the old hack, it should be insecure=invite.

Given that phones won’t try to authenticate the PABX, this combination doesn’t make sense, as you are blocking all inbound requests, so will never challenge them for knowledge of the secret.

This doesn’t make sense with your deny everything setting, and is normally not the most secure option. Unless you really need type=user matching, you should use type=peer.,

I have migrated to pjsip and done some corrections on settings. Inbound and Outbound calls are working fine now.

Did you setup the provider side to send calls to port 5060?