Metaswitch/sprout — pull request #755 by rkd-msw (2014-09-04 12:04:38+00:00)
Title: [Reviewer: Mike] Don't do ENUM lookups on GRUUs, even if the user part is numeric

This fixes the bug seen on the staging system, where "sip:1234@example.com;gr=abcd" can get treated as a phone number (because of our heuristic that all-numeric user parts are probably phone numbers, even in the absence of user=phone) passed through an ENUM lookup as "1234", and translated to "sip:1234@example.com" - which is no longer a GRUU.

This change just tweaks our heuristic to exclude GRUUs. It includes two UTs, which fail on the old code and pass with the change - I haven't tested live, but that will happen naturally when this is pushed to staging.

(Some whitespace errors got autocorrected - sorry if that clutters up the pull request.)