Creates a new Request message based on the dialog creating request. This method should be used for but not limited to creating Bye's, Refer's and re-Invite's on the Dialog. The returned Request will be correctly formatted that is the Dialog implementation is responsible for assigning the following:
- RequestURI
- FromHeader
- ToHeader
- CallIdHeader
- RouteHeaders
The CSeqHeader will be set when the message is sent. If this method returns a CSeqHeader in the Request it may be overwritten again by the {@link Dialog#sendRequest(ClientTransaction)} method. Therefore anyRequest created by this method must be sent via the {@link Dialog#sendRequest(ClientTransaction)} method and not via its{@link ClientTransaction#sendRequest()} method.
All other headers including any Authentication related headers, and record route headers should be assigned by the application to the generated request. The assignment of the topmost via header for the outgoing request may be deferred until the application creates a ClientTransaction to send the request out. This method does not increment the dialog sequence number. This method may not be used for creating PRACK or ACK. Implementations should throw SipException if this method is called for creating ACK or PRACK.
@param method the string value that determines if the request to be created.
@return the newly created Request message on this Dialog.
@throws SipException if the Dialog is not yet established (i.e. dialog state equals null) or is terminated or if the method is invoked for ACK or PRACK.