summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-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 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 == ' ')