FreePBX not following 302 redirect from remote PBX only when dialed from internal phone

Here is the scenario:
I have an inbound call route sending calls to a ring group. That ring group contains an external number, which goes out of another trunk to a remote PBX (not mine).

That remote PBX (not mine) intentionally sometimes returns a 302 to another IP address, for example when it is under maintenance. That’s fine.

Here is the actual issue:

If an outside call comes in, and goes to that ring group, and then to that external number, the remote PBX sends a 302 and my FreePBX honors that and the call is successful. Everything is great.

However, if I use an internal phone on my PBX and dial that same ring group, or if I directly dial that remote number from my internal phones, my FreePBX receives the 302 just like before but my FreePBX does not follow the 302. It just retries the same IP address over and over until my phone says “Sorry the max simultaneous calls has been reached”.

I cannot figure out the difference on why this is happening. It works fine when coming in on an outside trunk but it fails when dialed from my internal phones.

Does anyone recognize this?

I found what I believe is the solution, although it doesn’t seem to work:

redirect_method=uri_pjsip

I put that into pjsip.endpoint_custom_post.conf like this but the behavior does not change after a reload:

[999](+type=endpoint)
redirect_method=uri_pjsip

Where exactly should I put that?