Sonicwall box routing issue

I have a site to site vpn set up witg site b connecting to main site a

Site a hosts the pbx on a lan 192.168.30. X gateway is 192.168.30.1

Pbx server is on 192.168.30.252 it has a srpetate 3rd party gateway of 192.168.30.253

Problem
I can’t ping the pbxx server from site b I can ping all other devices on the lan at site a from site b but not the pbx server.

I assume this is due to the difference in gateway which I can’t change but how can I resolve this some sort of static route?

Yes, a static route should work. The 3rd party gateway does not know the VPN network so the ping responses (pong) are dropped. I’d try a static route on the 3rd party gateway for the VPN network pointing to the 192.168.30.1 gateway. A static route on the PBX should work too.