Hi,
I think Gail has it but I can see one other possibility.
... so I added an account on messages ...
So, was this "Account" that was added the iMessages Account or was it AIM or Jabber/Google
By Default two "Accounts" show up in Messages without doing anything.
The one that is for iMessages that needs an Apple ID added and the Bonjour one that needs activating/Enabling to work with other Macs on the LAN.
From there you can add other accounts using the + icon under the list
First click gives you AOL and Google.
Clicking Other allows you to add AIM (can be a separate registration from AOL) and other Jabber IDs (Google run a Jabber server).
The links Eric supplied should get you to:-
Enable the iPhone Number by turning ON messages on the iPhone.
Enable the Apple ID on the Mac.
To sync between the two Add the Apple ID in Settings > Messages
This will cause a pop up on the Mac to allow the iPhone Number and the iPhone to use the Apple ID.
You can say No to this pop up but the number will still be added and but it will not be Enabled.
As Gail said And I have just reiterated the Apple ID has to be the same on both.
The Link is created at the Server end and it will send the iMessages to all registered devices.
The AOL/AIM or Jabber/Google options cannot connect to the iMessages side of things. (neither can you chat AIM to Jabber/Google or Jabber to AOL).
Bonjour is Mac to Mac on Macs that have Bonjour Active in Messages or iChat if your Mac is older.
Once you have the Apple ID and iPhone Number active in the Preferences > Accounts you can turn some options Off

With two IDs active you can select the "Start New Conversations from" (the drop down does not show if you only have one active)
You can deselect the Apple ID so only the iPhone Number is active.
As Gail Suspects and my Picture shows, you can have other Emails (bad form for them to be other Apple IDs).
Mine IS another Apple ID as I was using two iPhones with Two IDs and had a moment when I did not think something through and now I cannot unlink them. In fact changing this info later can be fraught with issues if you are not careful.

8:42 pm Sunday; July 9, 2017
iMac 2.5Ghz i5 2011 (Sierra)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone 6 iOS 10.x and an iPad (2)