Skip to content
Snippets Groups Projects
Commit 560475ba authored by Mark Michelson's avatar Mark Michelson
Browse files

Fix the parsing of the "reason" parameter in the

Diversion: header.

(closes issue #13195)
Reported by: woodsfsg



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 6787c689
No related branches found
No related tags found
No related merge requests found
...@@ -11006,6 +11006,8 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq) ...@@ -11006,6 +11006,8 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
if (ast_strlen_zero(tmp)) if (ast_strlen_zero(tmp))
return 0; return 0;
   
params = strchr(tmp, ';');
exten = get_in_brackets(tmp); exten = get_in_brackets(tmp);
if (!strncasecmp(exten, "sip:", 4)) { if (!strncasecmp(exten, "sip:", 4)) {
exten += 4; exten += 4;
...@@ -11017,7 +11019,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq) ...@@ -11017,7 +11019,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
} }
   
/* Get diversion-reason param if present */ /* Get diversion-reason param if present */
if ((params = strchr(tmp, ';'))) { if (params) {
*params = '\0'; /* Cut off parameters */ *params = '\0'; /* Cut off parameters */
params++; params++;
while (*params == ';' || *params == ' ') while (*params == ';' || *params == ' ')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment