Add phone url generation

This generates a phone number URL following the pattern set forth in
RFC 2806 http://www.ietf.org/rfc/rfc2806.txt specifying extensions as a
post-dial string.
Reformat if/else blocks