SipPort provides a number of createInvite() methods that take an invite parameter (which is the incoming initial INVITE request). These methods copy content and headers from the incoming INVITE to the created outgoing INVITE. Optionally a RequestModifier can be provided to modify the created INVITE *after* the default copying.
For performance and other reason, an application may require a more custom way to create the INVITE without executing the default copying.
Proposal is to:
1) use createInvite(Address from, Address to, RequestModifier reqModifier) i.e. the signature that does not take an incoming INVITE
2) pass the incoming INVITE (oldInvite) to the reqModifier, so it can copy/remove/modify headers as appropriate.
(alternatively use createInvite(Address from, Address to) and modify the returned request.)
Note that the User-Agent and Server header manipulation will still be executed.
3) Call setRoutingDirective() to replace the NEW directive if appropriate.
4) Call setOriginalIncomingRequest(incomingInvite)
Currently setOriginalIncomingRequest() is private so this will need to be made public.
svn revision 2685.