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?