Dialing Extension from a server behind NAT

I have two internal servers in a data centre (not accessible form internet) (server1: 172.16.5.55 and server2/wave2: 172.16.5.56) and one SBC (also in data centre) (172.16.5.58) which is connected to a SIP provider on the Internet. Each of these three servers have asterisk 16.13.0 installed in it. I have created a trunk connecting server2 to the SBC.

The settings I made for the trunk:

server2
/etc/asterisk/sip.conf

; Outgoing Settings
[58-peer]
host=172.16.5.58
username=56-user
fromuser=56-user
type=peer
qualify=yes

; Incoming Settings
[58-user]
type=user
context=from-trunk

[phone1]
type=friend
context=asterisk
host=dynamic
secret=xxxxxxxxxxxxxxxxxxxxx
disallow=all
allow=ulaw
callcounter=yes
qualify=yes

SBC
/etc/asterisk/sip.conf

[56-peer]
host=172.16.5.56
username=58-user
fromuser=58-user
type=peer
qualify=yes

[56-user]
type=user
context=from-trunk

Running sip show peers
server1:

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
58-peer/56-user           172.16.5.58                                 Yes        Yes            5060     OK (1 ms)                                    
phone1/phone1             172.17.0.1                               D  Yes        Yes            52438    OK (9 ms)   

SBC:

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
56-peer/58-user           172.16.5.56                                 Yes        Yes            5060     OK (1 ms)                                    
Hosted01/{{sip-username}} externip                                    Yes        Yes            5060     OK (1 ms)  

So server2/wave2 and SBC is connected.

server2
sip_nat.conf

nat=yes
localnet=172.16.0.0/16
externip=16x.xx.xx.xx

server2
extensions.conf

[asterisk]
exten => 101,1,Wait(1)
exten => 101,2,Dial(SIP/phone1,30)
exten => 101,3,Hangup()

exten => 102,1,Wait(1)
exten => 102,2,Dial(SIP/phone2,30)
exten => 102,3,Hangup()

exten = 1000,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

For the first step, I would like to call server2/wave2 that should return hello-world audio

My laptop’s IP: 192.168.115.71

Firewall in the three servers are disabled.

Using zoiper5 softphone, I register myself with phone1@172.16.5.56 and I dialed 1000. The call is connected, but there are no audio.

Logs with both core set verbose 500 and sip set debug on in the next post

<--- SIP read from UDP:192.168.115.71:33469 --->
INVITE sip:1000@172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---08a8587e94356aab;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;transport=UDP>
To: <sip:1000@172.16.5.56>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Allow-Events: presence, kpml, talk
Content-Length: 336

v=0
o=Z 1601341354712 1 IN IP4 192.168.115.71
s=Z
c=IN IP4 192.168.115.71
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<------------->
--- (13 headers 13 lines) ---
Sending to 192.168.115.71:33469 (NAT)
Sending to 192.168.115.71:33469 (NAT)
Using INVITE request as basis request - 43ua0ePUcxbvveJ_OfRd7Q..
Found peer 'phone1' for 'phone1' from 192.168.115.71:33469

<--- Reliably Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---08a8587e94356aab;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as3cde5756
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 1 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="63c34550"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '43ua0ePUcxbvveJ_OfRd7Q..' in 6400 ms (Method: INVITE)


<--- SIP read from UDP:192.168.115.71:33469 --->
ACK sip:1000@172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---08a8587e94356aab;rport
Max-Forwards: 70
To: <sip:1000@172.16.5.56>;tag=as3cde5756
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 1 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:192.168.115.71:33469 --->
INVITE sip:1000@172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;transport=UDP>
To: <sip:1000@172.16.5.56>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="phone1",realm="asterisk",nonce="63c34550",uri="sip:1000@172.16.5.56;transport=UDP",response="315f1b3fface5a5a12f6fd931aa0a749",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 336

v=0
o=Z 1601341354712 1 IN IP4 192.168.115.71
s=Z
c=IN IP4 192.168.115.71
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.115.71:33469 (NAT)
Using INVITE request as basis request - 43ua0ePUcxbvveJ_OfRd7Q..
Found peer 'phone1' for 'phone1' from 192.168.115.71:33469

  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Got SDP version 1 and unique parts [Z 1601341354712 IN IP4 192.168.115.71]
Found RTP audio format 106
Found RTP audio format 9
Found RTP audio format 98
Found RTP audio format 101
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found audio description format opus for ID 106
Found unknown media description format telephone-event for ID 98
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw|gsm|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
       > 0x557d53125ab0 -- Strict RTP learning after remote address set to: 192.168.115.71:8000
Peer audio RTP is at port 192.168.115.71:8000
Looking for 1000 in asterisk (domain 172.16.5.56)
sip_route_dump: route/path hop: <sip:phone1@192.168.115.71:33469;transport=UDP>

<--- Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Length: 0


<------------>

    -- Executing [1000@asterisk:1] Answer("SIP/phone1-00000006", "") in new stack

Audio is at 19942

Adding codec ulaw to SDP

Adding non-codec 0x1 (telephone-event) to SDP


<--- Reliably Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>

Retransmitting #1 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

Retransmitting #2 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

    -- Executing [1000@asterisk:2] Wait("SIP/phone1-00000006", "1") in new stack

Retransmitting #3 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---


<--- SIP read from UDP:{{sip-providerIP}}:5060 --->
OPTIONS sip:172.16.5.56:5060 SIP/2.0
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bKdd56.3c8d1123000000000000000000000000.0
To: <sip:172.16.5.56:5060>
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-a8bf
CSeq: 10 OPTIONS
Call-ID: 0d8c858a09761434-10559@{{sip-providerIP}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks

<------------->
--- (9 headers 0 lines) ---

Sending to {{sip-providerIP}}:5060 (NAT)
Looking for s in from-sip-external (domain 172.16.5.56)

<--- Transmitting (NAT) to {{sip-providerIP}}:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bKdd56.3c8d1123000000000000000000000000.0;received={{sip-providerIP}};rport=5060
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-a8bf
To: <sip:172.16.5.56:5060>;tag=as4647e12e
Call-ID: 0d8c858a09761434-10559@{{sip-providerIP}}
CSeq: 10 OPTIONS
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:{{wave2-publicIP}}:5060>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '0d8c858a09761434-10559@{{sip-providerIP}}' in 32000 ms (Method: OPTIONS)

Retransmitting #4 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

    -- Executing [1000@asterisk:3] Playback("SIP/phone1-00000006", "hello-world") in new stack

    -- <SIP/phone1-00000006> Playing 'hello-world.ulaw' (language 'en')

    -- Executing [1000@asterisk:4] Hangup("SIP/phone1-00000006", "") in new stack
  == Spawn extension (asterisk, 1000, 4) exited non-zero on 'SIP/phone1-00000006'
Scheduling destruction of SIP dialog '43ua0ePUcxbvveJ_OfRd7Q..' in 6400 ms (Method: INVITE)

Retransmitting #5 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

Retransmitting #6 (NAT) to 192.168.115.71:33469:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---37460427427a55c9;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=6b30115e
To: <sip:1000@172.16.5.56>;tag=as62e0f7c6
Call-ID: 43ua0ePUcxbvveJ_OfRd7Q..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{wave2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 252

v=0
o=root 71619284 71619284 IN IP4 {{wave2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{wave2-publicIP}}
t=0 0
m=audio 19942 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---

[2020-09-29 11:02:41] WARNING[19605]: chan_sip.c:4142 retrans_pkt: Retransmission timeout reached on transmission 43ua0ePUcxbvveJ_OfRd7Q.. for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
Really destroying SIP dialog '43ua0ePUcxbvveJ_OfRd7Q..' Method: INVITE


<--- SIP read from UDP:192.168.115.71:33469 --->
REGISTER sip:172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---8ab3a9fa192fe67c;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
To: <sip:phone1@172.16.5.56;transport=UDP>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 41 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="phone1",realm="asterisk",nonce="7c3f27b2",uri="sip:172.16.5.56;transport=UDP",response="9628b9d9931ed1f93d3120b023bdbec5",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 192.168.115.71:33469 (NAT)
Sending to 192.168.115.71:33469 (NAT)

<--- Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---8ab3a9fa192fe67c;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
To: <sip:phone1@172.16.5.56;transport=UDP>;tag=as6ec73e9f
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 41 REGISTER
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="58b8922e"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' in 32000 ms (Method: REGISTER)


<--- SIP read from UDP:192.168.115.71:33469 --->
REGISTER sip:172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---40febbf4e80eda5c;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
To: <sip:phone1@172.16.5.56;transport=UDP>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 42 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="phone1",realm="asterisk",nonce="58b8922e",uri="sip:172.16.5.56;transport=UDP",response="f999fb9cfc11dc9e1d12a7c8142fd5b6",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 192.168.115.71:33469 (NAT)

Reliably Transmitting (NAT) to 192.168.115.71:33469:
OPTIONS sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP SIP/2.0
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK7f751496;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@{{wave2-publicIP}}>;tag=as0f666246
To: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
Contact: <sip:Unknown@{{wave2-publicIP}}:5060>
Call-ID: 266b92f75c505f2d2c6c1d495c630dd3@{{wave2-publicIP}}:5060
CSeq: 102 OPTIONS
User-Agent: wave2-172.16.5.56
Date: Tue, 29 Sep 2020 01:02:44 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---40febbf4e80eda5c;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
To: <sip:phone1@172.16.5.56;transport=UDP>;tag=as6ec73e9f
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 42 REGISTER
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>;expires=60
Date: Tue, 29 Sep 2020 01:02:44 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' in 32000 ms (Method: REGISTER)


<--- SIP read from UDP:192.168.115.71:33469 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK7f751496;rport=5060;received=172.16.5.56
Contact: <sip:192.168.115.71:33469>
To: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>;tag=57e0c831
From: "Unknown" <sip:Unknown@{{wave2-publicIP}}>;tag=as0f666246
Call-ID: 266b92f75c505f2d2c6c1d495c630dd3@{{wave2-publicIP}}:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '266b92f75c505f2d2c6c1d495c630dd3@{{wave2-publicIP}}:5060' Method: OPTIONS


<--- SIP read from UDP:192.168.115.71:33469 --->


<------------->
Really destroying SIP dialog '0d8c858a09761434-10559@{{sip-providerIP}}' Method: OPTIONS

Reliably Transmitting (NAT) to 172.16.5.58:5060:
OPTIONS sip:172.16.5.58 SIP/2.0
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK0be8ab0b;rport
Max-Forwards: 70
From: "Unknown" <sip:56-user@172.16.5.56>;tag=as43bca20f
To: <sip:172.16.5.58>
Contact: <sip:56-user@172.16.5.56:5060>
Call-ID: 4fe58b6360114c2e7e3ca62273ab69da@172.16.5.56:5060
CSeq: 102 OPTIONS
User-Agent: wave2-172.16.5.56
Date: Tue, 29 Sep 2020 01:03:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---


<--- SIP read from UDP:172.16.5.58:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK0be8ab0b;received=172.16.5.56;rport=1024
From: "Unknown" <sip:56-user@172.16.5.56>;tag=as43bca20f
To: <sip:172.16.5.58>;tag=as4f0ab602
Call-ID: 4fe58b6360114c2e7e3ca62273ab69da@172.16.5.56:5060
CSeq: 102 OPTIONS
Server: FPBX-15.0.16.42(16.13.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:172.16.5.58:5060>
Accept: application/sdp
Content-Length: 0

<------------->
--- (12 headers 0 lines) ---
Really destroying SIP dialog '4fe58b6360114c2e7e3ca62273ab69da@172.16.5.56:5060' Method: OPTIONS

Really destroying SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' Method: REGISTER


<--- SIP read from UDP:192.168.115.71:33469 --->


<------------->


<--- SIP read from UDP:{{sip-providerIP}}:5060 --->
OPTIONS sip:172.16.5.56:5060 SIP/2.0
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bK6ff6.ef1ca4a1000000000000000000000000.0
To: <sip:172.16.5.56:5060>
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-739d
CSeq: 10 OPTIONS
Call-ID: 0d8c858a0976148f-10559@{{sip-providerIP}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks

<------------->
--- (9 headers 0 lines) ---
Sending to {{sip-providerIP}}:5060 (NAT)
Looking for s in from-sip-external (domain 172.16.5.56)

<--- Transmitting (NAT) to {{sip-providerIP}}:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bK6ff6.ef1ca4a1000000000000000000000000.0;received={{sip-providerIP}};rport=5060
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-739d
To: <sip:172.16.5.56:5060>;tag=as6cb20fa3
Call-ID: 0d8c858a0976148f-10559@{{sip-providerIP}}
CSeq: 10 OPTIONS
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:{{wave2-publicIP}}:5060>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '0d8c858a0976148f-10559@{{sip-providerIP}}' in 32000 ms (Method: OPTIONS)

[2020-09-29 11:03:28] NOTICE[19605]: chan_sip.c:15893 sip_reregister:    -- Re-registration for  {{sip-username}}@{{sip-provider-address}}
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to {{sip-providerIP}}:5060:
REGISTER sip:{{sip-provider-address}} SIP/2.0
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK6c433e08;rport
Max-Forwards: 70
From: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=as5684721d
To: <sip:{{sip-username}}@{{sip-provider-address}}>
Call-ID: 403a1c39232ca7e7188f843019691ac9@172.16.5.56
CSeq: 124 REGISTER
Supported: replaces, timer
User-Agent: wave2-172.16.5.56
Authorization: Digest username="{{sip-username}}", realm="{{sip-provider-address}}", algorithm=MD5, uri="sip:{{sip-provider-address}}", nonce="X3KHlV9yh3dbQiowPm5snL8zdPSPlyOj", response="8d3b8c4af44d1fb7fafdad065685af51"
Expires: 120
Contact: <sip:{{sip-username}}@{{wave2-publicIP}}:5060>
Content-Length: 0


---


<--- SIP read from UDP:{{sip-providerIP}}:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK6c433e08;rport=5060;received=172.16.5.56
From: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=as5684721d
To: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=570ca5551bccd786ab60ec07525ce084-bf4c
Call-ID: 403a1c39232ca7e7188f843019691ac9@172.16.5.56
CSeq: 124 REGISTER
WWW-Authenticate: Digest realm="{{sip-provider-address}}", nonce="X3KH/l9yh+Cu/sNOcw8MdMqO6+kHTw6t"
Server: VoIP Networks
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Responding to challenge, registration to domain/host name {{sip-provider-address}}
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to {{sip-providerIP}}:5060:
REGISTER sip:{{sip-provider-address}} SIP/2.0
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK75c88aab;rport
Max-Forwards: 70
From: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=as5684721d
To: <sip:{{sip-username}}@{{sip-provider-address}}>
Call-ID: 403a1c39232ca7e7188f843019691ac9@172.16.5.56
CSeq: 125 REGISTER
Supported: replaces, timer
User-Agent: wave2-172.16.5.56
Authorization: Digest username="{{sip-username}}", realm="{{sip-provider-address}}", algorithm=MD5, uri="sip:{{sip-provider-address}}", nonce="X3KH/l9yh+Cu/sNOcw8MdMqO6+kHTw6t", response="68919ff972009373394e9439c02b0c62"
Expires: 120
Contact: <sip:{{sip-username}}@{{wave2-publicIP}}:5060>
Content-Length: 0


---


<--- SIP read from UDP:{{sip-providerIP}}:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK75c88aab;rport=5060;received=172.16.5.56
From: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=as5684721d
To: <sip:{{sip-username}}@{{sip-provider-address}}>;tag=570ca5551bccd786ab60ec07525ce084-e90e
Call-ID: 403a1c39232ca7e7188f843019691ac9@172.16.5.56
CSeq: 125 REGISTER
Contact: <sip:{{sip-username}}@103.7.72.237:5060>;expires=38, <sip:{{sip-username}}@172.16.5.56:5060>;expires=120;received="sip:{{wave2-publicIP}}:55864"
Server: VoIP Networks
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
[2020-09-29 11:03:28] NOTICE[19605]: chan_sip.c:24961 handle_response_register: Outbound Registration: Expiry for {{sip-provider-address}} is 120 sec (Scheduling reregistration in 105 s)
Really destroying SIP dialog '403a1c39232ca7e7188f843019691ac9@172.16.5.56' Method: REGISTER


<--- SIP read from UDP:192.168.115.71:33469 --->
REGISTER sip:172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---5dc50e7512941316;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
To: <sip:phone1@172.16.5.56;transport=UDP>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 43 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="phone1",realm="asterisk",nonce="58b8922e",uri="sip:172.16.5.56;transport=UDP",response="f999fb9cfc11dc9e1d12a7c8142fd5b6",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 192.168.115.71:33469 (NAT)
Sending to 192.168.115.71:33469 (NAT)

<--- Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---5dc50e7512941316;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
To: <sip:phone1@172.16.5.56;transport=UDP>;tag=as78065b3b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 43 REGISTER
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="14cfde7b"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' in 32000 ms (Method: REGISTER)


<--- SIP read from UDP:192.168.115.71:33469 --->
REGISTER sip:172.16.5.56;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---3f6b3a8f1f924571;rport
Max-Forwards: 70
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
To: <sip:phone1@172.16.5.56;transport=UDP>
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 44 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Authorization: Digest username="phone1",realm="asterisk",nonce="14cfde7b",uri="sip:172.16.5.56;transport=UDP",response="7f16466808852a937c011dcaddbff6d8",algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 192.168.115.71:33469 (NAT)
Reliably Transmitting (NAT) to 192.168.115.71:33469:
OPTIONS sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP SIP/2.0
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK5c0df7fc;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@{{wave2-publicIP}}>;tag=as2dc87c16
To: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>
Contact: <sip:Unknown@{{wave2-publicIP}}:5060>
Call-ID: 2aedf3c20e99543a145cb32a661b0f72@{{wave2-publicIP}}:5060
CSeq: 102 OPTIONS
User-Agent: wave2-172.16.5.56
Date: Tue, 29 Sep 2020 01:03:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

<--- Transmitting (NAT) to 192.168.115.71:33469 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:33469;branch=z9hG4bK-524287-1---3f6b3a8f1f924571;received=192.168.115.71;rport=33469
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=8a57b87b
To: <sip:phone1@172.16.5.56;transport=UDP>;tag=as78065b3b
Call-ID: WlL__0sFl8iXpBOGOjJj1g..
CSeq: 44 REGISTER
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>;expires=60
Date: Tue, 29 Sep 2020 01:03:38 GMT
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' in 32000 ms (Method: REGISTER)


<--- SIP read from UDP:192.168.115.71:33469 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{wave2-publicIP}}:5060;branch=z9hG4bK5c0df7fc;rport=5060;received=172.16.5.56
Contact: <sip:192.168.115.71:33469>
To: <sip:phone1@192.168.115.71:33469;rinstance=f928ffec7ad8da81;transport=UDP>;tag=aced630d
From: "Unknown" <sip:Unknown@{{wave2-publicIP}}>;tag=as2dc87c16
Call-ID: 2aedf3c20e99543a145cb32a661b0f72@{{wave2-publicIP}}:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.4.6 rv2.10.10.2-mod
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Really destroying SIP dialog '2aedf3c20e99543a145cb32a661b0f72@{{wave2-publicIP}}:5060' Method: OPTIONS


<--- SIP read from UDP:192.168.115.71:33469 --->


<------------->

Really destroying SIP dialog '0d8c858a0976148f-10559@{{sip-providerIP}}' Method: OPTIONS
Really destroying SIP dialog 'WlL__0sFl8iXpBOGOjJj1g..' Method: REGISTER

Reliably Transmitting (NAT) to 172.16.5.58:5060:
OPTIONS sip:172.16.5.58 SIP/2.0
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK210e141c;rport
Max-Forwards: 70
From: "Unknown" <sip:56-user@172.16.5.56>;tag=as1aecd5d1
To: <sip:172.16.5.58>
Contact: <sip:56-user@172.16.5.56:5060>
Call-ID: 29835ac65bac2b7a168ac7214bebe50c@172.16.5.56:5060
CSeq: 102 OPTIONS
User-Agent: wave2-172.16.5.56
Date: Tue, 29 Sep 2020 01:04:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---


<--- SIP read from UDP:172.16.5.58:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.5.56:5060;branch=z9hG4bK210e141c;received=172.16.5.56;rport=1024
From: "Unknown" <sip:56-user@172.16.5.56>;tag=as1aecd5d1
To: <sip:172.16.5.58>;tag=as6afaa7e0
Call-ID: 29835ac65bac2b7a168ac7214bebe50c@172.16.5.56:5060
CSeq: 102 OPTIONS
Server: FPBX-15.0.16.42(16.13.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:172.16.5.58:5060>
Accept: application/sdp
Content-Length: 0

<------------->

--- (12 headers 0 lines) ---
Really destroying SIP dialog '29835ac65bac2b7a168ac7214bebe50c@172.16.5.56:5060' Method: OPTIONS


<--- SIP read from UDP:{{sip-providerIP}}:5060 --->
OPTIONS sip:172.16.5.56:5060 SIP/2.0
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bK16a9.82c53617000000000000000000000000.0
To: <sip:172.16.5.56:5060>
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-42be
CSeq: 10 OPTIONS
Call-ID: 0d8c858a097614ea-10559@{{sip-providerIP}}
Max-Forwards: 70
Content-Length: 0
User-Agent: VoIP Networks

<------------->
--- (9 headers 0 lines) ---
Sending to {{sip-providerIP}}:5060 (NAT)
Looking for s in from-sip-external (domain 172.16.5.56)

<--- Transmitting (NAT) to {{sip-providerIP}}:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP {{sip-providerIP}};branch=z9hG4bK16a9.82c53617000000000000000000000000.0;received={{sip-providerIP}};rport=5060
From: <sip:{{sip-provider}}>;tag=47546faa90a5df61ca65b19e3b051eb0-42be
To: <sip:172.16.5.56:5060>;tag=as167f67ab
Call-ID: 0d8c858a097614ea-10559@{{sip-providerIP}}
CSeq: 10 OPTIONS
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:{{wave2-publicIP}}:5060>
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '0d8c858a097614ea-10559@{{sip-providerIP}}' in 32000 ms (Method: OPTIONS)


<--- SIP read from UDP:192.168.115.71:33469 --->

I haven’t looked at this in detail, but it seems to be showing common misconceptions about chan_sip’s type parameter. To simplify the problem I would:

Remove username and fromuser parameters.

Collapse the -user sections into the corresponding -peer sections, removing the type=user, entirely.

Replace all type=friend lines with type=peer ones.

If it is still broken after that, at least we will have removed a lot of unnecessary complexity.

Also, please note that, if this is a new installation, you should be using chan_pjsip, as support for chan_sip is limited, and bugs will take a long time to fix or may not get fixed at all.

The sip.conf you have provided is incomplete. Although some of sip.nat.conf is being honoured, that could only happen if it had been included from sip.conf, but I can see no such include, so I assume that you have missed out the part of sip.conf that includes the include.

You don’t seem to have said where the laptop is in relation to the other servers, in network terms.

The unauthorised response to the laptop is treating it as being local, but the subsequent authorised request is being treated as NATted, and seems to be failing as the laptop seems unable to send an ACK to the public address. I don’t understand why the NAT treatment is different.

nat=yes is deprecated in favour of using the specific NAT workaround options that you need.

Both server2 and SBC are in a data centre while my laptop is in another location physically. However, both server2 and SBC can be accessed by SSH from the laptop.

I have made the changes to the sip.conf file, deleted sip_nat.conf and here is the full content:

server2 (172.16.5.56)

accept_outofcall_message=yes
auth_message_requests=no
outofcall_message_context=dpma_message_context
faxdetect=no
vmexten=*97
useragent=wave2-172.16.5.56
language=en
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g726
allow=g722
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
limitonpeers=yes
rtpend=20000
context=from-sip-external
callerid=Unknown
rtpstart=19900
tcpenable=no
callevents=yes
jbenable=no
checkmwi=10
maxexpiry=3600
minexpiry=60
srvlookup=no
tlsenable=no
allowguest=yes
notifyhold=yes
rtptimeout=30
canreinvite=no
tlsbindaddr=[::]:5061
rtpkeepalive=0
videosupport=no
defaultexpiry=120
notifyringing=yes
maxcallbitrate=384
rtpholdtimeout=300
g726nonstandard=no
registertimeout=20
tlsclientmethod=tlsv1
registerattempts=0
nat=force_rport,comedia
ALLOW_SIP_ANON=no
udpbindaddr=0.0.0.0:5060
tlscafile=/etc/pki/tls/certs/ca-bundle.crt
externip={{server2-publicIP}}
localnet=172.16.5.0/16
accept_outofcall_message=yes
auth_message_requests=no
outofcall_message_context=dpma_message_context

; Outgoing Settings
[58-peer]
host=172.16.5.58
type=peer
qualify=yes
context=from-trunk

[phone1]
;type=friend
type=peer
context=asterisk
host=dynamic
secret=xxx
disallow=all
allow=ulaw
callcounter=yes
qualify=yes

Output of sip show peers

server2

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
58-peer                   172.16.5.58                                 Yes        Yes            5060     OK (1 ms)                                    
phone1/phone1             192.168.115.71                           D  Yes        Yes            55823    OK (8 ms)  

SBC

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
1001                      (Unspecified)                            D  No         No          A  0        UNKNOWN                                      
56-peer/58-user           172.16.5.56                                 Yes        Yes            5060     UNREACHABLE   

Not sure why it is now unreachable. I can SSH into server2 from SBC.

Anyhow, I called 1000 again. Still no sound:

<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.115.71:55823 (NAT)
Using INVITE request as basis request - qQ9PNfpb14BehCGHsm7PYw..
Found peer 'phone1' for 'phone1' from 192.168.115.71:55823
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Got SDP version 1 and unique parts [Z 1601450115572 IN IP4 192.168.115.71]
Found RTP audio format 106
Found RTP audio format 9
Found RTP audio format 98
Found RTP audio format 101
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found audio description format opus for ID 106
Found unknown media description format telephone-event for ID 98
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(ulaw|gsm|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
       > 0x7feb20021350 -- Strict RTP learning after remote address set to: 192.168.115.71:8000
Peer audio RTP is at port 192.168.115.71:8000
Looking for 1000 in asterisk (domain 172.16.5.56)
sip_route_dump: route/path hop: <sip:phone1@192.168.115.71:55823;transport=UDP>

<--- Transmitting (NAT) to 192.168.115.71:55823 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.115.71:55823;branch=z9hG4bK-524287-1---b222c6390a1bcab8;received=192.168.115.71;rport=55823
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=23b20369
To: <sip:1000@172.16.5.56>
Call-ID: qQ9PNfpb14BehCGHsm7PYw..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{server2-publicIP}}:5060>
Content-Length: 0


<------------>
    -- Executing [1000@asterisk:1] Answer("SIP/phone1-00000001", "") in new stack
Audio is at 19982
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 192.168.115.71:55823 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:55823;branch=z9hG4bK-524287-1---b222c6390a1bcab8;received=192.168.115.71;rport=55823
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=23b20369
To: <sip:1000@172.16.5.56>;tag=as7a69b852
Call-ID: qQ9PNfpb14BehCGHsm7PYw..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{server2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 256

v=0
o=root 1976239274 1976239274 IN IP4 {{server2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{server2-publicIP}}
t=0 0
m=audio 19982 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>
Retransmitting #1 (NAT) to 192.168.115.71:55823:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.115.71:55823;branch=z9hG4bK-524287-1---b222c6390a1bcab8;received=192.168.115.71;rport=55823
From: <sip:phone1@172.16.5.56;transport=UDP>;tag=23b20369
To: <sip:1000@172.16.5.56>;tag=as7a69b852
Call-ID: qQ9PNfpb14BehCGHsm7PYw..
CSeq: 2 INVITE
Server: wave2-172.16.5.56
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:1000@{{server2-publicIP}}:5060>
Content-Type: application/sdp
Content-Length: 256

v=0
o=root 1976239274 1976239274 IN IP4 {{server2-publicIP}}
s=Asterisk PBX 16.13.0
c=IN IP4 {{server2-publicIP}}
t=0 0
m=audio 19982 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

I’ll try to migrate to pjsip but not at the moment due to business choice.

192.168.115.0/255.255.255.0 needs to be added to your list of localnets, as it is definitely not a public address, but it is being treated as such. (Adjust the sub-net mask and retained RHS bits, appropriately. 192.168.0.0/255.255.0.0 may be sufficient, even if you don’t use the full range.

Also note that localnet=172.16.5.0/16 is malformed. Assuming Asterisk supports this way of giving the netmask, it should be 172.16.0.0/16 or 172.16.5.0/24. Different implementation of netmasks behave differently. I’m not sure which Asterisk uses, but some simply do ((address & mask) == pattern_address) which would result in comparing 172.16.5.0 with 172.168.0.0. As such, it is advisable not to provide any set bits which are not in the network part.

Hey that worked. I added localnet=192.168.0.0/16 and changed localnet=172.16.5.0/16 to localnet=172.16.0.0/16. I am able to hear a sound reply!