Depends on each carriers terms and conditions.
In regards to QF's LAX-JFK, if booked as a "multi city" trip, you can have the domestic bit as a stopover. I did MEL-LAX, stayed in California for a few days, then continued the LAX-JFK-LAX portion of my trip. Alot cheaper than booking the transcon separately, cheapest was $450 return on Virgin America, Qantas fare was only $1300 right through.