From 8d5c36c9bb91af574fbe0dd261f3b6601304b263 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Tue, 5 Mar 2013 13:14:43 +0000 Subject: 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 --- configs/res_ldap.conf.sample | 1 + configs/sip.conf.sample | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'configs') diff --git a/configs/res_ldap.conf.sample b/configs/res_ldap.conf.sample index 9a2accb80..ac345cdd4 100644 --- a/configs/res_ldap.conf.sample +++ b/configs/res_ldap.conf.sample @@ -121,6 +121,7 @@ ipaddr = AstAccountIPAddress defaultuser = AstAccountDefaultUser regserver = AstAccountRegistrationServer lastms = AstAccountLastQualifyMilliseconds +supportpath = AstAccountPathSupport additionalFilter=(objectClass=AsteriskSIPUser) ; diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample index d54398c44..a0ceabeb7 100644 --- a/configs/sip.conf.sample +++ b/configs/sip.conf.sample @@ -442,6 +442,21 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ;outboundproxy=[2001:db8::1]:5062 ; IPv6 address literal with explicit port ; ; (could also be tcp,udp) - defining transports on the proxy line only ; ; applies for the global proxy, otherwise use the transport= option + +;supportpath=yes ; This activates parsing and handling of Path header as defined in RFC 3327. This 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. + ; NOTE: There are multiple things to consider with this setting: + ; * As this influences routing of SIP requests make sure to not trust Path headers provided + ; by the user's SIP client (the proxy in front of Asterisk should remove existing user + ; provided Path headers). + ; * When a peer has both a path and outboundproxy set, the path will be added to Route: header + ; but routing to next hop is done using the outboundproxy. + ; * If set globally, not only will all peers use the Path header, but outbound REGISTER + ; requests from Asterisk will add path to the Supported header. + +;rtsavepath=yes ; If using dynamic realtime, store the path headers + ;matchexternaddrlocally = yes ; Only substitute the externaddr or externhost setting if it matches ; your localnet setting. Unless you have some sort of strange network ; setup you will not need to enable this. -- cgit v1.2.3