public static class SipRequest.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
SipRequest |
build()
Build a new
SipRequest. |
SipRequest.Builder |
callId(CallIdHeader callId) |
SipRequest.Builder |
contact(ContactHeader contact) |
SipRequest.Builder |
cseq(CSeqHeader cseq) |
SipRequest.Builder |
from(FromHeader from) |
SipRequest.Builder |
to(ToHeader to) |
SipRequest.Builder |
via(ViaHeader via)
Add a via header to this request.
|
public SipRequest.Builder to(ToHeader to)
public SipRequest.Builder from(FromHeader from)
public SipRequest.Builder callId(CallIdHeader callId)
public SipRequest.Builder contact(ContactHeader contact)
public SipRequest.Builder cseq(CSeqHeader cseq)
public SipRequest.Builder via(ViaHeader via)
ViaHeaders being added to this
request.via - public SipRequest build() throws SipParseException
SipRequest. The only mandatory value is the request-uri and the
From-address. The following headers will be generated with default values unless
specified:
To will be based off of the request-uri (user and host)CSeq will be set to 0 METHOD, e.g. 0 INVITEMax-Forwards will be set to 70Call-ID will automatically be generatedContactHeader will automatically be generated since it is impossible to
figure out a default value that actually will work. If you are building your own SIP
stack you should set the ContactHeader in the transport layer before you send it
off.SipParseExceptionCopyright © 2017. All Rights Reserved.