FreePBX does not pass 200 OK SDP (answer)

Hi community,

we have setup two trunks: TRUNK-IN (chan_sip) & TRUNK-OUT (chan_pjsip) on FreePBX.

Our PJSUA client | Alice (172.21.X.X) makes a video call towards Bob (10.40.Z.Z) over FreePBX (172.21.Y.Y).
→ Call path: Alice → FreePBX TRUNK-IN → FreePBX TRUNK-OUT → Bob.

(1) INVITE | SDP offer w H264 from Alice:

a=rtpmap:97 H264/90000
a=fmtp:97 **profile-level-id=42801F**;packetization-mode=1;max-br=5000;**max-fs=8100**;max-mbps=490000

(2) FreePBX passes this offer through towards Bob.

a=rtpmap:99 H264/90000
a=fmtp:99 max-mbps=490000;**max-fs=8100**;max-br=5000;packetization-mode=1;**profile-level-id=42801F**

(3) Bob’s 200 OK | SDP answer w H264 looks like this (maximum resolution that Bob supports = 720p):

a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=1;**profile-level-id=428016**;max-br=5000;max-mbps=108000;**max-fs=3600**;max-smbps=108000;max-fps=6000;max-rcmd-nalu-size=1382400;sar-supported=16

(4) Free PBX replies to Alice with exactly same H264 SDP parameters that it received in the INVITE | SDP offer from Alice (pls see (1)) in the beginning iso the H264 parameters from Bob. I guess it acts as a B2BUA.

a=rtpmap:97 H264/90000
a=fmtp:97 max-mbps=490000;**max-fs=8100**;max-br=5000;packetization-mode=1;**profile-level-id=42801F**

H264 video flows look like this.

Bob --- H264 payload Level_id:31 --> FreePBX --- H264 payload Level_id:31 --->  Alice (720p)
Alice --- H264 payload Level_id:40 ---> FreePBX --- H264 payload Level_id:40 ---> Bob (1080p) larger than Bob expects

Now that Alice is unaware of Bob only supports 720p; Bob cannot render these (larger than expected) video frames.

Questions:
1- Should not FreePBX pass the 200 OK answer from Bob to Alice, so Alice could be aware of what video level Bob supports ?
2- If FreePBX acts as a B2BUA (which it seems so), should not it transcode H264 frames to a level Bob supports?

Below you can find the SIP trace.

Note: We tried enabling direct media (with the intention to get FreePBX out of the way, i.e. media path) with no luck; for some reason this does not work.

  • TRUNK-IN (chan_sip): canreinvite=yes
  • TRUNK-OUT (chna_pjsip): direct_media=yes

FreePBX version: FPBX-15.0.17.67(16.17.0)

Thanks in advance.

<--- SIP read from TCP:172.21.X.X:38992 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 10.0.2.100:55309;rport;branch=z9hG4bKPj6ca2b0c0-02b7-4263-85e2-13ee205467f6;alias
Max-Forwards: 70
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected]
Contact: "[email protected]" <sip:[email protected]:55309;transport=TCP;ob>
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19737 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 847

v=0
o=- 3858236341 3858236341 IN IP4 172.21.X.X
s=pjmedia
b=AS:6417
t=0 0
a=X-nat:0
m=audio 19900 RTP/AVP 8 0 9 96 120 121
c=IN IP4 172.21.X.X
b=TIAS:96000
a=rtcp:19901 IN IP4 172.21.X.X
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:120 telephone-event/8000
a=fmtp:120 0-16
a=rtpmap:121 telephone-event/48000
a=fmtp:121 0-16
a=ssrc:1088669226 cname:65ad84203f615b3c
m=video 19902 RTP/AVP 97 102
c=IN IP4 172.21.X.X
b=TIAS:6000000
a=rtcp:19903 IN IP4 172.21.X.X
a=sendrecv
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42801F;packetization-mode=1;max-br=5000;max-fs=8100;max-mbps=490000
a=rtpmap:102 VP8/90000
a=fmtp:102 max-fr=30; max-fs=580
a=ssrc:1421816237 cname:65ad84203f615b3c
a=rtcp-fb:* nack pli
<------------->
--- (15 headers 32 lines) ---
Sending to 172.21.X.X:38992 (NAT)
Sending to 172.21.X.X:38992 (NAT)
Using INVITE request as basis request - a8f910e7-eade-4374-a4f4-1d3085f3ae2e
Found peer 'JIBRI-GROOT02-TRUNK-IN' for 'alice' from 172.21.X.X:38992
Got SDP version 3858236341 and unique parts [- 3858236341 IN IP4 172.21.X.X]
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 9
Found RTP audio format 96
Found RTP audio format 120
Found RTP audio format 121
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format G722 for ID 9
Found audio description format opus for ID 96
Found audio description format telephone-event for ID 120
Found unknown media description format telephone-event for ID 121
Found RTP video format 97
Found RTP video format 102
Found video description format H264 for ID 97
Found video description format VP8 for ID 102
Capabilities: us - (g722|ulaw|alaw|h264), peer - audio=(ulaw|alaw|g722|opus)/video=(h264|vp8)/text=(nothing), combined - (g722|ulaw|alaw|h264)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 172.21.X.X:19900
Peer video RTP is at port 172.21.X.X:19902
Looking for bob in from-internal (domain 172.21.Y.Y)
sip_route_dump: route/path hop: <sip:[email protected]:55309;transport=TCP;ob>

<--- Transmitting (NAT) to 172.21.X.X:38992 --->
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 10.0.2.100:55309;branch=z9hG4bKPj6ca2b0c0-02b7-4263-85e2-13ee205467f6;alias;received=172.21.X.X;rport=38992
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected]
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19737 INVITE
Server: FPBX-15.0.17.67(16.17.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5160;transport=tcp>
Content-Length: 0


<------------>
[2022-04-06 15:19:02] ERROR[78701]: res_pjsip_header_funcs.c:410 remove_header: No headers had been previously added to this session.
<--- Transmitting SIP request (1181 bytes) to UDP:10.40.Z.Z:5083 --->
INVITE sip:10.40.Z.Z:5083 SIP/2.0
Via: SIP/2.0/UDP 172.21.Y.Y:5060;rport;branch=z9hG4bKPj026cb5da-9571-4636-8c3e-2f44fc7f13c8
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2641 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
Route: <sip:[email protected]>
Max-Forwards: 70
User-Agent: FPBX-15.0.17.67(16.17.0)
Content-Type: application/sdp
Content-Length:   445

v=0
o=- 761776572 761776572 IN IP4 172.21.Y.Y
s=Asterisk
c=IN IP4 172.21.Y.Y
t=0 0
m=audio 14038 RTP/AVP 9 0 8 101
a=rtpmap:9 G722/8000
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
m=video 15950 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 max-mbps=490000;max-fs=8100;max-br=5000;packetization-mode=1;profile-level-id=42801F
a=sendrecv

<--- Received SIP response (349 bytes) from UDP:10.40.Z.Z:5083 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.21.Y.Y:5060;received=172.21.Y.Y;branch=z9hG4bKPj026cb5da-9571-4636-8c3e-2f44fc7f13c8;rport=5060
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2641 INVITE


<--- Received SIP response (705 bytes) from UDP:10.40.Z.Z:5083 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 172.21.Y.Y:5060;received=172.21.Y.Y;branch=z9hG4bKPj026cb5da-9571-4636-8c3e-2f44fc7f13c8;rport=5060
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2641 INVITE
Supported: timer
Allow: INVITE,ACK,CANCEL,BYE,INFO,REGISTER,NOTIFY
Content-Length: 0
Allow-Events: talk
Proxy-Authenticate: Digest realm="test2.com",nonce="e87dba3a1f18e9952bfa706764402a4d",opaque="cce1bd0878de7cd1411b21519e0460ec",algorithm=MD5,qop="auth"
Session-Expires: 1800


<--- Transmitting SIP request (439 bytes) to UDP:10.40.Z.Z:5083 --->
ACK sip:10.40.Z.Z:5083 SIP/2.0
Via: SIP/2.0/UDP 172.21.Y.Y:5060;rport;branch=z9hG4bKPj026cb5da-9571-4636-8c3e-2f44fc7f13c8
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2641 ACK
Route: <sip:[email protected]>
Max-Forwards: 70
User-Agent: FPBX-15.0.17.67(16.17.0)
Content-Length:  0


<--- Transmitting SIP request (1499 bytes) to UDP:10.40.Z.Z:5083 --->
INVITE sip:10.40.Z.Z:5083 SIP/2.0
Via: SIP/2.0/UDP 172.21.Y.Y:5060;rport;branch=z9hG4bKPj1e2944c2-ea23-4f95-bf48-920255728bf3
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2642 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: FPBX-15.0.17.67(16.17.0)
Proxy-Authorization: Digest username="42af7181ba2b4cb3", realm="test2.com", nonce="e87dba3a1f18e9952bfa706764402a4d", uri="sip:10.40.Z.Z:5083", response="e43b624dd1ed1832397acabba18f9791", algorithm=MD5, cnonce="c0d17063c6c84cd8a193d8583cb6fa67", opaque="cce1bd0878de7cd1411b21519e0460ec", qop=auth, nc=00000001
Route: <sip:[email protected]>
Content-Type: application/sdp
Content-Length:   445

v=0
o=- 761776572 761776572 IN IP4 172.21.Y.Y
s=Asterisk
c=IN IP4 172.21.Y.Y
t=0 0
m=audio 14038 RTP/AVP 9 0 8 101
a=rtpmap:9 G722/8000
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
m=video 15950 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 max-mbps=490000;max-fs=8100;max-br=5000;packetization-mode=1;profile-level-id=42801F
a=sendrecv

<--- Received SIP response (349 bytes) from UDP:10.40.Z.Z:5083 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.21.Y.Y:5060;received=172.21.Y.Y;branch=z9hG4bKPj1e2944c2-ea23-4f95-bf48-920255728bf3;rport=5060
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2642 INVITE


<--- Received SIP response (562 bytes) from UDP:10.40.Z.Z:5083 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.21.Y.Y:5060;received=172.21.Y.Y;branch=z9hG4bKPj1e2944c2-ea23-4f95-bf48-920255728bf3;rport=5060
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>;tag=ExTKC~xcXz
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2642 INVITE
Supported: timer
Allow: INVITE,ACK,CANCEL,BYE,INFO,REGISTER,NOTIFY
Contact: <sip:[email protected]:5083;transport=udp>
Content-Length: 0
Allow-Events: talk



<--- Transmitting (NAT) to 172.21.X.X:38992 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/TCP 10.0.2.100:55309;branch=z9hG4bKPj6ca2b0c0-02b7-4263-85e2-13ee205467f6;alias;received=172.21.X.X;rport=38992
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19737 INVITE
Server: FPBX-15.0.17.67(16.17.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5160;transport=tcp>
Content-Length: 0


<------------>
<--- Received SIP response (1261 bytes) from UDP:10.40.Z.Z:5083 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.21.Y.Y:5060;received=172.21.Y.Y;branch=z9hG4bKPj1e2944c2-ea23-4f95-bf48-920255728bf3;rport=5060
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>;tag=ExTKC~xcXz
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2642 INVITE
Supported: timer
Allow: INVITE,ACK,CANCEL,BYE,INFO,REGISTER,NOTIFY
Contact: <sip:[email protected]:5083;transport=udp>
Content-Length: 548
Content-Type: application/sdp
Require: timer
Allow-Events: talk
X-Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4-UASession-ESzA28Xm0z
Session-Expires: 1800;refresher=uas

v=0
o=tandberg 969415176 1 IN IP4 10.40.Z.Z
s=-
c=IN IP4 10.40.Z.Z
b=AS:6000
t=0 0
m=audio 40672 RTP/AVP 9 0 8 101
b=TIAS:64000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
m=video 40674 RTP/AVP 99
b=TIAS:6000000
a=rtpmap:99 H264/90000
a=fmtp:99 packetization-mode=1;profile-level-id=428016;max-br=5000;max-mbps=108000;max-fs=3600;max-smbps=108000;max-fps=6000;max-rcmd-nalu-size=1382400;sar-supported=16
a=label:11
a=content:main
a=sendrecv

[2022-04-06 15:19:13] WARNING[84172][C-0000004b]: res_rtp_asterisk.c:7551 ast_rtp_read: RTP Read too short
[2022-04-06 15:19:13] WARNING[84172][C-0000004b]: res_rtp_asterisk.c:7551 ast_rtp_read: RTP Read too short
[2022-04-06 15:19:13] WARNING[84172][C-0000004b]: res_rtp_asterisk.c:7551 ast_rtp_read: RTP Read too short
[2022-04-06 15:19:13] WARNING[84172][C-0000004b]: res_rtp_asterisk.c:7551 ast_rtp_read: RTP Read too short
<--- Transmitting SIP request (428 bytes) to UDP:10.40.Z.Z:5083 --->
ACK sip:[email protected]:5083 SIP/2.0
Via: SIP/2.0/UDP 172.21.Y.Y:5060;rport;branch=z9hG4bKPj7e12fb28-a0c7-46c1-b315-eedf5fede734
From: "[email protected]" <sip:[email protected]>;tag=d7687f27-e727-4d44-9868-3888c468322d
To: <sip:[email protected]>;tag=ExTKC~xcXz
Call-ID: 4da4b4db-0532-4346-a118-fe2f930a6ab4
CSeq: 2642 ACK
Max-Forwards: 70
User-Agent: FPBX-15.0.17.67(16.17.0)
Content-Length:  0


Audio is at 16066
Video is at 172.21.Y.Y:10118
Adding codec g722 to SDP
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding video codec h264 to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 172.21.X.X:38992 --->
SIP/2.0 200 OK
Via: SIP/2.0/TCP 10.0.2.100:55309;branch=z9hG4bKPj6ca2b0c0-02b7-4263-85e2-13ee205467f6;alias;received=172.21.X.X;rport=38992
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19737 INVITE
Server: FPBX-15.0.17.67(16.17.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5160;transport=tcp>
Content-Type: application/sdp
Require: timer
Content-Length: 461

v=0
o=root 2097535749 2097535749 IN IP4 172.21.Y.Y
s=Asterisk PBX 16.17.0
c=IN IP4 172.21.Y.Y
b=CT:6000
t=0 0
m=audio 16066 RTP/AVP 9 0 8 120
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:120 telephone-event/8000
a=fmtp:120 0-16
a=maxptime:150
a=sendrecv
m=video 10118 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 max-mbps=490000;max-fs=8100;max-br=5000;packetization-mode=1;profile-level-id=42801F
a=sendrecv

<------------>
[2022-04-06 15:19:13] WARNING[78701]: res_pjsip_registrar.c:1104 registrar_on_rx_request: Endpoint 'anonymous' (62.210.13.20:6052) has no configured AORs

<--- SIP read from TCP:172.21.X.X:38992 --->
ACK sip:[email protected]:5160;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 10.0.2.100:55309;rport;branch=z9hG4bKPj4455ba99-b02a-49a9-bead-be283a5fc86b;alias
Max-Forwards: 70
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19737 ACK
Content-Length: 0

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

<--- SIP read from TCP:172.21.X.X:38992 --->
INVITE sip:[email protected]:5160;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 10.0.2.100:55309;rport;branch=z9hG4bKPj308d8e12-33da-486f-b173-83eb1b868ac5;alias
Max-Forwards: 70
From: "[email protected]1.com" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Contact: "[email protected]" <sip:[email protected]:55309;transport=TCP;ob>
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19738 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 625

v=0
o=- 3858236341 3858236342 IN IP4 172.21.X.X
s=pjmedia
b=AS:6417
t=0 0
a=X-nat:0
m=audio 19900 RTP/AVP 9 120
c=IN IP4 172.21.X.X
b=TIAS:96000
a=rtcp:19901 IN IP4 172.21.X.X
a=ssrc:1088669226 cname:65ad84203f615b3c
a=rtpmap:9 G722/8000
a=rtpmap:120 telephone-event/8000
a=fmtp:120 0-16
a=sendrecv
m=video 19902 RTP/AVP 97
c=IN IP4 172.21.X.X
b=TIAS:6000000
a=rtcp:19903 IN IP4 172.21.X.X
a=ssrc:1421816237 cname:65ad84203f615b3c
a=rtcp-fb:* nack pli
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42801F;packetization-mode=1;max-br=5000;max-fs=8100;max-mbps=490000
a=sendrecv
<------------->
--- (14 headers 24 lines) ---
Sending to 172.21.X.X:38992 (NAT)
Comparing SDP version 3858236341 -> 3858236342 and unique parts [- 3858236341 IN IP4 172.21.X.X] -> [- 3858236341 IN IP4 172.21.X.X]
Found RTP audio format 9
Found RTP audio format 120
Found audio description format G722 for ID 9
Found audio description format telephone-event for ID 120
Found RTP video format 97
Found video description format H264 for ID 97
Capabilities: us - (g722|ulaw|alaw|h264), peer - audio=(g722)/video=(h264)/text=(nothing), combined - (g722|h264)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 172.21.X.X:19900
Peer video RTP is at port 172.21.X.X:19902

<--- Transmitting (NAT) to 172.21.X.X:38992 --->
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 10.0.2.100:55309;branch=z9hG4bKPj308d8e12-33da-486f-b173-83eb1b868ac5;alias;received=172.21.X.X;rport=38992
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19738 INVITE
Server: FPBX-15.0.17.67(16.17.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5160;transport=tcp>
Content-Length: 0


<------------>
Audio is at 16066
Video is at 172.21.Y.Y:10118
Adding codec g722 to SDP
Adding video codec h264 to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 172.21.X.X:38992 --->
SIP/2.0 200 OK
Via: SIP/2.0/TCP 10.0.2.100:55309;branch=z9hG4bKPj308d8e12-33da-486f-b173-83eb1b868ac5;alias;received=172.21.X.X;rport=38992
From: "[email protected]" <sip:[email protected]>;tag=41f67cfe-8618-4fbb-9bdd-6f8a0a766bce
To: sip:[email protected];tag=as257d6a3c
Call-ID: a8f910e7-eade-4374-a4f4-1d3085f3ae2e
CSeq: 19738 INVITE
Server: FPBX-15.0.17.67(16.17.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:[email protected]:5160;transport=tcp>
Content-Type: application/sdp
Require: timer
Content-Length: 413

v=0
o=root 2097535749 2097535750 IN IP4 172.21.Y.Y
s=Asterisk PBX 16.17.0
c=IN IP4 172.21.Y.Y
b=CT:6000
t=0 0
m=audio 16066 RTP/AVP 9 120
a=rtpmap:9 G722/8000
a=rtpmap:120 telephone-event/8000
a=fmtp:120 0-16
a=maxptime:150
a=sendrecv
m=video 10118 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 max-mbps=490000;max-fs=8100;max-br=5000;packetization-mode=1;profile-level-id=42801F
a=sendrecv

Asterisk (and thus FreePBX) does not currently pass through information from a 200 OK. Each leg is independent. It also does not transcode video.

Hi Joshua,

it is understandable that the FreePBX -as a B2BUA- handles each leg independently, however this would only make sense if it did also handle each media leg independently.

In my opinion, not passing the 200 OK answer and letting the media flow just transparently are kind of contradicting.

Alice has no idea that Bob does not support some H264 level; FreePBX is supposed to be aware of this, yet knowingly passes on these larger than expected video frames.

  • Is there a way to enable direct media, get the FreePBX out of the way?

  • Or would slow starting help?

    • Alice sends INVITE wo SDP; Bob responds with 200 OK offer; FreePBX passes this offer on to Alice as it could not possibly send anything else.

Thanks.

There is no current support for doing what you are referring to, through any of the methods you state.

To be more specific, the SDP from the 200 OK is not used at all to construct the 200 OK sent by Asterisk. Not for direct media, not for normal answer.

I hope that we’re able to finish work to allow this to happen in the future, but do not have a time frame.

So, just to be sure:

  • not possible to enable direct media for video at all
  • FreePBX would respond to INVITE wo SDP from Alice with just 200 OK wo SDP.

It may be possible to enable direct media, but that doesn’t change the SDP codecs or attributes or pass them through. It just makes the media go direct. Asterisk would send a 200 OK with its own constructed SDP, it does not pass through the SDP of the called party, or the attributes of them.

So, even though direct media would be enabled (we could not manage to do it), FreePBX would still construct the SDP answer ignoring what it received from Bob. Hence, we’d still bump into the same issue.

Yes. Direct media does not mean SDP passthrough.

One last question: If we registered Alice and Bob directly to FreePBX as extensions, would this still happen?

Thanks.

Yes. That makes no difference, if the traffic goes through FreePBX/Asterisk then it still applies.

FreePBX default configurations do a lot of things that are incompatible with direct media, e.g. they look for DTMF feature codes.

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