title: How implement the VOIP application using android.net.rtp package
body: <p>I am trying to implemented the VoIP application using the AudioGroup and AudioStream classes of the android.net.rtp package. But my application not function properly. After "Join" the "AudioGroup" class object with the "AudioStream" object, its send udp packets successfully. I checked that using the packet analyzer. But voice is not hear from the phone. I run my application in 2 phones and try communicate voice between them.</p>
  
  <p>In below I mention my source code.</p>
  
  <pre><code>public class MainActivity extends Activity {
  private AudioStream audioStream;
  private AudioGroup audioGroup;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  
  try {
     audioGroup = new AudioGroup();
     audioGroup.setMode(AudioGroup.MODE_NORMAL);        
     audioStream = new AudioStream(InetAddress.getByAddress(new byte[] {(byte)192, (byte)168, (byte)1, (byte)4 }));
     audioStream.setCodec(AudioCodec.PCMU);
     audioStream.setMode(RtpStream.MODE_NORMAL);
     audioStream.associate(InetAddress.getByAddress(new byte[] {(byte)192, (byte)168, (byte)1, (byte)2 }), 5004);
     audioStream.join(audioGroup);
     AudioManager Audio =  (AudioManager) getSystemService(Context.AUDIO_SERVICE); 
     Audio.setMode(AudioManager.MODE_IN_COMMUNICATION);
  } 
  catch (SocketException e) { e.printStackTrace();} 
  catch (UnknownHostException e) { e.printStackTrace();} 
  catch (Exception ex) { ex.printStackTrace();}
  }
  </code></pre>
  
  <p>I set this permissions in the Manifestfile.</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.USE_SIP" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
  &lt;uses-feature android:name="android.hardware.sip.voip" android:required="true" /&gt;
  &lt;uses-feature android:name="android.hardware.wifi" android:required="true" /&gt;
  &lt;uses-feature android:name="android.hardware.microphone" android:required="true" /&gt;
  </code></pre>
  
  <hr>
  
  <p>I am using the Samsung GALAXY S3 phone with Android 4.0 OS</p>