Hi,
So the iPhone is logged in to iMessages with it's number by turning the Message app On in the Settings for the app.
SMS is also enabled so that the iPhone can send and Receive SMS to phones that cannot do iMessages.
Then the Apple has been Activated on the Mac.
Then Added to the iPhone to Link them.
Then the iPhone has been set to join the LAN via WiFi ?
Then the Text Forwarding bit has been Activated ?
It is at this point that the Mac should show the Code Number.
It also helps that on the Mac version the iPhone number is still active in the Receive At list (so it also triggers the "Start Conversations From" drop down).
8:27 pm Sunday; February 14, 2016
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad