title: Android built-in SIP library doesn't end a call correctly?
body: <p>I used the Android built-in sip library to write an app that makes calls via my own Asterisk server. The calls are being made correctly, but most of the time, the calls aren't ended correctly.</p>
  
  <p>This is my code to end the call:</p>
  
  <pre><code>public void stopCalling(){
      try {
          call.endCall();
          call.close();
      } catch (SipException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Could someone explain to me why the calls are sometimes ended correctly, but most of the time not?</p>
  
  <p>To give you an example of what happens, when I call from my android phone to a sip client on a pc, it rings. when I call the stopCalling method from the android device, the pc client keeps ringing, when I pick up the call on the pc, there just isn't any sound and eventually, the connection times out and the call is ended on the pc client side. When I end the call after the pc client picks up, the audio stream is stopped immediately, but the call is not ended until the connection times out.</p>