This is a known issue. Google it to narrow down further but essentially there is a keepalive that should be sent at around 30 seconds (roughly, depends somewhat on where you start counting). Without this keepalive packet the call will drop as the carrier assumes you left.
It's been years since I hit this issue. Since you using a bad pbx system I won't help further than say most have already given you the likely solution but it's highly likely you need to consider ports, and said keepalive or ack in general.
Here's people fighting and resolving: https://stackoverflow.com/questions/27614532/sip-call-drop-after-30seconds
You are making it far far far more complicated than it needs to be.
Hire a professional.