aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-05 07:43:40 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-05 07:43:40 +0000
commit49eafc148adce4b4f13c636f4b88cbd83105a77f (patch)
treec6db19bd86d0ca10dcddb766c7168171c6d68146 /channels
parentf27ab9b33b6b8b9e2a90cb544084ff55dc524da2 (diff)
Issue 7208 - Handle ; in userinfo part of URI too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32207 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f36d3abd4..6ed605b8a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7142,16 +7142,16 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
return -1;
}
from += 4;
- from = strsep(&from, ";");
if ((a = strchr(from, '@')))
*a++ = '\0';
else
a = from; /* just a domain */
+ from = strsep(&from, ";"); /* Remove userinfo options */
+ a = strsep(&a, ";"); /* Remove URI options */
ast_string_field_set(p, fromdomain, a);
}
/* Skip any options and find the domain */
- uri = strsep(&uri, ";");
/* Get the target domain */
if ((a = strchr(uri, '@'))) {
@@ -7164,6 +7164,9 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
if (colon)
*colon = '\0';
+ uri = strsep(&uri, ";"); /* Remove userinfo options */
+ a = strsep(&a, ";"); /* Remove URI options */
+
ast_string_field_set(p, domain, a);
if (!AST_LIST_EMPTY(&domain_list)) {