diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-30 20:24:40 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-30 20:24:40 +0000 |
commit | 1b97d0a53851d876fcba0def7ba5b8c205d15794 (patch) | |
tree | 46f94a456730c090f403d12a0af93bdd6fa3caeb | |
parent | 3ffd7f4411461cf619dc1e3e5e5567636f8e7692 (diff) |
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/trunk@134556 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index af353db1a..9d2564d99 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11006,6 +11006,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; @@ -11017,7 +11019,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 == ' ') |