Asterisk and Softphones on different private networks (No Voice)

Hello All,

I have been experimenting with Asterisk for a while now. I have a working Asterisk configured on a Virtualbox (Bridged Network) and I have multiple endpoints connected to Asterisk through wireless router (both the host machine and endpoints are on the same wireless network).

This configuration was working fine but recently I have decided to install Asterisk on a dedicated physical server to spice things up a little :slight_smile: The new server is connected to the same switch as Wireless Router. and has the IP address: 192.168.1.34 (Please see the diagram below). Endpoints are still on the wireless subnet and their IPs range from 10.0.0.35 - 10.0.0.39. They are connected to Asterisk using the address 192.168.1.34. Although the the SIP signaling is working fine with the new config (Please see the SIP trace below). I can’t hear any voice after I pick up the call. A few things to note, I’m not using a SIP trunk nor am I trying to connect to the internet/public network. All I want is to have a bunch of local softphones that can make phone calls to each other.

I’m using PJSIP and I have tried different combinations of rewrite_contact, force_rport, rtp_symmetric configs but It didn’t solve the issue. I have done some research and I believe I need to make some changes to my rtp.conf as well but not sure what those changes are, currently I’m using out of the box configuration for rtp.conf. I was wondering if someone could help me with this issue.

Thanks,
Kaan

<--- Received SIP request (815 bytes) from UDP:192.168.1.33:64150 --->
INVITE sip:101@192.168.1.34:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:64150;branch=z9hG4bK-524287-1---aa41cbe97bfd7181;rport
Max-Forwards: 70
Contact: <sip:102@192.168.1.33:64150;transport=UDP>
To: <sip:101@192.168.1.34:5060>
From: "102"<sip:102@192.168.1.34:5060;transport=UDP>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper v2.10.16.0
Allow-Events: presence, kpml, talk
Content-Length: 247

v=0
o=Z 60212462 1 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 57784 RTP/AVP 3 101 110 97 8 0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=sendrecv

<--- Transmitting SIP response (505 bytes) to UDP:192.168.1.33:64150 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.33:64150;rport=64150;received=192.168.1.33;branch=z9hG4bK-524287-1---aa41cbe97bfd7181
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
To: <sip:101@192.168.1.34>;tag=z9hG4bK-524287-1---aa41cbe97bfd7181
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1637321448/f3a36e342660085e0fd7d9e0673c23ff",opaque="19ce20081653951d",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.8.0
Content-Length:  0


<--- Received SIP request (361 bytes) from UDP:192.168.1.33:64150 --->
ACK sip:101@192.168.1.34:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:64150;branch=z9hG4bK-524287-1---aa41cbe97bfd7181;rport
Max-Forwards: 70
To: <sip:101@192.168.1.34>;tag=z9hG4bK-524287-1---aa41cbe97bfd7181
From: "102"<sip:102@192.168.1.34:5060;transport=UDP>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1115 bytes) from UDP:192.168.1.33:64150 --->
INVITE sip:101@192.168.1.34:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:64150;branch=z9hG4bK-524287-1---f37150ff6f9feba8;rport
Max-Forwards: 70
Contact: <sip:102@192.168.1.33:64150;transport=UDP>
To: <sip:101@192.168.1.34:5060>
From: "102"<sip:102@192.168.1.34:5060;transport=UDP>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper v2.10.16.0
Authorization: Digest username="102",realm="asterisk",nonce="1637321448/f3a36e342660085e0fd7d9e0673c23ff",uri="sip:101@192.168.1.34:5060;transport=UDP",response="b4601d921f4edbecb0bf814a612dd5b2",cnonce="3be05850bff930bd82a6c58fed264fe9",nc=00000001,qop=auth,algorithm=md5,opaque="19ce20081653951d"
Allow-Events: presence, kpml, talk
Content-Length: 247

v=0
o=Z 60212462 1 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 57784 RTP/AVP 3 101 110 97 8 0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=sendrecv

<--- Transmitting SIP response (313 bytes) to UDP:192.168.1.33:64150 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.33:64150;rport=64150;received=192.168.1.33;branch=z9hG4bK-524287-1---f37150ff6f9feba8
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
To: <sip:101@192.168.1.34>
CSeq: 2 INVITE
Server: Asterisk PBX 18.8.0
Content-Length:  0


    -- Executing [101@testing:1] NoOp("PJSIP/102-00000004", "") in new stack
    -- Executing [101@testing:2] Dial("PJSIP/102-00000004", "PJSIP/101") in new stack
    -- Called PJSIP/101
<--- Transmitting SIP request (949 bytes) to UDP:192.168.1.33:41292 --->
INVITE sip:101@192.168.1.33:41292;rinstance=bc832549eb04f9dd SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj2aaa9ede-e495-431e-ad8c-2562e32e625d
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>
Contact: <sip:asterisk@192.168.1.34:5060>
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13938 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Type: application/sdp
Content-Length:   231

v=0
o=- 9787957 9787957 IN IP4 192.168.1.34
s=Asterisk
c=IN IP4 192.168.1.34
t=0 0
m=audio 17536 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

<--- Received SIP response (340 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj2aaa9ede-e495-431e-ad8c-2562e32e625d
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13938 INVITE
Content-Length: 0


<--- Received SIP response (544 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj2aaa9ede-e495-431e-ad8c-2562e32e625d
Contact: <sip:101@192.168.1.33:41292>
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13938 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.5.8 v2.10.17.2
Allow-Events: presence, kpml, talk
Content-Length: 0


    -- PJSIP/101-00000005 is ringing
<--- Transmitting SIP response (500 bytes) to UDP:192.168.1.33:64150 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.33:64150;rport=64150;received=192.168.1.33;branch=z9hG4bK-524287-1---f37150ff6f9feba8
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
To: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
CSeq: 2 INVITE
Server: Asterisk PBX 18.8.0
Contact: <sip:192.168.1.34:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length:  0


<--- Received SIP response (946 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj2aaa9ede-e495-431e-ad8c-2562e32e625d
Require: timer
Contact: <sip:101@192.168.1.33:41292>
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13938 INVITE
Session-Expires: 1800;refresher=uac
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.5.8 v2.10.17.2
Allow-Events: presence, kpml, talk
Content-Length: 321

v=0
o=Z 0 1 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 47346 RTP/AVP 0 106 9 8 3 101 98
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=sendrecv

       > 0x7f0f90046d40 -- Strict RTP learning after remote address set to: 192.168.1.33:47346
<--- Transmitting SIP request (417 bytes) to UDP:192.168.1.33:41292 --->
ACK sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj3f4d61a5-e9ce-4e33-9d63-2af23324d125
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13938 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0


       > 0x7f0f90046d40 -- Strict RTP switching to RTP target address 192.168.1.33:47346 as source
    -- PJSIP/101-00000005 answered PJSIP/102-00000004
       > 0x7f0f90041350 -- Strict RTP learning after remote address set to: 192.168.1.33:57784
<--- Transmitting SIP response (803 bytes) to UDP:192.168.1.33:64150 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.33:64150;rport=64150;received=192.168.1.33;branch=z9hG4bK-524287-1---f37150ff6f9feba8
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
To: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
CSeq: 2 INVITE
Server: Asterisk PBX 18.8.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Contact: <sip:192.168.1.34:5060>
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length:   226

v=0
o=- 60212462 3 IN IP4 192.168.1.34
s=Asterisk
c=IN IP4 192.168.1.34
t=0 0
m=audio 18590 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

    -- Channel PJSIP/101-00000005 joined 'simple_bridge' basic-bridge <1a60d8ff-16b0-4bd8-895a-19e149d30584>
    -- Channel PJSIP/102-00000004 joined 'simple_bridge' basic-bridge <1a60d8ff-16b0-4bd8-895a-19e149d30584>
       > Bridge 1a60d8ff-16b0-4bd8-895a-19e149d30584: switching from simple_bridge technology to native_rtp
       > Remotely bridged 'PJSIP/102-00000004' and 'PJSIP/101-00000005' - media will flow directly between them
<--- Transmitting SIP request (949 bytes) to UDP:192.168.1.33:41292 --->
INVITE sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj488b79fe-3054-4193-bcac-f6e64e39137a
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Contact: <sip:asterisk@192.168.1.34:5060>
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13939 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800;refresher=uac
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Type: application/sdp
Content-Length:   231

v=0
o=- 9787957 9787958 IN IP4 192.168.1.34
s=Asterisk
c=IN IP4 192.168.1.33
t=0 0
m=audio 57784 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

<--- Received SIP response (946 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj488b79fe-3054-4193-bcac-f6e64e39137a
Require: timer
Contact: <sip:101@192.168.1.33:41292>
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13939 INVITE
Session-Expires: 1800;refresher=uac
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.5.8 v2.10.17.2
Allow-Events: presence, kpml, talk
Content-Length: 321

v=0
o=Z 0 2 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 47346 RTP/AVP 0 106 9 8 3 101 98
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=sendrecv

<--- Transmitting SIP request (417 bytes) to UDP:192.168.1.33:41292 --->
ACK sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPjee0e1b51-d9f9-45de-8658-562459bd24e2
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13939 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0


       > 0x7f0f90041350 -- Strict RTP switching to RTP target address 192.168.1.33:57784 as source
<--- Received SIP request (410 bytes) from UDP:192.168.1.33:64150 --->
ACK sip:192.168.1.34:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:64150;branch=z9hG4bK-524287-1---1f5fec7d9c63bd4f;rport
Max-Forwards: 70
Contact: <sip:102@192.168.1.33:64150;transport=UDP>
To: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 2 ACK
User-Agent: Zoiper v2.10.16.0
Content-Length: 0


<--- Transmitting SIP request (882 bytes) to UDP:192.168.1.33:64150 --->
INVITE sip:102@192.168.1.33:64150 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj52dfdde6-3bc7-413f-90e2-e954b0351b65
From: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
To: "102" <sip:102@192.168.1.34>;tag=2c0a9247
Contact: <sip:192.168.1.34:5060>
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 13835 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Type: application/sdp
Content-Length:   226

v=0
o=- 60212462 4 IN IP4 192.168.1.34
s=Asterisk
c=IN IP4 192.168.1.33
t=0 0
m=audio 47346 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

<--- Received SIP response (838 bytes) from UDP:192.168.1.33:64150 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj52dfdde6-3bc7-413f-90e2-e954b0351b65
Require: timer
Contact: <sip:102@192.168.1.33:64150;transport=UDP>
To: "102"<sip:102@192.168.1.34>;tag=2c0a9247
From: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 13835 INVITE
Session-Expires: 1800;refresher=uas
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper v2.10.16.0
Allow-Events: presence, kpml, talk
Content-Length: 240

v=0
o=Z 0 2 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 57784 RTP/AVP 0 3 110 97 8 101
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<--- Transmitting SIP request (378 bytes) to UDP:192.168.1.33:64150 --->
ACK sip:102@192.168.1.33:64150 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPjde3de656-4d40-4e82-9c1a-9a4285139240
From: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
To: "102" <sip:102@192.168.1.34>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 13835 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0


<--- Received SIP request (692 bytes) from UDP:192.168.1.33:64150 --->
BYE sip:192.168.1.34:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.33:64150;branch=z9hG4bK-524287-1---e29e4c37ac23f79c;rport
Max-Forwards: 70
Contact: <sip:102@192.168.1.33:64150;transport=UDP>
To: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
CSeq: 3 BYE
User-Agent: Zoiper v2.10.16.0
Authorization: Digest username="102",realm="asterisk",nonce="1637321448/f3a36e342660085e0fd7d9e0673c23ff",uri="sip:192.168.1.34:5060",response="dfaf9dcd093bcf4e5ad57970e77f4cd3",cnonce="cf637c6b5d7b5659ea8c4fd5c242cd09",nc=00000002,qop=auth,algorithm=md5,opaque="19ce20081653951d"
Content-Length: 0


<--- Transmitting SIP response (347 bytes) to UDP:192.168.1.33:64150 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.33:64150;rport=64150;received=192.168.1.33;branch=z9hG4bK-524287-1---e29e4c37ac23f79c
Call-ID: 62_Y3crl6kulQQpYGYMKlA..
From: "102" <sip:102@192.168.1.34>;tag=2c0a9247
To: <sip:101@192.168.1.34>;tag=b139ac70-4af3-4b1f-859e-852f94bc4446
CSeq: 3 BYE
Server: Asterisk PBX 18.8.0
Content-Length:  0


    -- Channel PJSIP/102-00000004 left 'native_rtp' basic-bridge <1a60d8ff-16b0-4bd8-895a-19e149d30584>
    -- Channel PJSIP/101-00000005 left 'native_rtp' basic-bridge <1a60d8ff-16b0-4bd8-895a-19e149d30584>
  == Spawn extension (testing, 101, 2) exited non-zero on 'PJSIP/102-00000004'
<--- Transmitting SIP request (949 bytes) to UDP:192.168.1.33:41292 --->
INVITE sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj5742b99c-4b6c-4e42-9ab4-feafdf3df2ab
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Contact: <sip:asterisk@192.168.1.34:5060>
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13940 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800;refresher=uac
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Type: application/sdp
Content-Length:   231

v=0
o=- 9787957 9787959 IN IP4 192.168.1.34
s=Asterisk
c=IN IP4 192.168.1.34
t=0 0
m=audio 17536 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

<--- Received SIP response (946 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj5742b99c-4b6c-4e42-9ab4-feafdf3df2ab
Require: timer
Contact: <sip:101@192.168.1.33:41292>
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13940 INVITE
Session-Expires: 1800;refresher=uac
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.5.8 v2.10.17.2
Allow-Events: presence, kpml, talk
Content-Length: 321

v=0
o=Z 0 3 IN IP4 192.168.1.33
s=Z
c=IN IP4 192.168.1.33
t=0 0
m=audio 47346 RTP/AVP 0 106 9 8 3 101 98
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=sendrecv

<--- Transmitting SIP request (417 bytes) to UDP:192.168.1.33:41292 --->
ACK sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPjd9ec7ddd-fdff-4e0d-b845-283856c31c6b
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13940 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0


<--- Transmitting SIP request (417 bytes) to UDP:192.168.1.33:41292 --->
BYE sip:101@192.168.1.33:41292 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.34:5060;rport;branch=z9hG4bKPj6c075731-7e97-4c91-a196-690bd2dc3114
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13941 BYE
Max-Forwards: 70
User-Agent: Asterisk PBX 18.8.0
Content-Length:  0


<--- Received SIP response (417 bytes) from UDP:192.168.1.33:41292 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.34:5060;rport=5060;branch=z9hG4bKPj6c075731-7e97-4c91-a196-690bd2dc3114
Contact: <sip:101@192.168.1.33:41292>
To: <sip:101@192.168.1.33;rinstance=bc832549eb04f9dd>;tag=88d9e745
From: "102" <sip:102@192.168.1.34>;tag=c2e804ba-d0be-4b0e-996f-0bafa94f760e
Call-ID: 8cb28471-70ff-4a8f-921a-b03f0498f41f
CSeq: 13941 BYE
User-Agent: Z 5.5.8 v2.10.17.2
Content-Length: 0

Re-invites are being done to tell each side to directly send media. You can disable this by setting “direct_media” to “no” on the endpoint and seeing if forwarding media through Asterisk works.

Why is the router configured to do NAT? Why not just have a single, multi-broadcast area, intranet?

Are the phones configured to use their “public” address, or are you using an application level gateway on the router? General experience is that ALGs are more trouble than they are worth.

Incidentally, I assume the router has a 10/8 address as well as the 192.168/16 one in the diagram.

1 Like

Thanks @jcolp again for the swift response, you are the best!. Yes it did solve the problem and now I can hear. However I was trying to lift some burden off the Asterisk by establishing a direct RTP connection between the endpoints. I’m not exactly sure if it really would help the Asterisk to do less processing but at least that was my aim. Is there any other way to establish a direct media connection between two endpoints?

With the given SIP and SDP, no. The IP address used in it is for the “Wireless router” likely due to an ALG like @david551 mentioned - or the endpoints are doing some kind of discovery thing. Stuff would need to use the actual IP addresses for a better chance of it working.

1 Like

Hello David, I’m not sure if my router is configured to do NAT or not :sweat_smile: I should admit that my network knowledge is very minimal, but I will look into my router settings and will try to disable it and see how that works. I will also check if I have ALG on my router or not.

That’s fair, I do have plans to put the server on the internet eventually but I want to study the security aspect of things before doing so. Thanks again @jcolp and @david551 for the help.