예제 #1
0
 /**
  * Re-invites the remote user.
  *
  * <p>Starts a new InviteTransactionClient and changes the dialog state information
  *
  * <p>Parameters: <br>
  * - contact : the contact url OR the contact username; if null, the previous contact is used <br>
  * - session_descriptor : the message body
  */
 public void reInvite(String contact, String session_descriptor) {
   printLog("inside reInvite(contact,sdp)", LogLevel.MEDIUM);
   if (!statusIs(D_CALL)) return;
   // else
   Message invite = MessageFactory.createInviteRequest(this, session_descriptor);
   if (contact != null) {
     NameAddress contact_url;
     if (contact.indexOf("sip:") >= 0) contact_url = new NameAddress(contact);
     else
       contact_url =
           new NameAddress(
               new SipURL(contact, sip_provider.getViaAddress(), sip_provider.getPort()));
     invite.setContactHeader(new ContactHeader(contact_url));
   }
   reInvite(invite);
 }