Converting phone to SIP gateway 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).