Could somebody explain to me the architecture behind chatroulette? I was thinking about a similar project that would only implement Audio support (for starters). Is the best
How can you match up participants? easy. have a variable named "waiting users" which is initially set to null. When a user connects, if "waiting users" is null, make the connecting user the waiting user. If waiting users isn't null, create a new thread that manages those two user's conversation, and set waiting users to null. This "randomness" means that if you have many visitors, conversations should be random. However, if you only have 10 people doing conversations at a time, its not like you'll get amazing results. You need constant disconnects/connects for this to work.
With actionscript, you can easily get access to a microphone device via Microphone.get() [use google to get more info]... You'll have to feed the data you receive to your server.
For the sake of not having to send HTTP headers nonstop, you should create a socket [actionscript supports this, look into flash.net.[Socket/Sockets? i forget]] and connect to a custom written server, which is easily done with c#... I haven't tried it with c++ and haven't worked with java...
The server will act as a "proxy" between your two clients...