WASHINGTON—In a rare bipartisan achievement, Congress has moved to combat the scourge of robocalls inundating Americans.

Just don’t expect the phone to stop ringing any time soon.

The robocall law, which passed both the House and Senate by wide margins, prods phone companies to cut off illegal marketers or scammers before the phone rings...