Is phone masking so hard?

Everything is considered but there is not a proper library for the phone or anything else.

For example:
0(555) 123 45 67

for input ?