Thanks for the feedback!
I have taken a stab at fixing this. I'm still learning the code base and I'm more of a C,C++, and Python guy, so I fully expect to be told I completely broke something. Anyway, attached is my proposed patch.
The only case I couldn't figure out how to normalize the number for was the createCall(ProtocolProviderService protocolProvider, Contact contact) function since there's presently no way to modify the contact information via the Contact interface, nor a way (that I saw) to generically contruct a new contact with the modified info without having to know the underlying type... anyway, all the changes are contained within CallManager.java so it's semi-centralized.
Please let me know what your comments are.
NumberNormalizationDiff.txt (3.44 KB)
On 2/16/2012 3:07 AM, Yana Stamcheva wrote:
I agree, we should have the same rule everywhere we could dial a phone number. I've gone through the code and we seem to have some other cases for which this should be done (phone numbers coming from vCards for example). Could you please open an issue for this one?
On Feb 15, 2012, at 10:02 AM, Aaron Stover (Celestech) wrote:
Some of my co-workers have discovered that the rules for properly formatted numbers differ between the standard dialpad dialog and the conference invite dialog. Specifically, they've been pasting numbers of the form (xxx) xxx-xxxx out of their existing address books and found them to work great when initiating a call but they receive a "failed to parse callee address" message when using the same format to add additional numbers to an existing call (creating a conference call).
I've looked a little at the code and it looks to me like when dialing through the dialpad, the phone number gets normalized via a call to GuiActivator.getPhoneNumberService().normalize() but this does not look to happen when adding numbers via the conference invite dialog.
Where would be the proper place to move the normalize operation so that it occurs in both cases? Maybe do something in ProtocolProviderServiceSipImpl.parseAddressString()?
Thanks In Advance,