Is it possible to forward VoiP call to GSM [closed]
Asked Answered
P

1

7

Is it possible to use an Android phone as a simple GSM gateway?
The phone would receive a VoiP call using (preferably) Android built-in SIP stack, initiate a GSM call, and bridge audio both ways. After one call is terminated, the other one ends, too.

How could I approach the problem? My earlier attempts failed at bridging audio between connections. Is there a SDK supported way of doing this, that I missed? Or do I need to implement some sort of a workaround?

Pollock answered 13/7, 2013 at 21:5 Comment(2)
Do you specifically need it to be android - you can do this fairly easily with a VoIP PABX like Asterix and a GSM interface card?Damned
You could probably build a simple Twilio powered app to do this. We can handle VOIP to PSTN (including GSM) with an Android library. twilio.com/clientWeaponless
G
2

There are two problems with what you are asking:

  1. How to get at the incoming audio stream of the cellular call.
  2. How to get at the outgoing audio stream of the cellular call.

Recording Cellular Audio

Check out this link for some details on how it can be done on some devices. The API they use is the MediaRecorder api. Once you have the audio stream you can then encode it and send it down the SIP call side.

Playing Audio To A Cellular Call

This is most likely the most tricky bit as there is no Google API to get at the outgoing audio stream directly. I can only think of two possible ways to do this.

  1. Rewrite the Android dialer application, which happens to be the "telephony stack" in Android. With direct (only) access to the serial port link to the cellular radio stack you may be able to get to the outgoing audio stream. This would require you to root the device to be able to do this tho.
  2. Turn on speaker phone mode and then play audio through the speaker, that way the microphone should be able to pickup with is being played. You may have volume problems (both playing and microphone) and also the microphone will pickup on other sounds in the area as well.

I personally don't think any of these suggests are worth pursuing and you are better off following the commenters advise and go with something like a VOIP PABX like Asterix with a PTSN/GSM gateway.

Girondist answered 1/3, 2014 at 6:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.