Modified: websites/production/camel/content/sip.html
==============================================================================
--- websites/production/camel/content/sip.html (original)
+++ websites/production/camel/content/sip.html Sat May 14 08:19:33 2016
@@ -85,97 +85,27 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Sip-SIPComponent">SIP 
Component</h2>
-
-<p><strong>Available as of Camel 2.5</strong></p>
-
-<p>The <strong>sip</strong> component in Camel is a communication component, 
based on the Jain SIP implementation (available under the JCP license).</p>
-
-<p>Session Initiation Protocol (SIP) is an IETF-defined signaling protocol, 
widely used for controlling multimedia communication sessions such as voice and 
video calls over Internet Protocol (IP).The SIP protocol is an Application 
Layer protocol designed to be independent of the underlying transport layer; it 
can run on Transmission Control Protocol (TCP), User Datagram Protocol (UDP) or 
Stream Control Transmission Protocol (SCTP). </p>
-
-<p>The Jain SIP implementation supports TCP and UDP only.</p>
-
-<p>The Camel SIP component <strong>only</strong> supports the SIP Publish and 
Subscribe capability as described in the <a shape="rect" class="external-link" 
href="http://www.ietf.org/rfc/rfc3903.txt"; rel="nofollow">RFC3903 - Session 
Initiation Protocol (SIP) Extension for Event</a></p>
-
-<p>This camel component supports both producer and consumer endpoints.</p>
-
-<p>Camel SIP Producers (Event Publishers) and SIP Consumers (Event 
Subscribers) communicate event &amp; state information to each other using an 
intermediary entity called a SIP Presence Agent (a stateful brokering 
entity).</p>
-
-<p>For SIP based communication, a SIP Stack with a listener 
<strong>must</strong> be instantiated on both the SIP Producer and Consumer 
(using separate ports if using localhost). This is necessary in order to 
support the handshakes &amp; acknowledgements exchanged between the SIP Stacks 
during communication.</p>
-
-<p>Maven users will need to add the following dependency to their 
<code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 id="Sip-SIPComponent">SIP 
Component</h2><p><strong>Available as of Camel 2.5</strong></p><p>The 
<strong>sip</strong> component in Camel is a communication component, based on 
the Jain SIP implementation (available under the JCP license).</p><p>Session 
Initiation Protocol (SIP) is an IETF-defined signaling protocol, widely used 
for controlling multimedia communication sessions such as voice and video calls 
over Internet Protocol (IP).The SIP protocol is an Application Layer protocol 
designed to be independent of the underlying transport layer; it can run on 
Transmission Control Protocol (TCP), User Datagram Protocol (UDP) or Stream 
Control Transmission Protocol (SCTP).</p><p>The Jain SIP implementation 
supports TCP and UDP only.</p><p>The Camel SIP component <strong>only</strong> 
supports the SIP Publish and Subscribe capability as described in the <a 
shape="rect" class="external-link" href="http://www.ietf.org/rfc/rfc3903.txt"; 
rel="nofollow"
 >RFC3903 - Session Initiation Protocol (SIP) Extension for 
 >Event</a></p><p>This camel component supports both producer and consumer 
 >endpoints.</p><p>Camel SIP Producers (Event Publishers) and SIP Consumers 
 >(Event Subscribers) communicate event &amp; state information to each other 
 >using an intermediary entity called a SIP Presence Agent (a stateful 
 >brokering entity).</p><p>For SIP based communication, a SIP Stack with a 
 >listener <strong>must</strong> be instantiated on both the SIP Producer and 
 >Consumer (using separate ports if using localhost). This is necessary in 
 >order to support the handshakes &amp; acknowledgements exchanged between the 
 >SIP Stacks during communication.</p><p>Maven users will need to add the 
 >following dependency to their <code>pom.xml</code> for this 
 >component:</p><div class="code panel pdl" style="border-width: 1px;"><div 
 >class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-sip&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<h3 id="Sip-URIformat">URI format</h3>
-
-<p>The URI scheme for a sip endpoint is as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-sip://johndoe@localhost:99999[?options]
+</div></div><h3 id="Sip-URIformat">URI format</h3><p>The URI scheme for a sip 
endpoint is as follows:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[sip://johndoe@localhost:99999[?options]
 sips://johndoe@localhost:99999/[?options]
 ]]></script>
-</div></div>
-
-<p>This component supports producer and consumer endpoints for both TCP and 
UDP.</p>
-
-<p>You can append query options to the URI in the following format, 
<code>?option=value&amp;option=value&amp;...</code></p>
-
-<h3 id="Sip-Options">Options</h3>
-
-<p>The SIP Component offers an extensive set of configuration options &amp; 
capability to create custom stateful headers needed to propagate state via the 
SIP protocol.</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>stackName</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>NAME_NOT_SET</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Name of the SIP Stack instance associated with an SIP 
Endpoint. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>transport</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>tcp</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Setting for choice of transport potocol. 
Valid choices are "tcp" or "udp". </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>fromUser</code> </p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Username of the message 
originator. <strong>Mandatory setting unless a registry based custom FromHeader 
is specified.</strong> </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>fromHost</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Hostname of the message originator. <strong>Mandatory 
setting unless a registry based FromHeader is specified</strong> 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>fromPort</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Port of the message originator. <strong>Mandatory 
setting unless a registry based FromHeader is specified</strong> 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <cod
 e>toUser</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Username of the message receiver. <strong>Mandatory 
setting unless a registry based custom ToHeader is specified.</strong> 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>toHost</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Hostname of the message receiver. <strong>Mandatory 
setting unless a registry based ToHeader is specified</strong> 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>toPort</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Portname of the message receiver. <strong>Mandatory 
setting unless a registry based ToHeader is specified</strong> 
</p></td></tr><tr><td colspan="1" rowspan="1" class="conflu
 enceTd"><p> <code>maxforwards</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> 0 </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> the number of intermediaries that may forward the 
message to the message receiver. <strong>Optional setting. May alternatively be 
set using as registry based MaxForwardsHeader</strong> </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>eventId</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Setting for a String based 
event Id. <strong>Mandatory setting unless a registry based FromHeader is 
specified</strong> </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>eventHeaderName</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Setting for a String based event Id. <strong>Mandatory 
setting unless a registr
 y based FromHeader is specified</strong> </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>maxMessageSize</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>1048576</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Setting for 
maximum allowed Message size in bytes. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>cacheConnections</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>consumer</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> This setting is used to 
 determine whether the kind of header (FromHeader,ToHeader etc) that needs to 
be created for this endpoint</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>automaticDialogSupport</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>off</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Setting to specify whether 
every communication should be associated with a dialog. </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>contentType</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>text</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Setting for 
contentType can be set to any valid MimeType. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>contentSubType</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>xml</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Setting for contentSubTyp
 e can be set to any valid MimeSubType. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>receiveTimeoutMillis</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>10000</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Setting for specifying amount of time to wait for a 
Response and/or Acknowledgement can be received from another SIP stack 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>useRouterForAllUris</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> This setting is used when requests are 
sent to the Presence Agent via a proxy. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>msgExpiration</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>3600</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> The amount of time a 
 message received at an endpoint is considered valid </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>presenceAgent</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>false</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> This setting is used to distingish between a Presence 
Agent &amp; 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. </p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="Sip-RegistrybasedOptions">Registry based Options</h3>
-
-<p>SIP requires a number of headers to be sent/received as part of a request. 
These SIP header can be enlisted in the <a shape="rect" 
href="registry.html">Registry</a>, such as in the Spring XML file.</p>
-
-<p>The values that could be passed in, are the following:</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>fromHeader</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> a custom Header 
object containing message originator settings. Must implement the type 
javax.sip.header.FromHeader </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>toHeader</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> a custom Header object containing message 
receiver settings. Must implement the type javax.sip.header.ToHeader 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>viaHeaders</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> 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) </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>contentTypeHeader</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> a custom Header 
object containing message content details. Must implement the type 
javax.sip.header.ContentTypeHeader </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>callIdHeader</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> a custom Header object 
containing call details. Must implement the type javax.sip.header.CallIdHeader 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>maxForwardsHeader</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> 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.h
 eader.MaxForwardsHeader </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>eventHeader</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> a custom Header object containing event 
details. Must implement the type javax.sip.header.EventHeader 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>contactHeader</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> an optional custom Header object containing verbose 
contact details (email, phone number etc). Must implement the type 
javax.sip.header.ContactHeader </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>expiresHeader</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> a custom Header object containing message 
expiration details. Must implement the type javax.sip.header.ExpiresHeader 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>extensionHeader</code> </p></td><td colspan="1" r
 owspan="1" class="confluenceTd"><p> a custom Header object containing 
user/application specific details. Must implement the type 
javax.sip.header.ExtensionHeader </p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="Sip-SendingMessagesto/fromaSIPendpoint">Sending Messages to/from a SIP 
endpoint</h3>
-
-<h4 id="Sip-CreatingaCamelSIPPublisher">Creating a Camel SIP Publisher</h4>
-
-<p>In the example below, a SIP Publisher is created to send SIP Event 
publications to <br clear="none">
-a user "agent@localhost:5152". This is the address of the SIP Presence Agent 
which acts as a broker between the SIP Publisher and Subscriber</p>
-<ul><li>using a SIP Stack named client</li><li>using a registry based 
eventHeader called evtHdrName</li><li>using a registry based eventId called 
evtId</li><li>from a SIP Stack with Listener set up as 
user2@localhost:3534</li><li>The Event being published is EVENT_A</li><li>A 
Mandatory Header called REQUEST_METHOD is set to Request.Publish thereby 
setting up the endpoint as a Event publisher"</li></ul>
-
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-producerTemplate.sendBodyAndHeader(  
+</div></div><p>This component supports producer and consumer endpoints for 
both TCP and UDP.</p><p>You can append query options to the URI in the 
following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 
id="Sip-Options">Options</h3><p>The SIP Component offers an extensive set of 
configuration options &amp; capability to create custom stateful headers needed 
to propagate state via the SIP protocol.</p><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>stackName</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>NAME_NOT_SET</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Name of the SIP Stack instance a
 ssociated with an SIP Endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>transport</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>tcp</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Setting for choice of transport potocol. 
Valid choices are "tcp" or "udp".</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>fromUser</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Username of the message originator. <strong>Mandatory 
setting unless a registry based custom FromHeader is 
specified.</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>fromHost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Hostname of the message originator. <strong>Mandatory 
setting unless a registry based FromHeader i
 s specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>fromPort</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Port of the message originator. <strong>Mandatory 
setting unless a registry based FromHeader is 
specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>toUser</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Username of the message receiver. <strong>Mandatory 
setting unless a registry based custom ToHeader is 
specified.</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>toHost</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Hostname of the message receiver. <strong>Mandatory 
setting unless a registry based ToHe
 ader is specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>toPort</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Portname of the message receiver. <strong>Mandatory 
setting unless a registry based ToHeader is 
specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxforwards</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>0</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>the number of intermediaries that may forward the 
message to the message receiver. <strong>Optional setting. May alternatively be 
set using as registry based MaxForwardsHeader</strong></p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>eventId</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Setting for a String 
 based event Id. <strong>Mandatory setting unless a registry based FromHeader 
is specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>eventHeaderName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Setting for a String based event Id. <strong>Mandatory 
setting unless a registry based FromHeader is 
specified</strong></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxMessageSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>1048576</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Setting for maximum allowed 
Message size in bytes.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheConnections</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Should connections be cach
 ed by the SipStack to reduce cost of connection creation. This is useful if 
the connection is used for long running conversations.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>consumer</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>This setting is used to determine whether 
the kind of header (FromHeader,ToHeader etc) that needs to be created for this 
endpoint</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>text</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Setting for contentType can be set to any 
valid MimeType.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentSubType</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>xml</code></p></td><td colspan="1" 
rowspan="1" class=
 "confluenceTd"><p>Setting for contentSubType can be set to any valid 
MimeSubType.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>receiveTimeoutMillis</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Setting for specifying amount 
of time to wait for a Response and/or Acknowledgement can be received from 
another SIP stack</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>useRouterForAllUris</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>This setting is used when 
requests are sent to the Presence Agent via a proxy.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>msgExpiration</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>3600</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"
 ><p>The amount of time a message received at an endpoint is considered 
 >valid</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>presenceAgent</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>This setting is used to 
 >distingish between a Presence Agent &amp; 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.</p></td></tr></tbody></table></div></div><h3 
 >id="Sip-RegistrybasedOptions">Registry based Options</h3><p>SIP requires a 
 >number of headers to be sent/received as part of a request. These SIP header 
 >can be enlisted in the <a shape="rect" href="registry.html">Registry</a>, 
 >such as in the Spring XML file.</p><p>The values that could be passed in, are 
 >the following:</p><div class="confluenceTableSmall"><div 
 >class="table-wrap"><table class="confluenceT
 able"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>fromHeader</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>a custom Header object 
containing message originator settings. Must implement the type 
javax.sip.header.FromHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>toHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>a custom Header object containing message 
receiver settings. Must implement the type 
javax.sip.header.ToHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>viaHeaders</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>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 automatical
 ly updated by each proxy when the request arrives at its 
listener)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contentTypeHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>a custom Header object containing message 
content details. Must implement the type 
javax.sip.header.ContentTypeHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>callIdHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>a custom Header object containing call 
details. Must implement the type 
javax.sip.header.CallIdHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maxForwardsHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>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</p></td></tr><tr><td colspan="1" rowspan="1" 
class="
 confluenceTd"><p><code>eventHeader</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>a custom Header object containing event details. Must 
implement the type javax.sip.header.EventHeader</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>contactHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>an optional custom Header object containing 
verbose contact details (email, phone number etc). Must implement the type 
javax.sip.header.ContactHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>expiresHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>a custom Header object containing message 
expiration details. Must implement the type 
javax.sip.header.ExpiresHeader</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>extensionHeader</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>a custom Header object containing 
user/application speci
 fic details. Must implement the type 
javax.sip.header.ExtensionHeader</p></td></tr></tbody></table></div></div><h3 
id="Sip-SendingMessagesto/fromaSIPendpoint">Sending Messages to/from a SIP 
endpoint</h3><h4 id="Sip-CreatingaCamelSIPPublisher">Creating a Camel SIP 
Publisher</h4><p>In the example below, a SIP Publisher is created to send SIP 
Event publications to <br clear="none"> a user "agent@localhost:5152". This is 
the address of the SIP Presence Agent which acts as a broker between the SIP 
Publisher and Subscriber</p><ul><li>using a SIP Stack named 
client</li><li>using a registry based eventHeader called 
evtHdrName</li><li>using a registry based eventId called evtId</li><li>from a 
SIP Stack with Listener set up as user2@localhost:3534</li><li>The Event being 
published is EVENT_A</li><li>A Mandatory Header called REQUEST_METHOD is set to 
Request.Publish thereby setting up the endpoint as a Event 
publisher"</li></ul><div class="code panel pdl" style="border-width: 1px;"><div 
class=
 "codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[producerTemplate.sendBodyAndHeader(  
     
&quot;sip://agent@localhost:5152?stackName=client&amp;eventHeaderName=evtHdrName&amp;eventId=evtid&amp;fromUser=user2&amp;fromHost=localhost&amp;fromPort=3534&quot;,
   
     &quot;EVENT_A&quot;,  
     &quot;REQUEST_METHOD&quot;,   
     Request.PUBLISH);  
 ]]></script>
-</div></div>
-
-<h4 id="Sip-CreatingaCamelSIPSubscriber">Creating a Camel SIP Subscriber</h4>
-
-<p>In the example below, a SIP Subscriber is created to receive SIP Event 
publications sent to <br clear="none">
-a user "johndoe@localhost:5154"</p>
-<ul><li>using a SIP Stack named Subscriber</li><li>registering with a Presence 
Agent user called agent@localhost:5152</li><li>using a registry based 
eventHeader called evtHdrName. The evtHdrName contains the Event which is se to 
"Event_A"</li><li>using a registry based eventId called evtId</li></ul>
-
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-@Override  
+</div></div><h4 id="Sip-CreatingaCamelSIPSubscriber">Creating a Camel SIP 
Subscriber</h4><p>In the example below, a SIP Subscriber is created to receive 
SIP Event publications sent to <br clear="none"> a user 
"johndoe@localhost:5154"</p><ul><li>using a SIP Stack named 
Subscriber</li><li>registering with a Presence Agent user called 
agent@localhost:5152</li><li>using a registry based eventHeader called 
evtHdrName. The evtHdrName contains the Event which is se to 
"Event_A"</li><li>using a registry based eventId called evtId</li></ul><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@Override  
 protected RouteBuilder createRouteBuilder() throws Exception {  
     return new RouteBuilder() {  
         @Override  
@@ -193,11 +123,7 @@ protected RouteBuilder createRouteBuilde
     };  
 }  
 ]]></script>
-</div></div>
-
-<p><strong>The Camel SIP component also ships with a Presence Agent that is 
meant to be used for Testing and Demo purposes only.</strong> An example of 
instantiating a Presence Agent is given above. </p>
-
-<p>Note that the Presence Agent is set up as a user agent@localhost:5152 and 
is capable of communicating with both Publisher as well as Subscriber. It has a 
separate SIP stackName distinct from Publisher as well as Subscriber. While it 
is set up as a Camel Consumer, it does not actually send any messages along the 
route to the endpoint "mock:neverland".</p></div>
+</div></div><p><strong>The Camel SIP component also ships with a Presence 
Agent that is meant to be used for Testing and Demo purposes only.</strong> An 
example of instantiating a Presence Agent is given above.</p><p>Note that the 
Presence Agent is set up as a user agent@localhost:5152 and is capable of 
communicating with both Publisher as well as Subscriber. It has a separate SIP 
stackName distinct from Publisher as well as Subscriber. While it is set up as 
a Camel Consumer, it does not actually send any messages along the route to the 
endpoint "mock:neverland".</p></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to