aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-30 20:25:57 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-30 20:25:57 +0000
commit14897cfb0dae487008df709d3118b03c907207e7 (patch)
treedab6228babe6a6cc00d220f78fc95fdf1a0d2856 /channels
parent058fe1560f996932ef67ab7e9283653d254c0a36 (diff)
Merged revisions 134556 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r134556 | mmichelson | 2008-07-30 15:24:40 -0500 (Wed, 30 Jul 2008) | 7 lines Fix the parsing of the "reason" parameter in the Diversion: header. (closes issue #13195) Reported by: woodsfsg ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@134561 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a6b96f3cd..0d1746f60 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10589,6 +10589,8 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
if (ast_strlen_zero(tmp))
return 0;
+ params = strchr(tmp, ';');
+
exten = get_in_brackets(tmp);
if (!strncasecmp(exten, "sip:", 4)) {
exten += 4;
@@ -10600,7 +10602,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
}
/* Get diversion-reason param if present */
- if ((params = strchr(tmp, ';'))) {
+ if (params) {
*params = '\0'; /* Cut off parameters */
params++;
while (*params == ';' || *params == ' ')