title: Android, phone call audio stream via wlan
body: <p>I am planning on developing my specific voip app for android.</p>
  
  <p>Here's the scenario:
  when a phone call occurs I want to hear the person who's calling on my local pc speakers and I want to speak to him via my own pc microphone / headset. So I need to send the audio stream of both me and the person I am talking to via the wlan network.</p>
  
  <p>Something like this:</p>
  
  <pre><code>...
  onCallStateChanged(int state, String phoneNumber){
   while(state == PhoneListener.CALL_STATE_OFFHOOK){ //while phone call is happening
    //send incoming speech via wlan to pc
    //receive audiostream from pc microphone and direct it to the phone call
   }
  }
  ...
  </code></pre>
  
  <p>Is this possible with the current Android API? (Actually it should be since voip apps are available in the market)
  I did some research in the Android API and all I found was the AudioManager which has constant named </p>
  
  <pre><code>public static final int  STREAM_VOICE_CALL; //The audio stream for phone calls 
  </code></pre>
  
  <p>But I don't know how to use it our how it should give me access to the actual audiostreams which I can send via network. How do I manage to do this?</p>
  
  <p>The connection would be realised by TCP sockets.  </p>