Package net.datafaker.providers.base
Class Sip
Faker class for generating Session Initiation Protocol (SIP) related data.
- Since:
- 0.8.0
- Author:
- TomerFi
-
Field Summary
Fields inherited from class net.datafaker.providers.base.AbstractProvider
faker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Body example of SDP type can be found in https://tools.ietf.org/html/rfc5621.Body example of SDP type can be found in https://tools.ietf.org/html/rfc5621.intClient error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Client error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Content types are based on https://tools.ietf.org/html/rfc5621 and https://tools.ietf.org/html/rfc3261.intGlobal error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Server error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.intGet a 4 digit random port for SIP messaging.method()The various SIP methods are listed in https://en.wikipedia.org/wiki/Session_Initiation_Protocol.Return a valid name address to use withto/fromheaders.intProvisional code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Provisional phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.intRedirection code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Redirection phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.intrtpPort()Get a 5 digit positive even port for rtp udp communication.intServer error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Server error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.intSuccess code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Success phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.Methods inherited from class net.datafaker.providers.base.AbstractProvider
equals, getFaker, hashCode, loadGenerators, resolve, resolve, toString
-
Constructor Details
-
Sip
-
-
Method Details
-
method
The various SIP methods are listed in https://en.wikipedia.org/wiki/Session_Initiation_Protocol.- Returns:
- a SIP method String, e.g.
INVITE.
-
contentType
Content types are based on https://tools.ietf.org/html/rfc5621 and https://tools.ietf.org/html/rfc3261.- Returns:
- a SIP content-type declaration String, e.g.
application/sdp
-
messagingPort
public int messagingPort()Get a 4 digit random port for SIP messaging.- Returns:
- a SIP messaging port int, e.g. 5060.
-
rtpPort
public int rtpPort()Get a 5 digit positive even port for rtp udp communication.- Returns:
- an RTP UDP 5 digit port int, e.g. 40002.
-
provisionalResponseCode
public int provisionalResponseCode()Provisional code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP provision response code between 100 and 199 int, e.g.
180.
-
successResponseCode
public int successResponseCode()Success code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP success response code between 200 and 299 int, e.g.
200.
-
redirectResponseCode
public int redirectResponseCode()Redirection code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP redirection response code between 300 and 399 int, e.g.
301.
-
clientErrorResponseCode
public int clientErrorResponseCode()Client error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP client error response code between 400 and 499 int, e.g.
486.
-
serverErrorResponseCode
public int serverErrorResponseCode()Server error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP server error response code between 500 and 599 int, e.g.
503.
-
globalErrorResponseCode
public int globalErrorResponseCode()Global error code, the various response codes are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a 3 digit SIP global error response code between 600 and 699 int, e.g.
608.
-
provisionalResponsePhrase
Provisional phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP provisional response phrase String, e.g.
Ringing.
-
successResponsePhrase
Success phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP success response phrase String, e.g.
OK.
-
redirectResponsePhrase
Redirection phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP redirection response phrase String, e.g.
Moved Permanently.
-
clientErrorResponsePhrase
Client error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP client error response phrase String, e.g.
Busy Here.
-
serverErrorResponsePhrase
Server error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP server error response phrase String, e.g.
Service Unavailable.
-
globalErrorResponsePhrase
Server error phrase, the various response phrases are listed in https://en.wikipedia.org/wiki/List_of_SIP_response_codes.- Returns:
- a SIP global error response phrase String, e.g.
Rejected.
-
bodyString
Body example of SDP type can be found in https://tools.ietf.org/html/rfc5621.- Returns:
- a fake SDP type SIP body String.
-
bodyBytes
public byte[] bodyBytes()Body example of SDP type can be found in https://tools.ietf.org/html/rfc5621.- Returns:
- a fake SDP type SIP body byte array.
-
nameAddress
Return a valid name address to use withto/fromheaders.- Returns:
- a valid name address String, e.g.
<sip:fakeName@10.1.2.3:5060>.
-