Retrieve all phone info through PHP object-oriented API
If you look in CRM_Contact_BAO_Query, it looks like it takes the "location" return property into account when considering primary, but location is an array but using the api you'd have to somehow put it in the return string, so I'm not sure how you'd specify it.

If you're willing to stray a little from the official api, there is the less official CRM_Contact_BAO_Contact::retrieve(). So something like


$params = array('contact_id' =&gt; 4); // 4 is an example, use the desired contact id
$defaults = array();
$contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults);

And then there's an array under $contact->phone