For the ctOS mobile app, you are only required to have a Ubisoft Account in order to log into the app. But to play with friends on consoles, you must sign into the PlayStation or Xbox networks with a free PlayStation or Xbox Account when attempting to play against friends on those networks. You will also need make sure that you add their PSN or XBL names to your contacts list by selecting the specific network when doing a username search in the add contacts area.
For the console player, in order to do online features in general, including taking part in ctOS Mobile Challenge matches or receiving ctOS Contact Challenge matches, a PlayStation Plus or Xbox Gold Account is REQUIRED.
If you are using the ctOS mobile app and a friend on your Contact list is always showing as Unavailable, while not in a story mission, idle, or doing other activities, it is likely they are not logged into a PlayStation Plus* or Xbox Gold Account on their console.
Once the ctOS mobile app user has logged into the corresponding network to their friend on the console and the console player does have PlayStation Plus or Xbox Gold Account, the ctOS mobile app user should be able to send Official or Custom challenges to the console player when they are not busy.
*Players on the PS3 are not required to have PlayStation Plus for online Sony services.