Search code examples
androidaudiovoip

Android phone as a "proxy" between SIP and CDMA network


I am trying to do the following:
1) Using a SIP client (SIP CLIENT) call Android phone (GATEWAY)
2)GATEWAYcalls another phone (DESTINATION) using cellular network (au KDDI CDMA in my case)

I would like to be able to have a voice conversation between SIP CLIENT and DESTINATION. I thought of using the AudioRecord and AudioTrack Android classes to "connect" the audio stream, however apparently it would not work.

I did a simple test whereGATEWAYencodes the audio coming from DESTINATION using AudioSource.VOICE_DOWNLINK for AudioRecord and sends out the data in an RTP stream. Audio received atSIP CLIENTis unclear. My guess is that the stream used for encoding is not taken directly from the cellular PCM stream but rather from feedback which appears on the mic within the phone (Sharp IS05).

On the other hand, when talking to the micrphone ofGATEWAYthe sound coming in the RTP stream is much better sounding. When talking directly betweenGATEWAYandDESTINATIONthe sound is also much better.

Any ideas of how to implement something like this? Thanks
--oleg


Solution

  • It seems that this cannot be done: http://mortlemania.wordpress.com/2010/06/10/call-recording-crippled-on-android-fix-this-now-google/