Index: res/res_sip_endpoint_identifier_ip.c
===================================================================
--- res/res_sip_endpoint_identifier_ip.c	(revision 386331)
+++ res/res_sip_endpoint_identifier_ip.c	(working copy)
@@ -29,6 +30,38 @@
 #include "asterisk/module.h"
 #include "asterisk/acl.h"
 
+/*** DOCUMENTATION
+	<configInfo name="res_sip_endpoint_identifier_ip" language="en_US">
+		<synopsis>SIP Resource using PJProject</synopsis>
+		<description>
+			<para><emphasis>Transports</emphasis></para>
+			<para>There are two different transports and protocol derivatives
+			supported by <literal>res_sip</literal>. They are in order of
+			preference: UDP and TCP.</para>
+			<para>This library defines SIP devices and the most basic operations 
+			implementing the PJProject SIP libraries to achieve that.</para>
+			<warning>
+				<para>Multiple endpoints using the
+				same connection is <emphasis>NOT</emphasis> supported. Doing so
+				may result in broken calls.</para>
+			</warning>
+		</description>
+		<configFile name="res_sip.conf">
+			<configObject name="identify">
+				<configOption name="endpoint">
+					<synopsis>res_sip_endpoint_identifier_ip</synopsis>
+				</configOption>
+				<configOption name="match">
+					<synopsis>res_sip_endpoint_identifier_ip</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>res_sip_endpoint_identifier_ip</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+ ***/
+
 /*! \brief Structure for an IP identification matching object */
 struct ip_identify_match {
 	/*! \brief Sorcery object details */
Index: res/res_sip.c
===================================================================
--- res/res_sip.c	(revision 386331)
+++ res/res_sip.c	(working copy)
@@ -42,6 +42,445 @@
 	<support_level>core</support_level>
  ***/
 
+/*** DOCUMENTATION
+	<configInfo name="res_sip" language="en_US">
+		<synopsis>SIP Resource using PJProject</synopsis>
+		<configFile name="res_sip.conf">
+			<configObject name="endpoint">
+				<synopsis>The configuration for an endpoint.</synopsis>
+				<description>
+					<para>The <emphasis>Endpoint</emphasis> is the primay configuration object.
+						It contains the core SIP related options. Endpoints must be configured to use a
+						 <emphasis>transport</emphasis> object, or else it will be unable to 
+						 communicate.</para>
+				</description>
+				<configOption name="100rel" default="yes">
+					<synopsis>Allow support for RFC3262 provisional ACK tags</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="required" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="allow">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="aors">
+					<synopsis>AoR to be used with the endpoint.</synopsis>
+				</configOption>
+				<configOption name="auth">
+					<synopsis>Authentication to be used with the endpoint.</synopsis>
+				</configOption>
+				<configOption name="callerid">
+					<synopsis>Set the CallerID information for the endpoint.</synopsis>
+					<description>
+						<para>Must be in the format <literal>"Name" &lt;Num&gt;</literal>, 
+						can also just contain <literal>&lt;Num&gt;</literal>.</para>
+					</description>
+				</configOption>
+				<configOption name="callerid_privacy" default="">
+					<synopsis>Set the default privacy level for the endpoint.</synopsis>
+				</configOption>
+				<configOption name="callerid_tag" default="">
+					<synopsis>Set the internal id_tag for the endpoint.</synopsis>
+				</configOption>
+				<configOption name="trust_id_inbound" default="no">
+					<synopsis>Trust inbound CallerID information from the endpoint.</synopsis>
+				</configOption>
+				<configOption name="trust_id_outbound" default="no">
+					<synopsis>Trust outbound CallerID information with the endpoint.</synopsis>
+				</configOption>
+				<configOption name="send_pai" default="no">
+					<synopsis>Allow sending of the P-Asserted-Identity header with the endpoint.</synopsis>
+				</configOption>
+				<configOption name="send_rpid" default="no">
+					<synopsis>Allow sending of the Remote-Party-ID header to the endpoint.</synopsis>
+				</configOption>
+				<configOption name="contact">
+					<synopsis>Contact to be used with the endpoint.</synopsis>
+				</configOption>
+				<configOption name="context">
+					<synopsis>Dialplan context that incoming sessions from endpoint will be placed into.</synopsis>
+				</configOption>
+				<configOption name="default_expiration">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="direct_media_glare_mitigation" default="none">
+					<synopsis>Mitigation of direct media glare.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="none" />
+							<enum name="outgoing" />
+							<enum name="incoming" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="direct_media_method" default="invite">
+					<synopsis>Method to be used for setting up  Direct Media between endpoints.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="invite" />
+							<enum name="reinvite" />
+							<enum name="update" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="direct_media" default="yes">
+					<synopsis>Direct Media communication between endpoints allowed. </synopsis>
+					<description>
+						<enumlist>
+							<enum name="yes" />
+							<enum name="no" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="disable_direct_media_on_nat" default="no">
+					<synopsis>Disable Direct Media when NATed.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="disallow">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="dtmfmode" default="rfc4733">
+					<synopsis>Set DTMF mode for an endpoint.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="rfc4733">
+								<para>DTMF is sent out of band of the main audio stream.</para>
+							</enum>
+							<enum name="inband">
+								<para>DTMF is sent as part of audio stream.</para>
+							</enum>
+							<enum name="info">
+								<para>DTMF is sent as SIP INFO packets.</para>
+							</enum>
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="expiration_time">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="external_media_address">
+					<synopsis>config_transport</synopsis>
+				</configOption>
+				<configOption name="force_rport" default="yes">
+					<synopsis>res_sip</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="ice_support" default="no">
+					<synopsis>Support the ICE mechanism to determine NATness.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="identify_by">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="max_contacts">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="maximum_expiration">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="method">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="minimum_expiration">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="mohsuggest" default="default">
+					<synopsis>Music On Hold class to use for endpoint.</synopsis>
+				</configOption>
+				<configOption name="outbound_proxy">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="qualify_frequency" default="0">
+					<synopsis>Frequency to qualify an endpoint, value in seconds.</synopsis>
+				</configOption>
+				<configOption name="remove_existing">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="rewrite_contact">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="rtp_ipv6" default="no">
+					<synopsis>Allow use of IPv6 for RTP traffic.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="rtp_symmetric" default="no">
+					<synopsis>Enforce that RTP must be symmetric.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="timers_min_se" default="90">
+					<synopsis>Minimum session timers expiration period, value in seconds.</synopsis>
+				</configOption>
+				<configOption name="timers" default="yes">
+					<synopsis>Session timers for SIP packets</synopsis>
+					<description>
+						<enumlist>
+							<enum name="forced" />
+							<enum name="no" />
+							<enum name="required" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="timers_sess_expires" default="1800">
+					<synopsis>Maximum session timer expiration period, value in seconds.</synopsis>
+				</configOption>
+				<configOption name="transport">
+					<synopsis>Select the desired transport configuration.</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>Must be of type endpoint.</synopsis>
+				</configOption>
+				<configOption name="uri">
+					<synopsis>res_sip</synopsis>
+				</configOption>
+				<configOption name="use_ptime" default="no">
+					<synopsis>Use endpoints requested packetisation interval.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+			</configObject>
+			<configObject name="auth">
+				<synopsis>Authorization type.</synopsis>
+				<description>
+					<para>Put info here for 'auth' stuff </para>
+				</description>
+				<configOption name="auth_type" default="userpass">
+					<synopsis>Authorization type.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="md5">
+								<para>Use a MD5 hash for authorization.</para>
+							</enum>
+							<enum name="userpass">
+								<para>Use a plaintext password for authorization.</para>
+							</enum>
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="nonce_lifetime" default="32">
+					<synopsis>Lifetime of an authorization. Value is in seconds.</synopsis>
+				</configOption>
+				<configOption name="md5_cred">
+					<synopsis>MD5 Hash for use with authorization messages.</synopsis>
+				</configOption>
+				<configOption name="password">
+					<synopsis>PlainText password for use with authorization messages.</synopsis>
+				</configOption>
+				<configOption name="realm" default="asterisk">
+					<synopsis>SIP realm for endpoint.</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>Must be auth.</synopsis>
+				</configOption>
+				<configOption name="username">
+					<synopsis>SIP username to use for account.</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="nat_hook">
+				<synopsis>Stuff goes here</synopsis>
+				<description>
+					<para>Put info here for 'nat_hook' stuff </para>
+				</description>
+				<configOption name="external_media_address">
+					<synopsis>nat_hook</synopsis>
+				</configOption>
+				<configOption name="method">
+					<synopsis>nat_hook</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="domain_alias">
+				<synopsis>stuff</synopsis>
+				<description>
+					<para>Put info here for 'domain_alias' stuff </para>
+				</description>
+				<configOption name="type">
+					<synopsis>domain_alias</synopsis>
+				</configOption>
+				<configOption name="domain">
+					<synopsis>domain_alias</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="transport">
+				<synopsis>SIP Transport</synopsis>
+				<description>
+					<para><emphasis>Transports</emphasis></para>
+					<para>There are two different transports and protocol derivatives
+						supported by <literal>res_sip</literal>. They are in order of
+						preference: UDP and TCP.</para>
+					<para>This library defines SIP devices and the most basic operations 
+						implementing the PJProject SIP libraries to achieve that.</para>
+					<warning>
+						<para>Multiple endpoints using the same connection is 
+							<emphasis>NOT</emphasis> supported. Doing so may 
+							result in broken calls.</para>
+					</warning>
+				</description>
+				<configOption name="async_operations" default="1">
+					<synopsis>config_transport</synopsis>
+				</configOption>
+				<configOption name="bind">
+					<synopsis>Choose what IP to bind transport on.</synopsis>
+				</configOption>
+				<configOption name="ca_list_file">
+					<synopsis>File containing a list of certificates to read.</synopsis>
+				</configOption>
+				<configOption name="cert_file">
+					<synopsis>Certificate file for endpoint?.</synopsis>
+				</configOption>
+				<configOption name="cipher">
+					<synopsis>Set the preferred cipher when using TCP mode.</synopsis>
+				</configOption>
+				<configOption name="domain">
+					<synopsis>config_transport</synopsis>
+				</configOption>
+				<configOption name="external_media_address">
+					<synopsis>Address to use in RTP handling.</synopsis>
+				</configOption>
+				<configOption name="external_signaling_address" default="">
+					<synopsis>Specify specific external address for SIP signalling.</synopsis>
+				</configOption>
+				<configOption name="external_signaling_port" default="0">
+					<synopsis>Specify specific external port for SIP signalling.</synopsis>
+				</configOption>
+				<configOption name="localnet">
+					<synopsis>Network to consider local.</synopsis>
+				</configOption>
+				<configOption name="password">
+					<synopsis>Password required for transport.</synopsis>
+				</configOption>
+				<configOption name="privkey_file">
+					<synopsis>config_transport</synopsis>
+				</configOption>
+				<configOption name="protocol" default="udp">
+					<synopsis>Protocol to use for SIP traffic.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="udp" />
+							<enum name="tcp" />
+							<enum name="tls" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="require_client_cert" default="false">
+					<synopsis>Require client certificate.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="false" />
+							<enum name="true" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="type">
+					<synopsis>config_transport</synopsis>
+				</configOption>
+				<configOption name="verify_client" default="false">
+					<synopsis>Require verification of client certificate.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="false" />
+							<enum name="true" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="verify_server" default="false">
+					<synopsis>Require verification of server certificate.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="false" />
+							<enum name="true" />
+						</enumlist>
+					</description>
+				</configOption>
+			</configObject>
+			<configObject name="contact">
+				<synopsis>The configuration for a location of an endpoint.</synopsis>
+				<description>
+					<para>More descriptive 'contact' stuff.</para>
+				</description>
+				<configOption name="contact">
+					<synopsis>sip_location</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>sip_location</synopsis>
+				</configOption>
+				<configOption name="uri">
+					<synopsis>sip_location</synopsis>
+				</configOption>
+				<configOption name="expiration_time" default="NULL">
+					<synopsis>Time in seconds to keep alive a contact.</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="aor">
+				<synopsis>The configuration for a location of an endpoint.</synopsis>
+				<description>
+					<para>Describe AoR.</para>
+				</description>
+				<configOption name="contact">
+					<synopsis>sip_aor</synopsis>
+				</configOption>
+				<configOption name="default_expiration" default="3600">
+					<synopsis>Default keep alive time for an AoR, time in seconds.</synopsis>
+				</configOption>
+				<configOption name="minimum_expiration" default="60">
+					<synopsis>Minimum keep alive time for an AoR, time in seconds.</synopsis>
+				</configOption>
+				<configOption name="maximum_expiration" default="7200">
+					<synopsis>Maximum keep alive time for an AoR, time in seconds.</synopsis>
+				</configOption>
+				<configOption name="max_contacts" default="0">
+					<synopsis>Maximum number of contacts using an AoR.</synopsis>
+				</configOption>
+				<configOption name="remove_existing" default="no">
+					<synopsis>Should new contacts replace existing ones.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="no" />
+							<enum name="yes" />
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="type">
+					<synopsis>Type must be of type aor</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+ ***/
+
+
 static pjsip_endpoint *ast_pjsip_endpoint;
 
 static struct ast_threadpool *sip_threadpool;
Index: res/res_sip_acl.c
===================================================================
--- res/res_sip_acl.c	(revision 386331)
+++ res/res_sip_acl.c	(working copy)
@@ -31,6 +32,51 @@
 #include "asterisk/sorcery.h"
 #include "asterisk/acl.h"
 
+/*** DOCUMENTATION
+	<configInfo name="res_sip_acl" language="en_US">
+		<synopsis>SIP ACL module</synopsis>
+		<description>
+			<para><emphasis>Transports</emphasis></para>
+			<para>There are two different transports and protocol derivatives
+			supported by <literal>res_sip</literal>. They are in order of
+			preference: UDP and TCP.</para>
+			<para>This library defines SIP devices and the most basic operations 
+			implementing the PJProject SIP libraries to achieve that.</para>
+			<warning>
+				<para>Multiple endpoints using the
+				same connection is <emphasis>NOT</emphasis> supported. Doing so
+				may result in broken calls.</para>
+			</warning>
+		</description>
+		<configFile name="res_sip.conf">
+			<configObject name="acl">
+				<synopsis>The configuration for an endpoint.</synopsis>
+				<configOption name="acl">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="contactacl">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="contactdeny">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="contactpermit">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="deny">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="permit">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>res_sip_acl</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+ ***/
+
 struct sip_acl {
 	SORCERY_OBJECT(details);
 	struct ast_acl_list *acl;
Index: res/res_sip_outbound_registration.c
===================================================================
--- res/res_sip_outbound_registration.c	(revision 386331)
+++ res/res_sip_outbound_registration.c	(working copy)
@@ -29,6 +31,63 @@
 #include "asterisk/module.h"
 #include "asterisk/taskprocessor.h"
 
+/*** DOCUMENTATION
+	<configInfo name="res_sip_outbound_registration" language="en_US">
+		<synopsis>SIP Resource for Outbound Registrations using PJProject</synopsis>
+		<description>
+			<para><emphasis>Outbound Registration</emphasis></para>
+			<para>This module allows for registration to outbound SIP endpoints for 
+				<literal>res_sip</literal>.</para>
+			<para>This library defines SIP registration procedures and the operations for
+			implementing the PJProject SIP libraries to achieve that.</para>
+		</description>
+		<configFile name="res_sip.conf">
+			<configObject name="registration">
+				<synopsis>The configuration for outbound registration.</synopsis>
+				<configOption name="auth_rejection_permanent" default="yes">
+					<synopsis>Authentication challenges that we cannot handle as permanent failures.</synopsis>
+					<description>
+						<enumlist>
+							<enum name="yes"/>
+							<enum name="no"/>
+						</enumlist>
+					</description>
+				</configOption>
+				<configOption name="client_uri">
+					<synopsis>SIP URI for the client to register as.</synopsis>
+				</configOption>
+				<configOption name="contact_user">
+					<synopsis>Contact User to use in request.</synopsis>
+				</configOption>
+				<configOption name="expiration" default="3600">
+					<synopsis>Expiration time between re-registering. Time in seconds.</synopsis>
+				</configOption>
+				<configOption name="max_retries" default="10">
+					<synopsis>Maximum retries at registering.</synopsis>
+				</configOption>
+				<configOption name="outbound_auth" default="">
+					<synopsis>res_sip_outbound_registration.</synopsis>
+				</configOption>
+				<configOption name="outbound_proxy">
+					<synopsis>Set outbound proxy to direct registrations at.</synopsis>
+				</configOption>
+				<configOption name="retry_interval" default="60">
+					<synopsis>Interval between retries if outbound registration unsuccessful. Time in seconds.</synopsis>
+				</configOption>
+				<configOption name="server_uri">
+					<synopsis>SIP URI of the server to register against.</synopsis>
+				</configOption>
+				<configOption name="transport">
+					<synopsis>Explict transport to be used for outbound authentication.</synopsis>
+				</configOption>
+				<configOption name="type">
+					<synopsis>Must be of type registration.</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+ ***/
+
 /*! \brief Amount of buffer time (in seconds) before expiration that we re-register at */
 #define REREGISTER_BUFFER_TIME 10
 
