Matt
2.get the number by this id and save it to %Cnum
sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "SELECT normalized_number FROM phone_lookup WHERE raw_contact_id=%Cid";
3.in case the contact have many phone numbers, split the %Cnum and get the first one cause it's the primary number
variable set %newline to \n .\n is carriage-return.
variable split %Cnum splitter %newline
that's it, %Cnum(1) is what you want