alex,
i reviewed your patch and it looked ok to me except i added one line to
initialize lt and param variebles:
/* Check if Contact URI needs to be enclosed in <>s */
lt = param = NULL;
i also tested the case when brackets exist already in incoming request
and it worked ok as before. so far i have not had opportunity to test
the case where brackets are missing in incoming request.
-- juha