Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 62624) +++ channels/chan_sip.c (working copy) @@ -7705,7 +7705,6 @@ /* Work on a copy */ contact = ast_strdupa(pvt->fullcontact); - /* XXX this code is repeated all over */ /* Make sure it's a SIP URL */ if (strncasecmp(contact, "sip:", 4)) { ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", contact); @@ -7714,7 +7713,6 @@ /* Ditch arguments */ /* XXX this code is replicated also shortly below */ - contact = strsep(&contact, ";"); /* trim ; and beyond */ /* Grab host */ host = strchr(contact, '@'); @@ -7731,6 +7729,9 @@ } else port = STANDARD_SIP_PORT; + contact = strsep(&contact, ";"); /* trim ; and beyond in username part */ + host = strsep(&host, ";"); /* trim ; and beyond in host/domain part */ + /* XXX This could block for a long time XXX */ /* We should only do this if it's a name, not an IP */ hp = ast_gethostbyname(host, &ahp);