Is there a way to use my phone as a SIP GSM gateway, so I can make and receive cellular calls using a SIP phone and/or re-route them through a SIP PBX?
Not possible until we have source code of mobile device drivers responsible for radio communication, You can read a related article which describe that Why it is not possible to use phone as sip to gsm gateway.
according that article
Third hurdle to make Android work as a GSM Gateway is that vendor RIL is not open source. Every vendor has their own library of RIL that communicates with Radio Daemon (rild).
This would seem to require device in which the in-call audio can be sourced/obtained by an application. On the typical android phone architecture, in call audio is handled by the radio co-processor, entirely out of reach of anything running under linux/android - the same reason why you can't really record calls.
If you got a rooted phone with (or hackable for) USB host support and found a usb audio dongle with linux drivers you could theoretically loop around and plug that into the phone's headset jack... but wouldn't it be simpler just to buy SIP gateway service from someone?
At the moment, that is not available. Potentially you could port a linux application for this to your Android phone, easier if it's a CLI application, but as it stands at the moment there is no application that can do what you ask.