The example uses directly libebook, you should not do that. You have to get the default aggregator (osso_abook_aggregator_get_default), wait for it until it's ready (osso_abook_waitable_call_when_ready) and then search for the matching contacts (osso_abook_aggregator_find_contacts_for_phone_num ber).