コード例 #1
0
ファイル: PageGroup.java プロジェクト: astubbs/sipxecs
  /**
   * End this page, by clearing up all timers, outbound calls, the inbound call, and the RTP forker.
   *
   * <p>synchronized so multiple calls are serialized. Only the first should be needed.
   */
  public synchronized void end() {
    // Remove all timers associated with me
    Timers.removeTimer(this);

    // Hangup on all outbound calls.
    for (Leg outbound : outbounds) {
      try {
        outbound.destroyLeg();
      } catch (Exception e) {
        LOG.error("PageGroup::end outbound", e);
      }
    }
    outbounds.removeAllElements();

    // Stop the RTP processing.
    rtpFork.stop();
    rtpFork.removeAllDestinations();

    // Hangup on the inbound call
    if (inbound != null) {
      try {
        inbound.destroyLeg();
      } catch (Exception e) {

        LOG.error("PageGroup::end inbound", e);
      }
      inbound = null;
    }
    busy = false;
  }