No audio between extensions via VPN

Good afternoon,

I have an ipsec site to site vpn that i have tested with a grandstream ucm6302 and voice is coming fine between two remote extensions, 42 and 52 which are both on the remote side.

Trying to achieve the same via FreePBX, i have added two pjsip extensions, added local networks on the sip section and turned direct dial off for both extensions.
Call comes through extensions ring but no audio on either phones.

Phone 52 is zoiper installed on PC and 42 on Wave Lite on an iPhone.

Stating again that both setups work on the grandstream pbx so it seems that i am doing something wrong on the FreePBX side.

192.168.0.0/24 network FreePBX side
192.168.5.0/24 remote subnet that has both phones

Any help will be appreciated

pjsip log test call

<— Received SIP request (1219 bytes) from UDP:192.168.0.254:53777 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—f76c8e621bba448d; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=066c5600
Call-ID: pfnC592_Z6U17opqvtcv_g…
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Allow-Events: presence, kpml, talk
Content-Length: 579

v=0
o=Z 0 902584792 IN IP4 192.168.5.252
s=Z
c=IN IP4 192.168.5.252
t=0 0
m=audio 59639 RTP/AVP 106 9 3 111 0 8 97 110 112 98 101 100 99 102
a=rtpmap:106 opus/48000/2
a=fmtp:106 minptime=20; useinbandfec=1
a=rtpmap:111 speex/16000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:110 speex/8000
a=rtpmap:112 speex/32000
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:100 telephone-event/16000
a=fmtp:100 0-16
a=rtpmap:99 telephone-event/32000
a=fmtp:99 0-16
a=rtpmap:102 G726-32/8000
a=sendrecv

<— Transmitting SIP response (501 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—f76c8e621bba448d
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=z9hG4bK-524287-1—f76c8e621bba448d
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1677498861/67ff527ecc1827a6cdcc c42a62edb54a”,opaque=“770def7b6817ef63”,algorithm=md5,qop=“auth”
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP request (344 bytes) from UDP:192.168.0.254:53777 —>
ACK sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—f76c8e621bba448d; rport
Max-Forwards: 70
To: sip:[email protected];tag=z9hG4bK-524287-1—f76c8e621bba448d
From: sip:[email protected];transport=UDP;tag=066c5600
Call-ID: pfnC592_Z6U17opqvtcv_g…
CSeq: 1 ACK
Content-Length: 0

<— Received SIP request (1512 bytes) from UDP:192.168.0.254:53777 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—0e18cd45423d6119; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=066c5600
Call-ID: pfnC592_Z6U17opqvtcv_g…
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“52”,realm=“asterisk”,nonce=“1677498861/67ff527ec c1827a6cdccc42a62edb54a",uri="sip:[email protected];transport=UDP”,response=“79ad5 a58060d8acefd67a64481659c4d”,cnonce=“7ed4c298c8f023a100568dc6d3c9ffd2”,nc=000000 01,qop=auth,algorithm=md5,opaque=“770def7b6817ef63”
Allow-Events: presence, kpml, talk
Content-Length: 579

v=0
o=Z 0 902584792 IN IP4 192.168.5.252
s=Z
c=IN IP4 192.168.5.252
t=0 0
m=audio 59639 RTP/AVP 106 9 3 111 0 8 97 110 112 98 101 100 99 102
a=rtpmap:106 opus/48000/2
a=fmtp:106 minptime=20; useinbandfec=1
a=rtpmap:111 speex/16000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:110 speex/8000
a=rtpmap:112 speex/32000
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:100 telephone-event/16000
a=fmtp:100 0-16
a=rtpmap:99 telephone-event/32000
a=fmtp:99 0-16
a=rtpmap:102 G726-32/8000
a=sendrecv

<— Transmitting SIP response (309 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—0e18cd45423d6119
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected]
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP response (868 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—0e18cd45423d6119
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Contact: sip:192.168.0.61:5060
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 329

v=0
o=- 0 902584794 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 10280 RTP/AVP 0 8 3 102 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
[2023-02-27 11:54:21] WARNING[4201][C-00000002]: chan_sip.c:23279 func_header_re ad: This function can only be used on SIP channels.
<— Transmitting SIP response (917 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—0e18cd45423d6119
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 329

v=0
o=- 0 902584794 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 10280 RTP/AVP 0 8 3 102 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1052 bytes) to UDP:192.168.0.254:59631 —>
INVITE sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPj696030f5-0346-4a51-8527 -1fde24b5bcc9
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10327 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: “52” sip:[email protected]
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Type: application/sdp
Content-Length: 339

v=0
o=- 1572467770 1572467770 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 17200 RTP/AVP 0 8 3 111 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (477 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj696030f5-0346-4a51 -8527-1fde24b5bcc9
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected]
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10327 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Received SIP response (565 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj696030f5-0346-4a51 -8527-1fde24b5bcc9
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected];tag=1009043529
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10327 INVITE
Contact: sip:[email protected]:59631
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Transmitting SIP response (917 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—0e18cd45423d6119
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 329

v=0
o=- 0 902584794 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 10280 RTP/AVP 0 8 3 102 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (893 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj696030f5-0346-4a51 -8527-1fde24b5bcc9
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected];tag=1009043529
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10327 INVITE
Contact: sip:[email protected]:59631
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Session-Expires: 1800;refresher=uac
Require: timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Type: application/sdp
Content-Length: 271

v=0
o=42 8000 8000 IN IP4 192.168.5.181
s=SIP Call
c=IN IP4 192.168.5.181
t=0 0
m=audio 10926 RTP/AVP 0 8 101
a=sendrecv
a=rtcp:10927 IN IP4 192.168.5.181
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<— Transmitting SIP request (392 bytes) to UDP:192.168.0.254:59631 —>
ACK sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPj12e7d231-6762-455a-b7c0 -2fbf91191f4d
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected];tag=1009043529
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10327 ACK
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP response (951 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—0e18cd45423d6119
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
Supported: 100rel, timer, replaces, norefersub
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 329

v=0
o=- 0 902584794 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 10280 RTP/AVP 0 8 3 102 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP request (405 bytes) from UDP:192.168.0.254:53777 —>
ACK sip:192.168.0.61:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—468937965bab1a46; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
From: sip:[email protected];tag=066c5600
Call-ID: pfnC592_Z6U17opqvtcv_g…
CSeq: 2 ACK
User-Agent: Z 5.5.14 v2.10.18.6
Content-Length: 0

<— Received SIP request (686 bytes) from UDP:192.168.0.254:53777 —>
BYE sip:192.168.0.61:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—a41282a4b4966dfc; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
From: sip:[email protected];tag=066c5600
Call-ID: pfnC592_Z6U17opqvtcv_g…
CSeq: 3 BYE
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“52”,realm=“asterisk”,nonce=“1677498861/67ff527ec c1827a6cdccc42a62edb54a”,uri=“sip:192.168.0.61:5060”,response=“cff21a069ec634c01 98f03037be2b7a4”,cnonce=“5892c9a556be44dad80a0f5b7793dd73”,nc=00000002,qop=auth, algorithm=md5,opaque=“770def7b6817ef63”
Content-Length: 0

<— Transmitting SIP response (343 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—a41282a4b4966dfc
Call-ID: pfnC592_Z6U17opqvtcv_g…
From: sip:[email protected];tag=066c5600
To: sip:[email protected];tag=94b7a589-ad4b-4c01-b1df-e6aac2d15457
CSeq: 3 BYE
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP request (416 bytes) to UDP:192.168.0.254:59631 —>
BYE sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPjf013c839-efc8-4077-9f1a -371d551b153b
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected];tag=1009043529
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10328 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP response (531 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPjf013c839-efc8-4077 -9f1a-371d551b153b
From: “52” sip:[email protected];tag=bca89e02-6a88-4709-bc79-ba86b38832b1
To: sip:[email protected];tag=1009043529
Call-ID: 3280b3eb-ef0a-4997-956a-18f7c5070131
CSeq: 10328 BYE
Contact: sip:[email protected]:59631
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Received SIP request (952 bytes) from UDP:192.168.0.254:53777 —>
REGISTER sip:192.168.0.61;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—98976a5909e55762; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP;rinstance=7bf5dd913fd73655
To: sip:[email protected];transport=UDP
From: sip:[email protected];transport=UDP;tag=1939fd64
Call-ID: SqlQYudiIPxr_jXUEi-qvQ…
CSeq: 5 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“52”,realm=“asterisk”,nonce=“1677498843/0fc77bf14 8d9e963c14a8b760accb775”,uri=“sip:192.168.0.61;transport=UDP”,response=“16036c3b e33ce8f5ca934f046b7154b2”,cnonce=“48892b2ea440e43b52c607acc070efa9”,nc=00000002, qop=auth,algorithm=md5,opaque=“1be25dbf536b4766”
Allow-Events: presence, kpml, talk
Content-Length: 0

<— Transmitting SIP response (514 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—98976a5909e55762
Call-ID: SqlQYudiIPxr_jXUEi-qvQ…
From: sip:[email protected];tag=1939fd64
To: sip:[email protected];tag=z9hG4bK-524287-1—98976a5909e55762
CSeq: 5 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1677498896/3f62f9e43ae26380cc07 ae01ebb31227”,opaque=“718b366508fc098d”,stale=true,algorithm=md5,qop=“auth”
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP request (952 bytes) from UDP:192.168.0.254:53777 —>
REGISTER sip:192.168.0.61;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:53777;branch=z9hG4bK-524287-1—714cb538873b5163; rport
Max-Forwards: 70
Contact: sip:[email protected]:53777;transport=UDP;rinstance=7bf5dd913fd73655
To: sip:[email protected];transport=UDP
From: sip:[email protected];transport=UDP;tag=1939fd64
Call-ID: SqlQYudiIPxr_jXUEi-qvQ…
CSeq: 6 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“52”,realm=“asterisk”,nonce=“1677498896/3f62f9e43 ae26380cc07ae01ebb31227”,uri=“sip:192.168.0.61;transport=UDP”,response=“5c78480b 425691d10e8d58e1b0b9ec8d”,cnonce=“3421663cca2d3a9f3f61c118a5887b1c”,nc=00000001, qop=auth,algorithm=md5,opaque=“718b366508fc098d”
Allow-Events: presence, kpml, talk
Content-Length: 0

<— Transmitting SIP response (474 bytes) to UDP:192.168.0.254:53777 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.252:53777;rport=53777;received=192.168.0.254;branch=z 9hG4bK-524287-1—714cb538873b5163
Call-ID: SqlQYudiIPxr_jXUEi-qvQ…
From: sip:[email protected];tag=1939fd64
To: sip:[email protected];tag=z9hG4bK-524287-1—714cb538873b5163
CSeq: 6 REGISTER
Date: Mon, 27 Feb 2023 11:54:56 GMT
Contact: sip:[email protected]:53777;rinstance=7bf5dd913fd73655;expires=59
Expires: 60
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP request (417 bytes) to UDP:192.168.0.254:59631 —>
OPTIONS sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPjb40ffb6b-cec6-409f-abfa -927717afc89a
From: sip:[email protected];tag=dd6586be-cb78-403f-9f17-f3a668c565db
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 6e231771-121b-4b89-81e6-aad258ffc047
CSeq: 65406 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP response (484 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPjb40ffb6b-cec6-409f -abfa-927717afc89a
From: sip:[email protected];tag=dd6586be-cb78-403f-9f17-f3a668c565db
To: sip:[email protected];tag=1261299051
Call-ID: 6e231771-121b-4b89-81e6-aad258ffc047
CSeq: 65406 OPTIONS
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Transmitting SIP request (470 bytes) to UDP:192.168.0.254:53777 —>
OPTIONS sip:[email protected]:53777;rinstance=7bf5dd913fd73655 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPjc06b91ba-96d6-4084-83c0-75be6bb89439
From: sip:[email protected];tag=2ba86c79-194d-44b2-91b8-64e55f63d9a5
To: sip:[email protected];rinstance=7bf5dd913fd73655
Contact: sip:[email protected]:5060
Call-ID: 65927b82-38bb-4aef-8d60-e81f41cb4d2c
CSeq: 7330 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP response (685 bytes) from UDP:192.168.0.254:53777 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPjc06b91ba-96d6-4084-83c0-75be6bb89439
Contact: sip:192.168.5.252:53777
To: sip:[email protected];rinstance=7bf5dd913fd73655;tag=e7476e7f
From: sip:[email protected];tag=2ba86c79-194d-44b2-91b8-64e55f63d9a5
Call-ID: 65927b82-38bb-4aef-8d60-e81f41cb4d2c
CSeq: 7330 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.5.14 v2.10.18.6
Allow-Events: presence, kpml, talk
Content-Length: 0

Check that you have entered the remote subnet as a local network in SIP settings

I have done that in the form of

192.168.5.0/255.255.255.0

Restarted the asterisk service fwconsole restart
Also rebooted the system shutdown -r now

Problem persists

You should try to make g711u the primary codec on Zopier. It is sending every codec to FreePBX but that one and that is the codec the endpoint on FreePBX is trying to use. Sounds like a transcoding issue

Zoiper needs the extension to be set up as NAT when used through VPN, at least in my experience. Modify the extension on FreePBX and try again.

Why? That is part of the reason of the VPN…to avoid NAT.

In my experience, it is needed so the correct IPs are set in the headers, thus avoiding no-audio issues.

I removed the zoiper codecs and left only g711u, and g711a, g711u primary. However i am still not getting any audio.

Tried calling *43 from the zoiper extension and it disconnects me with a log message disconnected after 31 due to lack of RTP.

PJSIP Logging enabled
<— Received SIP request (814 bytes) from UDP:192.168.0.254:60377 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:60377;branch=z9hG4bK-524287-1—0f4f8f87e5863ca7; rport
Max-Forwards: 70
Contact: sip:[email protected]:60377;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=d250db6f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Allow-Events: presence, kpml, talk
Content-Length: 174

v=0
o=Z 0 911408238 IN IP4 192.168.5.252
s=Z
c=IN IP4 192.168.5.252
t=0 0
m=audio 63382 RTP/AVP 0 101 8
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<— Transmitting SIP response (501 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—0f4f8f87e5863ca7
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected];tag=z9hG4bK-524287-1—0f4f8f87e5863ca7
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1677507685/c6a0a7d313a381e946fb 9a191a5738b0”,opaque=“5ba058703b83e74f”,algorithm=md5,qop=“auth”
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP request (344 bytes) from UDP:192.168.0.254:60377 —>
ACK sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:60377;branch=z9hG4bK-524287-1—0f4f8f87e5863ca7; rport
Max-Forwards: 70
To: sip:[email protected];tag=z9hG4bK-524287-1—0f4f8f87e5863ca7
From: sip:[email protected];transport=UDP;tag=d250db6f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 1 ACK
Content-Length: 0

<— Received SIP request (1107 bytes) from UDP:192.168.0.254:60377 —>
INVITE sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:60377;branch=z9hG4bK-524287-1—052859a840b4e20f; rport
Max-Forwards: 70
Contact: sip:[email protected]:60377;transport=UDP
To: sip:[email protected]
From: sip:[email protected];transport=UDP;tag=d250db6f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIB E
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco- serviceuri
User-Agent: Z 5.5.14 v2.10.18.6
Authorization: Digest username=“52”,realm=“asterisk”,nonce=“1677507685/c6a0a7d31 3a381e946fb9a191a5738b0",uri="sip:[email protected];transport=UDP”,response=“ecc2c 6ebe67f118821ed597fd499ece5”,cnonce=“a9c96ea719b305da124d58833850f39f”,nc=000000 01,qop=auth,algorithm=md5,opaque=“5ba058703b83e74f”
Allow-Events: presence, kpml, talk
Content-Length: 174

v=0
o=Z 0 911408238 IN IP4 192.168.5.252
s=Z
c=IN IP4 192.168.5.252
t=0 0
m=audio 63382 RTP/AVP 0 101 8
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<— Transmitting SIP response (309 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—052859a840b4e20f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected]
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP response (790 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—052859a840b4e20f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Contact: sip:192.168.0.61:5060
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Content-Type: application/sdp
Content-Length: 251

v=0
o=- 0 911408240 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 11726 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
[2023-02-27 14:21:25] WARNING[28977][C-00000006]: chan_sip.c:23279 func_header_r ead: This function can only be used on SIP channels.
<— Transmitting SIP response (839 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—052859a840b4e20f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 251

v=0
o=- 0 911408240 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 11726 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Transmitting SIP request (1049 bytes) to UDP:192.168.0.254:59631 —>
INVITE sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPj0c05da48-472f-44f9-bc9c -7490b5fd2c19
From: “52” sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
To: sip:[email protected]
Contact: sip:[email protected]:5060
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8419 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: “52” sip:[email protected]
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Type: application/sdp
Content-Length: 337

v=0
o=- 946328727 946328727 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 18774 RTP/AVP 0 8 3 111 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (476 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj0c05da48-472f-44f9 -bc9c-7490b5fd2c19
From: “52” sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
To: sip:[email protected]
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8419 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Received SIP response (564 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj0c05da48-472f-44f9 -bc9c-7490b5fd2c19
From: “52” sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
To: sip:[email protected];tag=1833796644
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8419 INVITE
Contact: sip:[email protected]:59631
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Transmitting SIP response (839 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—052859a840b4e20f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 251

v=0
o=- 0 911408240 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 11726 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP response (892 bytes) from UDP:192.168.0.254:59631 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj0c05da48-472f-44f9 -bc9c-7490b5fd2c19
From: “52” sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
To: sip:[email protected];tag=1833796644
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8419 INVITE
Contact: sip:[email protected]:59631
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Session-Expires: 1800;refresher=uac
Require: timer
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Type: application/sdp
Content-Length: 271

v=0
o=42 8000 8000 IN IP4 192.168.5.181
s=SIP Call
c=IN IP4 192.168.5.181
t=0 0
m=audio 50546 RTP/AVP 0 8 101
a=sendrecv
a=rtcp:50547 IN IP4 192.168.5.181
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<— Transmitting SIP request (391 bytes) to UDP:192.168.0.254:59631 —>
ACK sip:[email protected]:59631 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPj0c8bbbb3-9fc8-4203-80df -3d3a4c766738
From: “52” sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
To: sip:[email protected];tag=1833796644
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8419 ACK
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP response (873 bytes) to UDP:192.168.0.254:60377 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.252:60377;rport=60377;received=192.168.0.254;branch=z 9hG4bK-524287-1—052859a840b4e20f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
From: sip:[email protected];tag=d250db6f
To: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
CSeq: 2 INVITE
Server: FPBX-15.0.29(16.24.1)
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NO TIFY, PUBLISH, MESSAGE, REFER
Contact: sip:192.168.0.61:5060
Supported: 100rel, timer, replaces, norefersub
P-Asserted-Identity: “42” sip:[email protected]
Content-Type: application/sdp
Content-Length: 251

v=0
o=- 0 911408240 IN IP4 192.168.0.61
s=Asterisk
c=IN IP4 192.168.0.61
t=0 0
m=audio 11726 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<— Received SIP request (405 bytes) from UDP:192.168.0.254:60377 —>
ACK sip:192.168.0.61:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.252:60377;branch=z9hG4bK-524287-1—a771e09b6fb217b3; rport
Max-Forwards: 70
Contact: sip:[email protected]:60377;transport=UDP
To: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
From: sip:[email protected];tag=d250db6f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 2 ACK
User-Agent: Z 5.5.14 v2.10.18.6
Content-Length: 0

<— Received SIP request (538 bytes) from UDP:192.168.0.254:59631 —>
BYE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.181:59631;branch=z9hG4bK27148186;rport
From: sip:[email protected];tag=1833796644
To: sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
CSeq: 8420 BYE
Contact: sip:[email protected]:59631
Max-Forwards: 70
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.2.14
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE , MESSAGE
Content-Length: 0

<— Transmitting SIP response (341 bytes) to UDP:192.168.0.254:59631 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.181:59631;rport=59631;received=192.168.0.254;branch=z 9hG4bK27148186
Call-ID: 12117772-ab3c-4538-a0de-9f9d586e91cd
From: sip:[email protected];tag=1833796644
To: sip:[email protected];tag=e248ab9b-5c9c-40f0-84ef-0bde552f36ec
CSeq: 8420 BYE
Server: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Transmitting SIP request (395 bytes) to UDP:192.168.0.254:60377 —>
BYE sip:[email protected]:60377 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.61:5060;rport;branch=z9hG4bKPj3a187dda-6bff-4cc1-90d2 -2789a9c70717
From: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
To: sip:[email protected];tag=d250db6f
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 4377 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: FPBX-15.0.29(16.24.1)
Content-Length: 0

<— Received SIP response (384 bytes) from UDP:192.168.0.254:60377 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.61:5060;rport=5060;branch=z9hG4bKPj3a187dda-6bff-4cc1 -90d2-2789a9c70717
Contact: sip:[email protected]:60377;transport=UDP
To: sip:[email protected];tag=d250db6f
From: sip:[email protected];tag=ed3cf4b0-2d0f-4e55-a473-4ed6afa87fb4
Call-ID: sQyTgLEMd4rbrvONwiSLaA…
CSeq: 4377 BYE
User-Agent: Z 5.5.14 v2.10.18.6
Content-Length: 0

freepbx*CLI> pjsip set logger off

Meaning that i have to change it to chan_sip and set NAT to yes and use 5160?

If that is the case i have already tried this also it doesn’t help.

You don’t need to change anything regarding the sip channel, either chan_sip or pjsip, apart from adding the remote subnet as a local network. Just set the particular remote extension to use NAT.

Can you give me a pointer on how to do that please??

I don’t recall exactly from memory, but you should be able to edit the extension from the extensions module and set it to use NAT.

Can’t see anything apart from having it as Chan sip which shows a NAT option which is default on yes
Pjsip doesn’t have an option however I read that three options are required for NAT, RTP symmetric rewrite contact and force rport which are default to yes anyhow for pjsip channel.

The problem was with the NAT settings on the MikroTik VPN. There was a fixed entry dstnat that was pointing ports 10000-20000 to the ip of the previous PABX.
Removed the entry and RTP packets flowed normally.

Thank you everyone for your time

I’d agree with BlazeSudios: if you need to declare a VPN connection as NAT, something is wrong. VPNs should be indistinguishable from local networks.

I would agree too, but in my experience, at least using Zoiper on Android, that is the only way it will work.

From a purely technical standpoint, I agree. But in the real world, you often have different departments managing the network infrastructure, so (for example) you have a VPN server in a different box from the main router/firewall. I suspect that this is the case for the OP, because INVITE from 192.168.5.252 appeared to come from 192.168.0.254; i.e. his VPN is doing NAT.

Now, if the purpose of the VPN is to allow devices in branch offices to access resources in headquarters, but the reverse is not required, the NAT setup is preferable, otherwise every resource accessed from branches would need to be configured with two gateways, probably manually.

Asterisk works fine with endpoints behind NAT, which is the situation with all non-VPN remote extensions (and all extensions on a cloud PBX).

OTOH, if 192.168.0.254 is his main router/firewall, then IMO it would be better to configure the VPN without NAT. That way, he could (for example) ping remote phones, access their web interfaces, etc.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.