Chan_Sip NAT auto_force_rport, auto_comedia not working

Hi there

Been running asterisk 11 for a quite a few years on a busy system running realtime
We have lots of peers mostly NAT and some not, we run qualify to keep the sip open and ive used nat=auto_force_rport, auto_comedia on my peers from the get go and its worked perfect

I built this system around chan_sip at the time because it worked how I wanted it to.

Seems that around Asterisk 13 auto_force_rport, auto_comedia no longer work.
The peers appear in the peers list and seem to detect that they are NAT or not but the (Yes) does not actually work, this is resulting in lost audio. Forcing rport and comedia is a work around but i want my peers to be dynamic like they are on asterisk 11

I first noticed this when I upgraded an old freepbx box (also use chan_sip) all the peers had audio issues until we selected forced and not auto

Has anyone else experienced this? Any chance of getting it fixed? Im in the middle of building a new asterisk 16 system and there is no way I can upgrade with this huge bug.
Ben

The chan_sip module is community supported, meaning it is not supported by Sangoma. If there is an issue then there is no timeframe on if or when it would be resolved and few people, if any, touch chan_sip anymore.

Thanks for your input here, on further inspection and digging looks like the bug is related to res_rtp_asterisk.so

we learn the address and tells us where its sending the RTP but just ignores it?

== Using SIP RTP CoS mark 5
       > 0x7f54a402e870 -- Strict RTP learning after remote address set to: 192.168.4.198:5096
    -- Executing [4001@napier:1] Answer("SIP/068243554-00000006", "") in new stack
       > 0x7f54a402e870 -- Strict RTP qualifying stream type: audio
       > 0x7f54a402e870 -- Strict RTP switching source address to [PUBLICADDRESS]:5096
Got  RTP packet from    [PUBLICADDRESS]:5096 (type 00, seq 038241, ts 289900960, len 000160)
    -- Executing [4001@napier:2] MusicOnHold("SIP/068243554-00000006", "default") in new stack
    -- Started music on hold, class 'default', on channel 'SIP/068243554-00000006'
Got  RTP packet from    [PUBLICADDRESS]:5096 (type 00, seq 038242, ts 289901120, len 000160)
Sent RTP packet to      192.168.4.198:5096 (type 00, seq 029123, ts 000160, len 000160)
Sent RTP packet to      192.168.4.198:5096 (type 00, seq 029124, ts 000320, len 000160)
Got  RTP packet from    [PUBLICADDRESS]:5096 (type 00, seq 038243, ts 289901280, len 000160)
Got  RTP packet from    [PUBLICADDRESS]:5096 (type 00, seq 038244, ts 289901440, len 000160)
Sent RTP packet to      192.168.4.198:5096 (type 00, seq 029125, ts 000480, len 000160)

VS: Force Rport Forced Comeda

 == Using SIP RTP CoS mark 5
       > 0x7f54a4084bf0 -- Strict RTP learning after remote address set to: 192.168.4.198:5100
    -- Executing [4001@napier:1] Answer("SIP/068243554-00000008", "") in new stack
       > 0x7f54a4084bf0 -- Strict RTP qualifying stream type: audio
       > 0x7f54a4084bf0 -- Strict RTP switching source address to [PUBLICADDRESS]:5100
Got  RTP packet from    [PUBLICADDRESS]:5100 (type 00, seq 060993, ts 289923840, len 000160)
    -- Executing [4001@napier:2] MusicOnHold("SIP/068243554-00000008", "default") in new stack
    -- Started music on hold, class 'default', on channel 'SIP/068243554-00000008'
Got  RTP packet from    [PUBLICADDRESS]:5100 (type 00, seq 060994, ts 289924000, len 000160)
Sent RTP packet to      [PUBLICADDRESS]:5100 (type 00, seq 008806, ts 000160, len 000160)
Got  RTP packet from    [PUBLICADDRESS]:5100 (type 00, seq 060995, ts 289924160, len 000160)
Sent RTP packet to      [PUBLICADDRESS]:5100 (type 00, seq 008807, ts 000320, len 000160)
Got  RTP packet from    [PUBLICADDRESS]:5100 (type 00, seq 060996, ts 289924320, len 000160)
Sent RTP packet to      [PUBLICADDRESS]:5100 (type 00, seq 008808, ts 000480, len 000160)
Got  RTP packet from    [PUBLICADDRESS]:5100 (type 00, seq 060997, ts 289924480, len 000160)