[asterisk-commits] oej: trunk r215110 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 1 09:40:47 CDT 2009
Author: oej
Date: Tue Sep 1 09:40:42 2009
New Revision: 215110
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215110
Log:
Removing whitespace that causes red dots in reviewboard
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=215110&r1=215109&r2=215110
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Sep 1 09:40:42 2009
@@ -32,7 +32,7 @@
* \note TCP/TLS support is EXPERIMENTAL and WILL CHANGE. This applies to configuration
* settings, dialplan commands and dialplans apps/functions
* See \ref sip_tcp_tls
- *
+ *
*
* ******** General TODO:s
* \todo Better support of forking
@@ -40,7 +40,7 @@
* \todo Transaction support
* \todo Asterisk should send a non-100 provisional response every minute to keep proxies
* from cancelling the transaction (RFC 3261 13.3.1.1). See bug #11157.
- *
+ *
* ******** Wishlist: Improvements
* - Support of SIP domains for devices, so that we match on username at domain in the From: header
* - Connect registrations with a specific device on the incoming call. It's not done
@@ -68,7 +68,7 @@
* sipsock_read() for udp only. In tcp, packets are read by the tcp_helper thread.
* sipsock_read() function parses the packet and matches an existing
* dialog or starts a new SIP dialog.
- *
+ *
* sipsock_read sends the packet to handle_incoming(), that parses a bit more.
* If it is a response to an outbound request, the packet is sent to handle_response().
* If it is a request, handle_incoming() sends it to one of a list of functions
@@ -83,28 +83,28 @@
* the sip_answer() function is called.
*
* The actual media - Video or Audio - is mostly handled by the RTP subsystem
- * in rtp.c
- *
+ * in rtp.c
+ *
* \par Outbound calls
* Outbound calls are set up by the PBX through the sip_request_call()
* function. After that, they are activated by sip_call().
- *
+ *
* \par Hanging up
* The PBX issues a hangup on both incoming and outgoing calls through
* the sip_hangup() function
*/
-/*!
+/*!
* \page sip_tcp_tls SIP TCP and TLS support
- *
+ *
* \par tcpfixes TCP implementation changes needed
* \todo Fix TCP/TLS handling in dialplan, SRV records, transfers and much more
* \todo Save TCP/TLS sessions in registry
* If someone registers a SIPS uri, this forces us to set up a TLS connection back.
* \todo Add TCP/TLS information to function SIPPEER and SIPCHANINFO
* \todo If tcpenable=yes, we must open a TCP socket on the same address as the IP for UDP.
- * The tcpbindaddr config option should only be used to open ADDITIONAL ports
- * So we should propably go back to
+ * The tcpbindaddr config option should only be used to open ADDITIONAL ports
+ * So we should propably go back to
* bindaddr= the default address to bind to. If tcpenable=yes, then bind this to both udp and TCP
* if tlsenable=yes, open TLS port (provided we also have cert)
* tcpbindaddr = extra address for additional TCP connections
@@ -113,11 +113,11 @@
* These three options should take multiple IP/port pairs
* Note: Since opening additional listen sockets is a *new* feature we do not have today
* the XXXbindaddr options needs to be disabled until we have support for it
- *
+ *
* \todo re-evaluate the transport= setting in sip.conf. This is right now not well
* thought of. If a device in sip.conf contacts us via TCP, we should not switch transport,
* even if udp is the configured first transport.
- *
+ *
* \todo Be prepared for one outbound and another incoming socket per pvt. This applies
* specially to communication with other peers (proxies).
* \todo We need to test TCP sessions with SIP proxies and in regards
@@ -137,7 +137,7 @@
* \todo Default transports are set to UDP, which cause the wrong behaviour when contacting remote
* devices directly from the dialplan. UDP is only a fallback if no other method works,
* in order to be compatible with RFC2543 (SIP/1.0) devices. For transactions that exceed the
- * MTU (like INIVTE with video, audio and RTT) TCP should be preferred.
+ * MTU (like INIVTE with video, audio and RTT) TCP should be preferred.
*
* When dialling unconfigured peers (with no port number) or devices in external domains
* NAPTR records MUST be consulted to find configured transport. If they are not found,
@@ -150,7 +150,7 @@
* __set_address_from_contact(const char *fullcontact, struct sockaddr_in *sin, int tcp)
* - sets TLS port as default for all TCP connections, unless other port is given in contact.
* parse_register_contact(struct sip_pvt *pvt, struct sip_peer *peer, struct sip_request *req)
- * - assumes that the contact the UA registers is using the same transport as the REGISTER request, which is
+ * - assumes that the contact the UA registers is using the same transport as the REGISTER request, which is
* a bad guess.
* - Does not save any information about TCP/TLS connected devices, which is a severe BUG, as discussed on the mailing list.
* get_destination(struct sip_pvt *p, struct sip_request *oreq)
@@ -191,9 +191,9 @@
made by remote end-points. A remote end-point can request Asterisk to engage
session-timers by either sending it an INVITE request with a "Supported: timer"
header in it or by responding to Asterisk's INVITE with a 200 OK that contains
- Session-Expires: header in it. In this mode, the Asterisk server does not
+ Session-Expires: header in it. In this mode, the Asterisk server does not
request session-timers from remote end-points. This is the default mode.
- 2. Originate :: In the "originate" mode, the Asterisk server requests the remote
+ 2. Originate :: In the "originate" mode, the Asterisk server requests the remote
end-points to activate session-timers in addition to honoring such requests
made by the remote end-pints. In order to get as much protection as possible
against hanging SIP channels due to network or end-point failures, Asterisk
@@ -202,7 +202,7 @@
3. Refuse :: In the "refuse" mode, Asterisk acts as if it does not support session-
timers for inbound or outbound requests. If a remote end-point requests
session-timers in a dialog, then Asterisk ignores that request unless it's
- noted as a requirement (Require: header), in which case the INVITE is
+ noted as a requirement (Require: header), in which case the INVITE is
rejected with a 420 Bad Extension response.
*/
@@ -245,15 +245,15 @@
#include "asterisk/utils.h"
#include "asterisk/file.h"
#include "asterisk/astobj.h"
-/*
+/*
Uncomment the define below, if you are having refcount related memory leaks.
With this uncommented, this module will generate a file, /tmp/refs, which contains
a history of the ao2_ref() calls. To be useful, all calls to ao2_* functions should
- be modified to ao2_t_* calls, and include a tag describing what is happening with
+ be modified to ao2_t_* calls, and include a tag describing what is happening with
enough detail, to make pairing up a reference count increment with its corresponding decrement.
The refcounter program in utils/ can be invaluable in highlighting objects that are not
balanced, along with the complete history for that object.
- In normal operation, the macros defined will throw away the tags, so they do not
+ In normal operation, the macros defined will throw away the tags, so they do not
affect the speed of the program at all. They can be considered to be documentation.
*/
/* #define REF_DEBUG 1 */
@@ -317,9 +317,9 @@
<parameter name="Header" required="false" />
</syntax>
<description>
- <para>SIPRemoveHeader() allows you to remove headers which were previously
- added with SIPAddHeader(). If no parameter is supplied, all previously added
- headers will be removed. If a parameter is supplied, only the matching headers
+ <para>SIPRemoveHeader() allows you to remove headers which were previously
+ added with SIPAddHeader(). If no parameter is supplied, all previously added
+ headers will be removed. If a parameter is supplied, only the matching headers
will be removed.</para>
<para>For example you have added these 2 headers:</para>
<para>SIPAddHeader(P-Asserted-Identity: sip:foo at bar);</para>
@@ -581,13 +581,13 @@
/* guard limit must be larger than guard secs */
/* guard min must be < 1000, and should be >= 250 */
#define EXPIRY_GUARD_SECS 15 /*!< How long before expiry do we reregister */
-#define EXPIRY_GUARD_LIMIT 30 /*!< Below here, we use EXPIRY_GUARD_PCT instead of
+#define EXPIRY_GUARD_LIMIT 30 /*!< Below here, we use EXPIRY_GUARD_PCT instead of
EXPIRY_GUARD_SECS */
-#define EXPIRY_GUARD_MIN 500 /*!< This is the minimum guard time applied. If
- GUARD_PCT turns out to be lower than this, it
+#define EXPIRY_GUARD_MIN 500 /*!< This is the minimum guard time applied. If
+ GUARD_PCT turns out to be lower than this, it
will use this time instead.
This is in milliseconds. */
-#define EXPIRY_GUARD_PCT 0.20 /*!< Percentage of expires timeout to use when
+#define EXPIRY_GUARD_PCT 0.20 /*!< Percentage of expires timeout to use when
below EXPIRY_GUARD_LIMIT */
#define DEFAULT_EXPIRY 900 /*!< Expire slowly */
@@ -602,7 +602,7 @@
#define CALLERID_UNKNOWN "Anonymous"
#define FROMDOMAIN_INVALID "anonymous.invalid"
-
+
#define DEFAULT_MAXMS 2000 /*!< Qualification: Must be faster than 2 seconds by default */
#define DEFAULT_QUALIFYFREQ 60 * 1000 /*!< Qualification: How often to check for the host to be up */
#define DEFAULT_FREQ_NOTOK 10 * 1000 /*!< Qualification: How often to check, if the host is down... */
@@ -610,7 +610,7 @@
#define DEFAULT_RETRANS 1000 /*!< How frequently to retransmit Default: 2 * 500 ms in RFC 3261 */
#define MAX_RETRANS 6 /*!< Try only 6 times for retransmissions, a total of 7 transmissions */
#define DEFAULT_TIMER_T1 500 /*!< SIP timer T1 (according to RFC 3261) */
-#define SIP_TRANS_TIMEOUT 64 * DEFAULT_TIMER_T1 /*!< SIP request timeout (rfc 3261) 64*T1
+#define SIP_TRANS_TIMEOUT 64 * DEFAULT_TIMER_T1 /*!< SIP request timeout (rfc 3261) 64*T1
\todo Use known T1 for timeout (peerpoke)
*/
#define DEFAULT_TRANS_TIMEOUT -1 /*!< Use default SIP transaction timeout */
@@ -619,7 +619,7 @@
#define SIP_MAX_HEADERS 64 /*!< Max amount of SIP headers to read */
#define SIP_MAX_LINES 64 /*!< Max amount of lines in SIP attachment (like SDP) */
#define SIP_MIN_PACKET 4096 /*!< Initialize size of memory to allocate for packets */
-#define MAX_HISTORY_ENTRIES 50 /*!< Max entires in the history list for a sip_pvt */
+#define MAX_HISTORY_ENTRIES 50 /*!< Max entires in the history list for a sip_pvt */
#define INITIAL_CSEQ 101 /*!< Our initial sip sequence number */
@@ -641,10 +641,10 @@
static const char config[] = "sip.conf"; /*!< Main configuration file */
static const char notify_config[] = "sip_notify.conf"; /*!< Configuration file for sending Notify with CLI commands to reconfigure or reboot phones */
-#define RTP 1
+#define RTP 1
#define NO_RTP 0
-/*! \brief Authorization scheme for call transfers
+/*! \brief Authorization scheme for call transfers
\note Not a bitfield flag, since there are plans for other modes,
like "only allow transfers for authenticated devices" */
@@ -660,7 +660,7 @@
AST_FAILURE = -1, /*!< Failure code */
};
-/*! \brief States for the INVITE transaction, not the dialog
+/*! \brief States for the INVITE transaction, not the dialog
\note this is for the INVITE that sets up the dialog
*/
enum invitestates {
@@ -670,7 +670,7 @@
INV_EARLY_MEDIA = 3, /*!< We got 18x message with to-tag back */
INV_COMPLETED = 4, /*!< Got final response with error. Wait for ACK, then CONFIRMED */
INV_CONFIRMED = 5, /*!< Confirmed response - we've got an ack (Incoming calls only) */
- INV_TERMINATED = 6, /*!< Transaction done - either successful (AST_STATE_UP) or failed, but done
+ INV_TERMINATED = 6, /*!< Transaction done - either successful (AST_STATE_UP) or failed, but done
The only way out of this is a BYE from one side */
INV_CANCELLED = 7, /*!< Transaction cancelled by client or server in non-terminated state */
};
@@ -709,7 +709,7 @@
};
/*! \brief Type of subscription, based on the packages we do support, see \ref subscription_types */
-enum subscriptiontype {
+enum subscriptiontype {
NONE = 0,
XPIDF_XML,
DIALOG_INFO_XML,
@@ -730,7 +730,7 @@
const char * const text;
} subscription_types[] = {
{ NONE, "-", "unknown", "unknown" },
- /* RFC 4235: SIP Dialog event package */
+ /* RFC 4235: SIP Dialog event package */
{ DIALOG_INFO_XML, "dialog", "application/dialog-info+xml", "dialog-info+xml" },
{ CPIM_PIDF_XML, "presence", "application/cpim-pidf+xml", "cpim-pidf+xml" }, /* RFC 3863 */
{ PIDF_XML, "presence", "application/pidf+xml", "pidf+xml" }, /* RFC 3863 */
@@ -739,7 +739,7 @@
};
-/*! \brief Authentication types - proxy or www authentication
+/*! \brief Authentication types - proxy or www authentication
\note Endpoints, like Asterisk, should always use WWW authentication to
allow multiple authentications in the same call - to the proxy and
to the end point.
@@ -769,30 +769,30 @@
/*! \brief States for outbound registrations (with register= lines in sip.conf */
enum sipregistrystate {
- REG_STATE_UNREGISTERED = 0, /*!< We are not registered
+ REG_STATE_UNREGISTERED = 0, /*!< We are not registered
* \note Initial state. We should have a timeout scheduled for the initial
* (or next) registration transmission, calling sip_reregister
*/
- REG_STATE_REGSENT, /*!< Registration request sent
+ REG_STATE_REGSENT, /*!< Registration request sent
* \note sent initial request, waiting for an ack or a timeout to
* retransmit the initial request.
*/
- REG_STATE_AUTHSENT, /*!< We have tried to authenticate
+ REG_STATE_AUTHSENT, /*!< We have tried to authenticate
* \note entered after transmit_register with auth info,
* waiting for an ack.
*/
REG_STATE_REGISTERED, /*!< Registered and done */
- REG_STATE_REJECTED, /*!< Registration rejected *
+ REG_STATE_REJECTED, /*!< Registration rejected
* \note only used when the remote party has an expire larger than
* our max-expire. This is a final state from which we do not
* recover (not sure how correctly).
*/
- REG_STATE_TIMEOUT, /*!< Registration timed out *
+ REG_STATE_TIMEOUT, /*!< Registration timed out
* \note XXX unused */
REG_STATE_NOAUTH, /*!< We have no accepted credentials
@@ -804,7 +804,7 @@
/*! \brief Modes in which Asterisk can be configured to run SIP Session-Timers */
enum st_mode {
- SESSION_TIMER_MODE_INVALID = 0, /*!< Invalid value */
+ SESSION_TIMER_MODE_INVALID = 0, /*!< Invalid value */
SESSION_TIMER_MODE_ACCEPT, /*!< Honor inbound Session-Timer requests */
SESSION_TIMER_MODE_ORIGINATE, /*!< Originate outbound and honor inbound requests */
SESSION_TIMER_MODE_REFUSE /*!< Ignore inbound Session-Timers requests */
@@ -817,8 +817,8 @@
SESSION_TIMER_REFRESHER_UAS /*!< Session is refreshed by the UAS */
};
-/*! \brief Define some implemented SIP transports
- \note Asterisk does not support SCTP or UDP/DTLS
+/*! \brief Define some implemented SIP transports
+ \note Asterisk does not support SCTP or UDP/DTLS
*/
enum sip_transport {
SIP_TRANSPORT_UDP = 1, /*!< Unreliable transport for SIP, needs retransmissions */
@@ -828,7 +828,7 @@
/*! \brief definition of a sip proxy server
*
- * For outbound proxies, a sip_peer will contain a reference to a
+ * For outbound proxies, a sip_peer will contain a reference to a
* dynamically allocated instance of a sip_proxy. A sip_pvt may also
* contain a reference to a peer's outboundproxy, or it may contain
* a reference to the sip_cfg.outboundproxy.
@@ -837,13 +837,13 @@
char name[MAXHOSTNAMELEN]; /*!< DNS name of domain/host or IP */
struct sockaddr_in ip; /*!< Currently used IP address and port */
time_t last_dnsupdate; /*!< When this was resolved */
- enum sip_transport transport;
+ enum sip_transport transport;
int force; /*!< If it's an outbound proxy, Force use of this outbound proxy for all outbound requests */
/* Room for a SRV record chain based on the name */
};
/*! \brief argument for the 'show channels|subscriptions' callback. */
-struct __show_chan_arg {
+struct __show_chan_arg {
int fd;
int subscriptions;
int numchans; /* return value */
@@ -857,7 +857,7 @@
CAN_CREATE_DIALOG_UNSUPPORTED_METHOD,
};
-/*! \brief SIP Request methods known by Asterisk
+/*! \brief SIP Request methods known by Asterisk
\note Do _NOT_ make any changes to this enum, or the array following it;
if you think you are doing the right thing, you are probably
@@ -898,7 +898,7 @@
structure and then route the messages according to the type.
\note Note that sip_methods[i].id == i must hold or the code breaks */
-static const struct cfsip_methods {
+static const struct cfsip_methods {
enum sipmethod id;
int need_rtp; /*!< when this is the 'primary' use for a pvt structure, does it need RTP? */
char * const text;
@@ -907,7 +907,7 @@
{ SIP_UNKNOWN, RTP, "-UNKNOWN-", CAN_CREATE_DIALOG },
{ SIP_RESPONSE, NO_RTP, "SIP/2.0", CAN_NOT_CREATE_DIALOG },
{ SIP_REGISTER, NO_RTP, "REGISTER", CAN_CREATE_DIALOG },
- { SIP_OPTIONS, NO_RTP, "OPTIONS", CAN_CREATE_DIALOG },
+ { SIP_OPTIONS, NO_RTP, "OPTIONS", CAN_CREATE_DIALOG },
{ SIP_NOTIFY, NO_RTP, "NOTIFY", CAN_CREATE_DIALOG },
{ SIP_INVITE, RTP, "INVITE", CAN_CREATE_DIALOG },
{ SIP_ACK, NO_RTP, "ACK", CAN_NOT_CREATE_DIALOG },
@@ -923,10 +923,10 @@
{ SIP_PING, NO_RTP, "PING", CAN_CREATE_DIALOG_UNSUPPORTED_METHOD }
};
-/*! Define SIP option tags, used in Require: and Supported: headers
- We need to be aware of these properties in the phones to use
+/*! Define SIP option tags, used in Require: and Supported: headers
+ We need to be aware of these properties in the phones to use
the replace: header. We should not do that without knowing
- that the other end supports it...
+ that the other end supports it...
This is nothing we can configure, we learn by the dialog
Supported: header on the REGISTER (peer) or the INVITE
(other devices)
@@ -969,7 +969,7 @@
char * const text; /*!< Text id, as in standard */
} sip_options[] = { /* XXX used in 3 places */
/* RFC3262: PRACK 100% reliability */
- { SIP_OPT_100REL, NOT_SUPPORTED, "100rel" },
+ { SIP_OPT_100REL, NOT_SUPPORTED, "100rel" },
/* RFC3959: SIP Early session support */
{ SIP_OPT_EARLY_SESSION, NOT_SUPPORTED, "early-session" },
/* SIMPLE events: RFC4662 */
@@ -999,9 +999,9 @@
/* RFC-ietf-sip-uri-list-subscribe-02.txt - subscription lists */
{ SIP_OPT_RECLISTSUB, NOT_SUPPORTED, "recipient-list-subscribe" },
/* RFC3891: Replaces: header for transfer */
- { SIP_OPT_REPLACES, SUPPORTED, "replaces" },
+ { SIP_OPT_REPLACES, SUPPORTED, "replaces" },
/* One version of Polycom firmware has the wrong label */
- { SIP_OPT_REPLACES, SUPPORTED, "replace" },
+ { SIP_OPT_REPLACES, SUPPORTED, "replace" },
/* RFC4412 Resource priorities */
{ SIP_OPT_RESPRIORITY, NOT_SUPPORTED, "resource-priority" },
/* RFC3329: Security agreement mechanism */
@@ -1063,18 +1063,18 @@
return "unknown";
}
-/*! \brief SIP Methods we support
+/*! \brief SIP Methods we support
\todo This string should be set dynamically. We only support REFER and SUBSCRIBE if we have
allowsubscribe and allowrefer on in sip.conf.
*/
#define ALLOWED_METHODS "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO"
-/*! \brief SIP Extensions we support
+/*! \brief SIP Extensions we support
\note This should be generated based on the previous array
in combination with settings.
\todo We should not have "timer" if it's disabled in the configuration file.
*/
-#define SUPPORTED_EXTENSIONS "replaces, timer"
+#define SUPPORTED_EXTENSIONS "replaces, timer"
/*! \brief Standard SIP unsecure port for UDP and TCP from RFC 3261. DO NOT CHANGE THIS */
#define STANDARD_SIP_PORT 5060
@@ -1090,13 +1090,13 @@
* option. If you change this value, the signalling will be incorrect.
*/
-/*! \name DefaultValues Default values, set and reset in reload_config before reading configuration
+/*! \name DefaultValues Default values, set and reset in reload_config before reading configuration
These are default values in the source. There are other recommended values in the
sip.conf.sample for new installations. These may differ to keep backwards compatibility,
- yet encouraging new behaviour on new installations
+ yet encouraging new behaviour on new installations
*/
-/*@{*/
+/*@{*/
#define DEFAULT_CONTEXT "default" /*!< The default context for [general] section as well as devices */
#define DEFAULT_MOHINTERPRET "default" /*!< The default music class */
#define DEFAULT_MOHSUGGEST ""
@@ -1137,13 +1137,13 @@
#define DEFAULT_SDPOWNER "root" /*!< Default SDP username field in (o=) header unless re-defined in sip.conf */
#define DEFAULT_ENGINE "asterisk" /*!< Default RTP engine to use for sessions */
#endif
-/*@}*/
+/*@}*/
/*! \name DefaultSettings
Default setttings are used as a channel setting and as a default when
- configuring devices
+ configuring devices
*/
-/*@{*/
+/*@{*/
static char default_language[MAX_LANGUAGE];
static char default_callerid[AST_MAX_EXTENSION];
static char default_mwi_from[80];
@@ -1152,7 +1152,7 @@
static int default_qualify; /*!< Default Qualify= setting */
static char default_vmexten[AST_MAX_EXTENSION];
static char default_mohinterpret[MAX_MUSICCLASS]; /*!< Global setting for moh class to use when put on hold */
-static char default_mohsuggest[MAX_MUSICCLASS]; /*!< Global setting for moh class to suggest when putting
+static char default_mohsuggest[MAX_MUSICCLASS]; /*!< Global setting for moh class to suggest when putting
* a bridged channel on hold */
static char default_parkinglot[AST_MAX_CONTEXT]; /*!< Parkinglot */
static char default_engine[256]; /*!< Default RTP engine */
@@ -1161,14 +1161,14 @@
static unsigned int default_transports; /*!< Default Transports (enum sip_transport) that are acceptable */
static unsigned int default_primary_transport; /*!< Default primary Transport (enum sip_transport) for outbound connections to devices */
-/*@}*/
+/*@}*/
/*! \name GlobalSettings
Global settings apply to the channel (often settings you can change in the general section
of sip.conf
*/
-/*@{*/
-/*! \brief a place to store all global settings for the sip channel driver
+/*@{*/
+/*! \brief a place to store all global settings for the sip channel driver
These are settings that will be possibly to apply on a group level later on.
\note Do not add settings that only apply to the channel itself and can't
be applied to devices (trunks, services, phones)
@@ -1194,7 +1194,7 @@
int notifyhold; /*!< Send notifications on hold */
enum notifycid_setting notifycid; /*!< Send CID with ringing notifications */
enum transfermodes allowtransfer; /*!< SIP Refer restriction scheme */
- int allowsubscribe; /*!< Flag for disabling ALL subscriptions, this is FALSE only if all peers are FALSE
+ int allowsubscribe; /*!< Flag for disabling ALL subscriptions, this is FALSE only if all peers are FALSE
the global setting is in globals_flags[1] */
char realm[MAXHOSTNAMELEN]; /*!< Default realm */
int domainsasrealm; /*!< Use domains lists as realms */
@@ -1248,7 +1248,7 @@
static int global_min_se; /*!< Lowest threshold for session refresh interval */
static int global_max_se; /*!< Highest threshold for session refresh interval */
-/*@}*/
+/*@}*/
/*! \brief Global list of addresses dynamic peers are not allowed to use */
static struct ast_ha *global_contact_ha = NULL;
@@ -1305,7 +1305,7 @@
* Incoming messages: we first store the data from the socket in data[],
* adding a trailing \0 to make string parsing routines happy.
* Then call parse_request() and req.method = find_sip_method();
- * to initialize the other fields. The \r\n at the end of each line is
+ * to initialize the other fields. The \r\n at the end of each line is
* replaced by \0, so that data[] is not a conforming SIP message anymore.
* After this processing, rlPart1 is set to non-NULL to remember
* that we can run get_header() on this kind of packet.
@@ -1320,7 +1320,7 @@
* (which fills the first line to "METHOD uri SIP/2.0" or "SIP/2.0 code text"),
* and then fill the rest with add_header() and add_line().
* The \r\n at the end of the line are still there, so the get_header()
- * and similar functions don't work on these packets.
+ * and similar functions don't work on these packets.
* \endverbatim
*/
struct sip_request {
@@ -1388,7 +1388,7 @@
SIP_DOMAIN_CONFIG, /*!< This domain is from configuration */
};
-/*! \brief Domain data structure.
+/*! \brief Domain data structure.
\note In the future, we will connect this to a configuration tree specific
for this domain
*/
@@ -1420,7 +1420,7 @@
};
/*! \name SIPflags
- Various flags for the flags field in the pvt structure
+ Various flags for the flags field in the pvt structure
Trying to sort these up (one or more of the following):
D: Dialog
P: Peer/user
@@ -1428,7 +1428,7 @@
When flags are used by multiple structures, it is important that
they have a common layout so it is easy to copy them.
*/
-/*@{*/
+/*@{*/
#define SIP_OUTGOING (1 << 0) /*!< D: Direction of the last transaction in this dialog */
#define SIP_RINGING (1 << 2) /*!< D: Have sent 180 ringing */
#define SIP_PROGRESS_SENT (1 << 3) /*!< D: Have sent 183 message progress */
@@ -1487,11 +1487,11 @@
(SIP_PROMISCREDIR | SIP_TRUSTRPID | SIP_SENDRPID | SIP_DTMF | SIP_REINVITE | \
SIP_PROG_INBAND | SIP_USECLIENTCODE | SIP_NAT_FORCE_RPORT | SIP_G726_NONSTANDARD | \
SIP_USEREQPHONE | SIP_INSECURE)
-/*@}*/
+/*@}*/
/*! \name SIPflags2
a second page of flags (for flags[1] */
-/*@{*/
+/*@{*/
/* realtime flags */
#define SIP_PAGE2_RTCACHEFRIENDS (1 << 0) /*!< GP: Should we keep RT objects in memory for extended time? */
#define SIP_PAGE2_RTAUTOCLEAR (1 << 2) /*!< GP: Should we clean memory from peers after expiry? */
@@ -1536,7 +1536,7 @@
SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_VIDEOSUPPORT_ALWAYS | SIP_PAGE2_PREFERRED_CODEC | \
SIP_PAGE2_RPID_IMMEDIATE | SIP_PAGE2_RPID_UPDATE | SIP_PAGE2_SYMMETRICRTP)
-/*@}*/
+/*@}*/
/*! \brief debugging state
* We store separately the debugging requests from the config file
@@ -1594,7 +1594,7 @@
struct _map_x_s {
int x;
const char *s;
-};
+};
static const struct _map_x_s referstatusstrings[] = {
{ REFER_IDLE, "<none>" },
@@ -1632,11 +1632,11 @@
};
-/*! \brief Structure that encapsulates all attributes related to running
+/*! \brief Structure that encapsulates all attributes related to running
* SIP Session-Timers feature on a per dialog basis.
*/
struct sip_st_dlg {
- int st_active; /*!< Session-Timers on/off */
+ int st_active; /*!< Session-Timers on/off */
int st_interval; /*!< Session-Timers negotiated session refresh interval */
int st_schedid; /*!< Session-Timers ast_sched scheduler id */
enum st_refresher st_ref; /*!< Session-Timers session refresher */
@@ -1649,7 +1649,7 @@
};
-/*! \brief Structure that encapsulates all attributes related to configuration
+/*! \brief Structure that encapsulates all attributes related to configuration
* of SIP Session-Timers feature on a per user/peer basis.
*/
struct sip_st_cfg {
@@ -1785,7 +1785,7 @@
int amaflags; /*!< AMA Flags */
int pendinginvite; /*!< Any pending INVITE or state NOTIFY (in subscribe pvt's) ? (seqno of this) */
int glareinvite; /*!< A invite received while a pending invite is already present is stored here. Its seqno is the
- value. Since this glare invite's seqno is not the same as the pending invite's, it must be
+ value. Since this glare invite's seqno is not the same as the pending invite's, it must be
held in order to properly process acknowledgements for our 491 response. */
struct sip_request initreq; /*!< Latest request that opened a new transaction
within this dialog.
@@ -1803,7 +1803,7 @@
struct ast_dsp *dsp; /*!< Inband DTMF Detection dsp */
- struct sip_peer *relatedpeer; /*!< If this dialog is related to a peer, which one
+ struct sip_peer *relatedpeer; /*!< If this dialog is related to a peer, which one
Used in peerpoke, mwi subscriptions */
struct sip_registry *registry; /*!< If this is a REGISTER dialog, to which registry */
struct ast_rtp_instance *rtp; /*!< RTP Session */
@@ -1815,8 +1815,8 @@
struct ast_variable *chanvars; /*!< Channel variables to set for inbound call */
AST_LIST_HEAD_NOLOCK(request_queue, sip_request) request_queue; /*!< Requests that arrived but could not be processed immediately */
struct sip_invite_param *options; /*!< Options for INVITE */
- struct sip_st_dlg *stimer; /*!< SIP Session-Timers */
-
+ struct sip_st_dlg *stimer; /*!< SIP Session-Timers */
+
int red; /*!< T.140 RTP Redundancy */
int hangupcause; /*!< Storage of hangupcause copied from our owner before we disconnect from the AST channel (only used at hangup) */
@@ -1834,7 +1834,7 @@
* By doing this, even if we don't want to answer a particular media stream with something meaningful, we can
* still put an m= line in our answer with the port set to 0.
*
- * The reason for the length being 4 is that in this branch of Asterisk, the only media types supported are
+ * The reason for the length being 4 is that in this branch of Asterisk, the only media types supported are
* image, audio, text, and video. Therefore we need to keep track of which types of media were offered.
*
* Note that if we wanted to be 100% correct, we would keep a list of all media streams offered. That way we could respond
@@ -1845,7 +1845,7 @@
* The large-scale changes would be a good idea for implementing during an SDP rewrite.
*/
struct offered_media offered_media[4];
-};
+};
/*! \brief
@@ -1945,7 +1945,7 @@
SIP_TYPE_USER = (1 << 1),
};
-/*! \brief Structure for SIP peer data, we place calls to peers if registered or fixed IP address (host)
+/*! \brief Structure for SIP peer data, we place calls to peers if registered or fixed IP address (host)
*/
/* XXX field 'name' must be first otherwise sip_addrcmp() will fail, as will astobj2 hashing of the structure */
struct sip_peer {
@@ -1956,7 +1956,7 @@
AST_STRING_FIELD(remotesecret); /*!< Remote secret (trunks, remote devices) */
AST_STRING_FIELD(context); /*!< Default context for incoming calls */
AST_STRING_FIELD(subscribecontext); /*!< Default context for subscriptions */
- AST_STRING_FIELD(username); /*!< Temporary username until registration */
+ AST_STRING_FIELD(username); /*!< Temporary username until registration */
AST_STRING_FIELD(accountcode); /*!< Account code */
AST_STRING_FIELD(tohost); /*!< If not dynamic, IP address */
AST_STRING_FIELD(regexten); /*!< Extension to register (if regcontext is used) */
@@ -2039,7 +2039,7 @@
};
-/*!
+/*!
* \brief Registrations with other SIP proxies
*
* Created by sip_register(), the entry is linked in the 'regl' list,
@@ -2237,7 +2237,7 @@
AST_THREADSTORAGE_CUSTOM(ts_text_rtp, NULL, ts_ast_rtp_destroy);
#endif
-/*! \brief Authentication list for realm authentication
+/*! \brief Authentication list for realm authentication
* \todo Move the sip_auth list to AST_LIST */
static struct sip_auth *authl = NULL;
@@ -2277,11 +2277,11 @@
*
* + with "externip = host[:port]" we specify the address/port explicitly.
* The address is looked up only once when (re)loading the config file;
- *
+ *
* + with "externhost = host[:port]" we do a similar thing, but the
* hostname is stored in externhost, and the hostname->IP mapping
* is refreshed every 'externrefresh' seconds;
- *
+ *
* + with "stunaddr = host[:port]" we run queries every externrefresh seconds
* to the specified server, and store the result in externip.
*
@@ -2310,7 +2310,7 @@
static struct ast_config *notify_types; /*!< The list of manual NOTIFY types we know how to send */
/*! some list management macros. */
-
+
#define UNLINK(element, head, prev) do { \
if (prev) \
(prev)->next = (element)->next; \
@@ -2468,11 +2468,11 @@
static int do_magic_pickup(struct ast_channel *channel, const char *extension, const char *context);
/*!
- * \brief generic function for determining if a correct transport is being
+ * \brief generic function for determining if a correct transport is being
* used to contact a peer
*
- * this is done as a macro so that the "tmpl" var can be passed either a
- * sip_request or a sip_peer
+ * this is done as a macro so that the "tmpl" var can be passed either a
+ * sip_request or a sip_peer
*/
#define check_request_transport(peer, tmpl) ({ \
int ret = 0; \
@@ -2555,7 +2555,7 @@
static char *sip_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static int acf_channel_read(struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen);
-/*--- Debugging
+/*--- Debugging
Functions for enabling debug per IP or fully, or enabling history logging for
a SIP dialog
*/
@@ -2564,7 +2564,7 @@
static inline int sip_debug_test_pvt(struct sip_pvt *p);
-/*! \brief Append to SIP dialog history
+/*! \brief Append to SIP dialog history
\return Always returns 0 */
#define append_history(p, event, fmt , args... ) append_history_full(p, "%-15s " fmt, event, ## args)
static void append_history_full(struct sip_pvt *p, const char *fmt, ...);
@@ -2640,7 +2640,7 @@
static void update_connectedline(struct sip_pvt *p, const void *data, size_t datalen);
static void update_redirecting(struct sip_pvt *p, const void *data, size_t datalen);
static void change_redirecting_information(struct sip_pvt *p, struct sip_request *req, struct ast_party_redirecting *redirecting, int set_call_forward);
-static int get_domain(const char *str, char *domain, int len);
+static int get_domain(const char *str, char *domain, int len);
static void get_realm(struct sip_pvt *p, const struct sip_request *req);
/*-- TCP connection handling ---*/
@@ -2852,10 +2852,10 @@
return _sip_tcp_helper_thread(NULL, tcptls_session);
}
-/*! \brief SIP TCP thread management function
+/*! \brief SIP TCP thread management function
This function reads from the socket, parses the packet into a request
*/
-static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_session_instance *tcptls_session)
+static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_session_instance *tcptls_session)
{
int res, cl;
struct sip_request req = { 0, } , reqcpy = { 0, };
@@ -2922,7 +2922,7 @@
goto cleanup;
}
ast_mutex_unlock(&tcptls_session->lock);
- if (me->stop)
+ if (me->stop)
goto cleanup;
ast_str_append(&req.data, 0, "%s", buf);
req.len = req.data->used;
@@ -3271,8 +3271,8 @@
}
/* This function is used to parse both Suported: and Require: headers.
- Let the caller of this function know that an unknown option tag was
- encountered, so that if the UAC requires it then the request can be
+ Let the caller of this function know that an unknown option tag was
+ encountered, so that if the UAC requires it then the request can be
rejected with a 420 response. */
if (!found)
profile |= SIP_OPT_UNKNOWN;
@@ -3291,7 +3291,7 @@
}
/*! \brief See if we pass debug IP filter */
-static inline int sip_debug_test_addr(const struct sockaddr_in *addr)
+static inline int sip_debug_test_addr(const struct sockaddr_in *addr)
{
if (!sipdebug)
return 0;
@@ -3320,7 +3320,7 @@
}
/*! \brief Test PVT for debugging output */
-static inline int sip_debug_test_pvt(struct sip_pvt *p)
+static inline int sip_debug_test_pvt(struct sip_pvt *p)
{
if (!sipdebug)
return 0;
@@ -3365,7 +3365,7 @@
case SIP_TRANSPORT_TCP | SIP_TRANSPORT_TLS:
return "TLS,TCP";
default:
- return transports ?
+ return transports ?
"TLS,TCP,UDP" : "UNKNOWN";
}
}
@@ -3400,9 +3400,9 @@
return get_transport(p->socket.type);
}
-/*! \brief Transmit SIP message
+/*! \brief Transmit SIP message
Sends a SIP request or response on a given socket (in the pvt)
- Called by retrans_pkt, send_request, send_response and
+ Called by retrans_pkt, send_request, send_response and
__sip_reliable_xmit
*/
static int __sip_xmit(struct sip_pvt *p, struct ast_str *data, int len)
@@ -3440,7 +3440,7 @@
case EHOSTUNREACH: /* Host can't be reached */
case ENETDOWN: /* Inteface down */
case ENETUNREACH: /* Network failure */
- case ECONNREFUSED: /* ICMP port unreachable */
+ case ECONNREFUSED: /* ICMP port unreachable */
res = XMIT_ERROR; /* Don't bother with trying to transmit again */
}
}
@@ -3512,7 +3512,7 @@
*us = externip;
else
ast_log(LOG_WARNING, "stun failed\n");
- ast_debug(1, "Target address %s is not local, substituting externip\n",
+ ast_debug(1, "Target address %s is not local, substituting externip\n",
ast_inet_ntoa(*(struct in_addr *)&them->s_addr));
} else if (p) {
/* no remapping, but we bind to a specific address, so use it. */
@@ -3613,7 +3613,7 @@
pkt->timer_a = 2 ;
else
pkt->timer_a = 2 * pkt->timer_a;
-
+
/* For non-invites, a maximum of 4 secs */
siptimer_a = pkt->timer_t1 * pkt->timer_a; /* Double each time */
if (pkt->method != SIP_INVITE && siptimer_a > 4000)
@@ -3622,7 +3622,7 @@
/* Reschedule re-transmit */
reschedule = siptimer_a;
ast_debug(4, "** SIP timers: Rescheduling retransmission %d to %d ms (t1 %d ms (Retrans id #%d)) \n", pkt->retrans +1, siptimer_a, pkt->timer_t1, pkt->retransid);
- }
+ }
if (sip_debug_test_pvt(pkt->owner)) {
const struct sockaddr_in *dst = sip_real_dst(pkt->owner);
@@ -3637,9 +3637,9 @@
sip_pvt_unlock(pkt->owner);
if (xmitres == XMIT_ERROR)
ast_log(LOG_WARNING, "Network error on retransmit in dialog %s\n", pkt->owner->callid);
- else
+ else
return reschedule;
- }
+ }
/* Too many retries */
if (pkt->owner && pkt->method != SIP_OPTIONS && xmitres == 0) {
[... 3060 lines stripped ...]
More information about the asterisk-commits
mailing list