For the U.S. cabotage has a strict definition - the carriage of revenue traffic between two points in the U.S. and/or it's territories by a foreign carrier. Hence there are no codeshares where a foreign carrier can legally carry revenue passengers between two U.S. points that I know of (except very limited emergency provisions).
Because the "9th freedom" which would set international regulations for cabotage has never been ratified by the ICAO, it is strictly up to each country whether to allow it and a few countries do.
Jim