code: public void hangupReceived() {
          if (!isHangingUp) {
              isHangingUp = true;
  
              if (null != listenerReference) {
                  // Disconnect will clear the listenerReference, so grab a reference to the
                  // listener while it's still alive since the listener will be notified in a
                  // different (UI) thread
                  final Listener listener = listenerReference.get();
  
                  new Handler(Looper.getMainLooper()).post(new Runnable() {
                      public void run() {
                          if (null != listener) {
                              listener.onHangup(RespokeCall.this);
                          }
                      }
                  });
              }
  
              disconnect();
          }
      }
docs: Process a hangup message received from the remote endpoint. This is used internally to the SDK and should not be called directly by your client application.