Wholesale definition is "to buy (something) in big quantity with intention to resale". In the case of VoIP a wholesaler acts as a traffic aggregator and exchanger for their customer. Because of the volume of the traffic a wholesaler buys, he obtains much better prices than normal retailers. They sign up contracts with both retail and wholesale VoIP providers and act as middle men for call origination and termination services. When traffic is sent to a wholesale provider, the wholesaler reroutes it to a partner carrier for termination and makes profit from the price difference.
While working with the wholesalers, the latter often use FAS (fake answer start) to make greater revenue (surely out of your pocket). Therefore, providers can sell destinations with dumping prices, often even lesser than prices that direct terminators provide. To determine providers of such kind you can use embedded functionality of the FAS detector. It performs its task by analyzing the media stream in the real-time mode.
Carrier1 uses Streamco Smartswitch. He has contacted agreements on code/price with Carrier2 (who uses Streamco Smartswitch as well) and Carrier3. He receives calls from its PSTN network. Then he reroutes calls to corresponding parters using Least Cost Routing (LCR) criteria (or maybe some other).