Пример #1
0
  /**
   * Create terminating dialog path
   *
   * @param invite Incoming invite
   */
  public void createTerminatingDialogPath(SipRequest invite) {
    // Set the call-id
    String callId = invite.getCallId();

    // Set target
    String target = invite.getContactURI();

    // Set local party
    String localParty = invite.getTo();

    // Set remote party
    String remoteParty = invite.getFrom();

    // Get the CSeq value
    long cseq = invite.getCSeq();

    // Set the route path with the Record-Route
    Vector<String> route = SipUtils.routeProcessing(invite, false);

    // Create a dialog path
    dialogPath =
        new SipDialogPath(
            getImsService().getImsModule().getSipManager().getSipStack(),
            callId,
            cseq,
            target,
            localParty,
            remoteParty,
            route);

    // Set the INVITE request
    dialogPath.setInvite(invite);

    // Set the remote tag
    dialogPath.setRemoteTag(invite.getFromTag());

    // Set the remote content part
    dialogPath.setRemoteContent(invite.getContent());

    // Set the session timer expire
    dialogPath.setSessionExpireTime(invite.getSessionTimerExpire());
  }