Separate country code from phone number

See this post. You would need to re-write (in ruby) the code that is linked to.