Trunk configuration errors

Hello.
Tell me what my problem could be.
FreeBPX16 + Asterisk + Mikrotik
Local network 192.168.33.0/24 - FreePBX 16 is installed (on the eth0 interface the address is 192.168.33.33) and internal phones.
95.112.16.100 - external address provided by the provider. This address is set as external in the SIP parameters.
In addition, a trunk from the provider is configured for landline phones of the city telephone network. The trunk connected to eth1 of the server with the address 10.20.100.125.
When calling a landline, the sound does not go through and when you answer the call, then after the hang-up the subscriber does not see the end of the call, the conversation continues for about 25-30 seconds. Moreover, if you do not pick up the phone but hang up immediately, the call ends. Otherwise, both internal calls and calls from internal to city via the same trunk are correct. My English is not very good, but I hope I described everything correctly.

You clearly have a bad signalling connectivity, but we really need logs and the identity of the channel driver, in use, to understand what is wrong.

Have you included the 10/8 (or the correct subset of it) in your local networks.

This suggests that the side trying to end the call has received a wrong Contact header, from Asterisk (or one which has been closed out by a firewall rule timing out) but it isn’t entirely clear, to me, which side is which.

Hello.
FreePBX16 + Asterisk + Microtik.
Asterisk is installed on a virtual machine and has 2 network interfaces: eth0 192.168.20.20 and eth1 10.20.30.40.
The microtik has an external static address of 90.100.80.70.
On eth1, the link is directly from the provider’s modem, bypassing the microtik.
Ports 5060 and 10000-20000 are routed on microtica from 90.100.80.70 to 192.168.20.20.
The office has telephones on the 192.168.20.0/24 network.
There are also phones outside the office. Their server address is 90.100.80.70 in their settings.
Internal numbers with default pjsip settings.
The sip for asterisk settings specify 2 networks 192.168.20.0/24 and 10.20.30.32/29, as well as the external address 90.100.80.70.
The provider provided the data for the trunk:
Gateway 10.20.30.33;
Proxy 10.20.30.30;
IP 10.20.30.38;
Mask: 255.255.255.248;
Phone 8146123456;
In the trunk settings, I specified proxy 10.20.30.30, port 5060 and cid 8146123456.
I have set up incoming and outgoing routing.
With these settings, calls between SIP phones work for me. Between phones inside the local network, as well as between phones outside the office that use the address 90.100.80.70 as the server. That is, a call goes through, the sound goes both ways, and when a reset occurs on one phone, the end of the conversation, then the call stops on the other. The same thing happens if I make a call from a sip phone with outbound routing connected to it via trunk 8146123456. If I call, for example, the number 8146335577, then the call goes through and the sound goes through. And if I end the conversation, it ends on the other phone as well.
But if I’m calling from 8146335577 to 8146123456 then:
When responding, there is no sound for about 10 seconds. At the same time, despite the fact that the call is accepted, the “handset is picked up”, the other phone continues to ring, as if it is still being dialed. And if I “hang up” at this time, then the conversation will continue on the other phone for about 25-30 seconds.
I think I set up the trunk wrong. But I don’t understand what needs to be done. I tried to register the address 10.20.30.30 and 10.20.30.38 in the Direct Media settings, but it didn’t help.
Can you tell me what can be done in this situation?