There have been a few attempts to transmit messages to the stars with the assumption that there may be extraterrestrial civilizations somewhere out there to receive them. These messages (such as the infamous Arecibo message) were constructed based on certain assumptions about the way a message could be structured so that it could be decoded and understood by intelligent beings on a technological par with us. The Arecibo message, for example, has been subsequently deemed flawed due to the inability of test subjects to decipher it.
In Carl Sagan's novel Contact (and its movie adaptation), there is a depiction of a message received from space, the structure of the message, and the effort to interpret it. It highlights some of the challenges of both constructing and interpreting a message where neither sender nor recipient knows anything about the other's language, culture, or level of science and technology.
The question is: if you are going to send a "message in a bottle" to the stars as a radio transmission, and you just want it to be the equivalent of "hello, we're here and we want to be friends and get to know you", how do you design and encode such a message so that a recipient on a technological par with us has a good chance at understanding it? What technical choices do you make? How do you construct it so that it can say something meaningful without requiring the understanding of any human language?
Seems I need to add some further clarification to my question. I am not asking about choice of medium or spectrum (radio vs light, gamma pulse, whatever) but instead, given a suitable medium with which we can transmit a signal within which we have placed a constructed message, how do we arrange the information in that message so that a civilization with no prior knowledge of human language or culture could correctly interpret it? Further assuming it will be a stream of bits, how do we encode our message into bits? Given that the recipient has received our bit stream from their receiving apparatus, what steps would they have to perform to recover the intended meaning from that bit stream?