Package org.apache.camel.component.sip
Class SipConfiguration
- java.lang.Object
-
- org.apache.camel.component.sip.SipConfiguration
-
@UriParams public class SipConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description SipConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.sip.message.RequestcreateSipRequest(long sequenceNumber, String requestMethod, Object body)javax.sip.address.AddressFactorygetAddressFactory()javax.sip.header.CallIdHeadergetCallIdHeader()SipComponentgetComponent()javax.sip.header.ContactHeadergetContactHeader()StringgetContentSubType()StringgetContentType()javax.sip.header.ContentTypeHeadergetContentTypeHeader()javax.sip.header.EventHeadergetEventHeader()StringgetEventHeaderName()StringgetEventId()javax.sip.header.ExpiresHeadergetExpiresHeader()javax.sip.header.ExtensionHeadergetExtensionHeader()javax.sip.header.FromHeadergetFromHeader()StringgetFromHost()intgetFromPort()StringgetFromUser()javax.sip.header.HeaderFactorygetHeaderFactory()StringgetImplementationDebugLogFile()StringgetImplementationServerLogFile()StringgetImplementationTraceLevel()javax.sip.ListeningPointgetListeningPoint()intgetMaxForwards()javax.sip.header.MaxForwardsHeadergetMaxForwardsHeader()intgetMaxMessageSize()javax.sip.message.MessageFactorygetMessageFactory()intgetMsgExpiration()Map<String,Object>getParameters()longgetReceiveTimeoutMillis()javax.sip.SipFactorygetSipFactory()javax.sip.SipStackgetSipStack()javax.sip.address.SipURIgetSipUri()StringgetStackName()javax.sip.header.ToHeadergetToHeader()StringgetToHost()intgetToPort()StringgetToUser()StringgetTransport()URIgetUri()List<javax.sip.header.ViaHeader>getViaHeaders()voidinitialize(URI uri, Map<String,Object> parameters, SipComponent component)booleanisCacheConnections()booleanisConsumer()booleanisPresenceAgent()booleanisUseRouterForAllUris()voidparseURI()voidsetAddressFactory(javax.sip.address.AddressFactory addressFactory)To use a custom AddressFactoryvoidsetCacheConnections(boolean cacheConnections)Should connections be cached by the SipStack to reduce cost of connection creation.voidsetCallIdHeader(javax.sip.header.CallIdHeader callIdHeader)A custom Header object containing call details.voidsetComponent(SipComponent component)voidsetConsumer(boolean consumer)This setting is used to determine whether the kind of header (FromHeader,ToHeader etc) that needs to be created for this endpointvoidsetContactHeader(javax.sip.header.ContactHeader contactHeader)An optional custom Header object containing verbose contact details (email, phone number etc).voidsetContentSubType(String contentSubType)Setting for contentSubType can be set to any valid MimeSubType.voidsetContentType(String contentType)Setting for contentType can be set to any valid MimeType.voidsetContentTypeHeader(javax.sip.header.ContentTypeHeader contentTypeHeader)A custom Header object containing message content details.voidsetEventHeader(javax.sip.header.EventHeader eventHeader)A custom Header object containing event details.voidsetEventHeaderName(String eventHeaderName)Setting for a String based event type.voidsetEventId(String eventId)Setting for a String based event Id.voidsetExpiresHeader(javax.sip.header.ExpiresHeader expiresHeader)A custom Header object containing message expiration details.voidsetExtensionHeader(javax.sip.header.ExtensionHeader extensionHeader)A custom Header object containing user/application specific details.voidsetFromHeader(javax.sip.header.FromHeader fromHeader)A custom Header object containing message originator settings.voidsetFromHost(String fromHost)Hostname of the message originator.voidsetFromPort(int fromPort)Port of the message originator.voidsetFromUser(String fromUser)Username of the message originator.voidsetHeaderFactory(javax.sip.header.HeaderFactory headerFactory)To use a custom HeaderFactoryvoidsetImplementationDebugLogFile(String implementationDebugLogFile)Name of client debug log file to use for loggingvoidsetImplementationServerLogFile(String implementationServerLogFile)Name of server log file to use for loggingvoidsetImplementationTraceLevel(String implementationTraceLevel)Logging level for tracingvoidsetListeningPoint(javax.sip.ListeningPoint listeningPoint)To use a custom ListeningPoint implementationvoidsetMaxForwards(int maxForwards)Number of maximum proxy forwardsvoidsetMaxForwardsHeader(javax.sip.header.MaxForwardsHeader maxForwardsHeader)A custom Header object containing details on maximum proxy forwards.voidsetMaxMessageSize(int maxMessageSize)Setting for maximum allowed Message size in bytes.voidsetMessageFactory(javax.sip.message.MessageFactory messageFactory)To use a custom MessageFactoryvoidsetMsgExpiration(int msgExpiration)The amount of time a message received at an endpoint is considered validvoidsetParameters(Map<String,Object> parameters)voidsetPresenceAgent(boolean presenceAgent)This setting is used to distinguish between a Presence Agent and a consumer.voidsetReceiveTimeoutMillis(long receiveTimeoutMillis)Setting for specifying amount of time to wait for a Response and/or Acknowledgement can be received from another SIP stackvoidsetSipFactory(javax.sip.SipFactory sipFactory)To use a custom SipFactory to create the SipStack to be usedvoidsetSipStack(javax.sip.SipStack sipStack)To use a custom SipStackvoidsetSipUri(javax.sip.address.SipURI sipUri)To use a custom SipURI.voidsetStackName(String stackName)Name of the SIP Stack instance associated with an SIP Endpoint.voidsetToHeader(javax.sip.header.ToHeader toHeader)A custom Header object containing message receiver settings.voidsetToHost(String toHost)Hostname of the message receiver.voidsetToPort(int toPort)Portname of the message receiver.voidsetToUser(String toUser)Username of the message receiver.voidsetTransport(String transport)Setting for choice of transport protocol.voidsetUri(URI uri)URI of the SIP server to connect to (the username and password can be included such as: john:secret@myserver:9999)voidsetUseRouterForAllUris(boolean useRouterForAllUris)This setting is used when requests are sent to the Presence Agent via a proxy.voidsetViaHeaders(List<javax.sip.header.ViaHeader> viaHeaders)List of custom Header objects of the type javax.sip.header.ViaHeader.
-
-
-
Method Detail
-
initialize
public void initialize(URI uri, Map<String,Object> parameters, SipComponent component)
-
createSipRequest
public javax.sip.message.Request createSipRequest(long sequenceNumber, String requestMethod, Object body) throws ParseException, javax.sip.InvalidArgumentException- Throws:
ParseExceptionjavax.sip.InvalidArgumentException
-
getAddressFactory
public javax.sip.address.AddressFactory getAddressFactory()
-
setAddressFactory
public void setAddressFactory(javax.sip.address.AddressFactory addressFactory)
To use a custom AddressFactory
-
getMessageFactory
public javax.sip.message.MessageFactory getMessageFactory()
-
setMessageFactory
public void setMessageFactory(javax.sip.message.MessageFactory messageFactory)
To use a custom MessageFactory
-
getHeaderFactory
public javax.sip.header.HeaderFactory getHeaderFactory()
-
setHeaderFactory
public void setHeaderFactory(javax.sip.header.HeaderFactory headerFactory)
To use a custom HeaderFactory
-
getSipStack
public javax.sip.SipStack getSipStack()
-
setSipStack
public void setSipStack(javax.sip.SipStack sipStack)
To use a custom SipStack
-
getSipUri
public javax.sip.address.SipURI getSipUri()
-
setSipUri
public void setSipUri(javax.sip.address.SipURI sipUri)
To use a custom SipURI. If none configured, then the SipUri fallback to use the options toUser toHost:toPort
-
getStackName
public String getStackName()
-
setStackName
public void setStackName(String stackName)
Name of the SIP Stack instance associated with an SIP Endpoint.
-
getTransport
public String getTransport()
-
setTransport
public void setTransport(String transport)
Setting for choice of transport protocol. Valid choices are "tcp" or "udp".
-
getMaxMessageSize
public int getMaxMessageSize()
-
setMaxMessageSize
public void setMaxMessageSize(int maxMessageSize)
Setting for maximum allowed Message size in bytes.
-
isCacheConnections
public boolean isCacheConnections()
-
setCacheConnections
public void setCacheConnections(boolean cacheConnections)
Should connections be cached by the SipStack to reduce cost of connection creation. This is useful if the connection is used for long running conversations.
-
getListeningPoint
public javax.sip.ListeningPoint getListeningPoint()
-
setListeningPoint
public void setListeningPoint(javax.sip.ListeningPoint listeningPoint)
To use a custom ListeningPoint implementation
-
setContentType
public void setContentType(String contentType)
Setting for contentType can be set to any valid MimeType.
-
getContentType
public String getContentType()
-
setContentSubType
public void setContentSubType(String contentSubType)
Setting for contentSubType can be set to any valid MimeSubType.
-
getContentSubType
public String getContentSubType()
-
setMaxForwards
public void setMaxForwards(int maxForwards)
Number of maximum proxy forwards
-
getMaxForwards
public int getMaxForwards()
-
setReceiveTimeoutMillis
public void setReceiveTimeoutMillis(long receiveTimeoutMillis)
Setting for specifying amount of time to wait for a Response and/or Acknowledgement can be received from another SIP stack
-
getReceiveTimeoutMillis
public long getReceiveTimeoutMillis()
-
setComponent
public void setComponent(SipComponent component)
-
getComponent
public SipComponent getComponent()
-
getImplementationServerLogFile
public String getImplementationServerLogFile()
-
setImplementationServerLogFile
public void setImplementationServerLogFile(String implementationServerLogFile)
Name of server log file to use for logging
-
getImplementationDebugLogFile
public String getImplementationDebugLogFile()
-
setImplementationDebugLogFile
public void setImplementationDebugLogFile(String implementationDebugLogFile)
Name of client debug log file to use for logging
-
getImplementationTraceLevel
public String getImplementationTraceLevel()
-
setImplementationTraceLevel
public void setImplementationTraceLevel(String implementationTraceLevel)
Logging level for tracing
-
getSipFactory
public javax.sip.SipFactory getSipFactory()
-
setSipFactory
public void setSipFactory(javax.sip.SipFactory sipFactory)
To use a custom SipFactory to create the SipStack to be used
-
getFromUser
public String getFromUser()
-
setFromUser
public void setFromUser(String fromUser)
Username of the message originator. Mandatory setting unless a registry based custom FromHeader is specified.
-
getFromHost
public String getFromHost()
-
setFromHost
public void setFromHost(String fromHost)
Hostname of the message originator. Mandatory setting unless a registry based FromHeader is specified
-
getFromPort
public int getFromPort()
-
setFromPort
public void setFromPort(int fromPort)
Port of the message originator. Mandatory setting unless a registry based FromHeader is specified
-
getToUser
public String getToUser()
-
setToUser
public void setToUser(String toUser)
Username of the message receiver. Mandatory setting unless a registry based custom ToHeader is specified.
-
getToHost
public String getToHost()
-
setToHost
public void setToHost(String toHost)
Hostname of the message receiver. Mandatory setting unless a registry based ToHeader is specified
-
getToPort
public int getToPort()
-
setToPort
public void setToPort(int toPort)
Portname of the message receiver. Mandatory setting unless a registry based ToHeader is specified
-
getFromHeader
public javax.sip.header.FromHeader getFromHeader()
-
setFromHeader
public void setFromHeader(javax.sip.header.FromHeader fromHeader)
A custom Header object containing message originator settings. Must implement the type javax.sip.header.FromHeader
-
getToHeader
public javax.sip.header.ToHeader getToHeader()
-
setToHeader
public void setToHeader(javax.sip.header.ToHeader toHeader)
A custom Header object containing message receiver settings. Must implement the type javax.sip.header.ToHeader
-
getViaHeaders
public List<javax.sip.header.ViaHeader> getViaHeaders()
-
setViaHeaders
public void setViaHeaders(List<javax.sip.header.ViaHeader> viaHeaders)
List of custom Header objects of the type javax.sip.header.ViaHeader. Each ViaHeader containing a proxy address for request forwarding. (Note this header is automatically updated by each proxy when the request arrives at its listener)
-
getContentTypeHeader
public javax.sip.header.ContentTypeHeader getContentTypeHeader()
-
setContentTypeHeader
public void setContentTypeHeader(javax.sip.header.ContentTypeHeader contentTypeHeader)
A custom Header object containing message content details. Must implement the type javax.sip.header.ContentTypeHeader
-
getCallIdHeader
public javax.sip.header.CallIdHeader getCallIdHeader()
-
setCallIdHeader
public void setCallIdHeader(javax.sip.header.CallIdHeader callIdHeader)
A custom Header object containing call details. Must implement the type javax.sip.header.CallIdHeader
-
getMaxForwardsHeader
public javax.sip.header.MaxForwardsHeader getMaxForwardsHeader()
-
setMaxForwardsHeader
public void setMaxForwardsHeader(javax.sip.header.MaxForwardsHeader maxForwardsHeader)
A custom Header object containing details on maximum proxy forwards. This header places a limit on the viaHeaders possible. Must implement the type javax.sip.header.MaxForwardsHeader
-
getContactHeader
public javax.sip.header.ContactHeader getContactHeader()
-
setContactHeader
public void setContactHeader(javax.sip.header.ContactHeader contactHeader)
An optional custom Header object containing verbose contact details (email, phone number etc). Must implement the type javax.sip.header.ContactHeader
-
getExtensionHeader
public javax.sip.header.ExtensionHeader getExtensionHeader()
-
setExtensionHeader
public void setExtensionHeader(javax.sip.header.ExtensionHeader extensionHeader)
A custom Header object containing user/application specific details. Must implement the type javax.sip.header.ExtensionHeader
-
setUri
public void setUri(URI uri)
URI of the SIP server to connect to (the username and password can be included such as: john:secret@myserver:9999)
-
getUri
public URI getUri()
-
setConsumer
public void setConsumer(boolean consumer)
This setting is used to determine whether the kind of header (FromHeader,ToHeader etc) that needs to be created for this endpoint
-
isConsumer
public boolean isConsumer()
-
setEventHeader
public void setEventHeader(javax.sip.header.EventHeader eventHeader)
A custom Header object containing event details. Must implement the type javax.sip.header.EventHeader
-
getEventHeader
public javax.sip.header.EventHeader getEventHeader()
-
setEventHeaderName
public void setEventHeaderName(String eventHeaderName)
Setting for a String based event type.
-
getEventHeaderName
public String getEventHeaderName()
-
setEventId
public void setEventId(String eventId)
Setting for a String based event Id. Mandatory setting unless a registry based FromHeader is specified
-
getEventId
public String getEventId()
-
setUseRouterForAllUris
public void setUseRouterForAllUris(boolean useRouterForAllUris)
This setting is used when requests are sent to the Presence Agent via a proxy.
-
isUseRouterForAllUris
public boolean isUseRouterForAllUris()
-
getMsgExpiration
public int getMsgExpiration()
-
setMsgExpiration
public void setMsgExpiration(int msgExpiration)
The amount of time a message received at an endpoint is considered valid
-
getExpiresHeader
public javax.sip.header.ExpiresHeader getExpiresHeader()
-
setExpiresHeader
public void setExpiresHeader(javax.sip.header.ExpiresHeader expiresHeader)
A custom Header object containing message expiration details. Must implement the type javax.sip.header.ExpiresHeader
-
isPresenceAgent
public boolean isPresenceAgent()
-
setPresenceAgent
public void setPresenceAgent(boolean presenceAgent)
This setting is used to distinguish between a Presence Agent and a consumer. This is due to the fact that the SIP Camel component ships with a basic Presence Agent (for testing purposes only). Consumers have to set this flag to true.
-
-