aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-10 15:57:44 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-10 15:57:44 +0000
commite46de943e5a576ed68779666d5ef591e866129f1 (patch)
treead97e725faa2379a530264d0ff1f18c64b899b0a /channels
parentfac06bc26294fb63616a8e08eb99ae42a7885ba4 (diff)
Merged revisions 205776 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r205776 | mmichelson | 2009-07-10 10:56:45 -0500 (Fri, 10 Jul 2009) | 16 lines Merged revisions 205775 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r205775 | mmichelson | 2009-07-10 10:51:36 -0500 (Fri, 10 Jul 2009) | 10 lines Ensure that outbound NOTIFY requests are properly routed through stateful proxies. With this change, we make note of Record-Route headers present in any SUBSCRIBE request that we receive so that our outbound NOTIFY requests will have the proper Route headers in them. (closes issue #14725) Reported by: ibc ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@205778 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 671ffa142..6ede9caba 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9667,8 +9667,11 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
add_header(req, "Via", p->via);
add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);
- /* SLD: FIXME?: do Route: here too? I think not cos this is the first request.
- * OTOH, then we won't have anything in p->route anyway */
+ /* This will be a no-op most of the time. However, under certain circumstances,
+ * NOTIFY messages will use this function for preparing the request and should
+ * have Route headers present.
+ */
+ add_route(req, p->route);
/* Build Remote Party-ID and From */
if (ast_test_flag(&p->flags[0], SIP_SENDRPID) && (sipmethod == SIP_INVITE)) {
@@ -19695,6 +19698,7 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
if (sipdebug)
ast_debug(4, "Initializing initreq for method %s - callid %s\n", sip_methods[req->method].text, p->callid);
check_via(p, req);
+ build_route(p, req, 0);
} else if (req->debug && req->ignore)
ast_verbose("Ignoring this SUBSCRIBE request\n");