mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
Add RFC 3327 Path header support to chan_sip
This patch adds support for RFC 3327 "Path" headers. This can be enabled in sip.conf using the 'supportpath' setting, either on a global basis or on a peer basis. This setting enables Asterisk to route outgoing out-of-dialog requests via a set of proxies by using a pre-loaded route-set defined by the Path headers in the REGISTER request. This patch also adds Realtime support for dynamically updating the Path information for a peer. A huge thank-you to Klaus Darillion and Olle E Johansson for their efforts in writing this patch. Review: https://reviewboard.asterisk.org/r/2235/ Review: https://reviewboard.asterisk.org/r/991/ (closes issue ASTERISK-16884) Reported by: klaus3000 Tested by: klaus3000, oej, mjordan patches: path-1.8.0-patch.txt uploaded by klaus3000 (License 5054) oolong-path-support-trunk in team branch by oej (License 5267) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -294,6 +294,7 @@
|
||||
#define SIP_PROG_INBAND_NO (1 << 25)
|
||||
#define SIP_PROG_INBAND_YES (2 << 25)
|
||||
|
||||
#define SIP_USEPATH (1 << 27) /*!< GDP: Trust and use incoming Path headers? */
|
||||
#define SIP_SENDRPID (3 << 29) /*!< DP: Remote Party-ID Support */
|
||||
#define SIP_SENDRPID_NO (0 << 29)
|
||||
#define SIP_SENDRPID_PAI (1 << 29) /*!< Use "P-Asserted-Identity" for rpid */
|
||||
@@ -304,7 +305,7 @@
|
||||
#define SIP_FLAGS_TO_COPY \
|
||||
(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)
|
||||
SIP_USEREQPHONE | SIP_INSECURE | SIP_USEPATH)
|
||||
/*@}*/
|
||||
|
||||
/*! \name SIPflags2
|
||||
@@ -737,6 +738,7 @@ struct __show_chan_arg {
|
||||
struct sip_settings {
|
||||
int peer_rtupdate; /*!< G: Update database with registration data for peer? */
|
||||
int rtsave_sysname; /*!< G: Save system name at registration? */
|
||||
int rtsave_path; /*!< G: Save path header on registration */
|
||||
int ignore_regexpire; /*!< G: Ignore expiration of peer */
|
||||
int rtautoclear; /*!< Realtime ?? */
|
||||
int directrtpsetup; /*!< Enable support for Direct RTP setup (no re-invites) */
|
||||
@@ -1368,6 +1370,7 @@ struct sip_peer {
|
||||
int timer_t1; /*!< The maximum T1 value for the peer */
|
||||
int timer_b; /*!< The maximum timer B (transaction timeouts) */
|
||||
int fromdomainport; /*!< The From: domain port */
|
||||
struct sip_route *path; /*!< Head of linked list of out-of-dialog outgoing routing steps (fm Path headers) */
|
||||
|
||||
/*XXX Seems like we suddenly have two flags with the same content. Why? To be continued... */
|
||||
enum sip_peer_type type; /*!< Distinguish between "user" and "peer" types. This is used solely for CLI and manager commands */
|
||||
|
Reference in New Issue
Block a user