{
char *url = NULL, *e;
- while((e = strchr(buf, '"'))) {
- buf = e+1;
+ while(*buf == ' ') {
+ buf++;
+ }
+
+ if (*buf == '"') {
+ buf++;
+ while((e = strchr(buf, '"'))) {
+ buf = e+1;
+ }
}
while(*buf == ' ') {
buf++;
}
- if ((url = strchr(buf, '<')) && (e = strchr(url, '>'))) {
+ if ((url = strchr(buf, '<')) && (e = switch_find_end_paren(url, '<', '>'))) {
url++;
if (to_dup) {
url = strdup(url);
dst = sofia_glue_get_destination((char *) o_contact);
switch_assert(dst);
- contact = sofia_glue_get_url_from_contact(dst->contact, 1);
+ if (!zstr(dst->contact)) {
+ contact = sofia_glue_get_url_from_contact(dst->contact, 1);
+ } else {
+ contact = strdup(o_contact);
+ }
if (dst->route_uri) {
route_uri = sofia_glue_strip_uri(dst->route_uri);
);
}
-
+
switch_mutex_lock(profile->ireg_mutex);
if (!profile->cseq_base) {
profile->cseq_base = (now - 1312693200) * 10;