Holders Falkirk have been given a home draw against Stirling Albion in the first round of the Ramsdens Cup.
Last season's runners-up Hamilton are at home to Airdrie United, Partick Thistle meet old rivals Clyde and newly relegated Dunfermline go to Forfar.
Dundee travel to Brechin, Morton host Albion Rovers and Cowdenbeath take on Alloa Athletic.
Highland League duo Inverurie Loco Works and Wick Academy play Montrose and Raith Rovers, respectively.
Ramsdens Cup, first round draw (ties to be played on July 28):
South / West
East Stirlingshire v Ayr United
Morton v Albion Rovers
Berwick Rangers v Queen's Park
Dumbarton v Queen of the South
Hamilton Academical v Airdrie United
Stranraer v Stenhousemuir
Annan Athletic v Livingston
Clyde v Partick Thistle
North / East
Brechin City v Dundee
Falkirk v Stirling Albion
Montrose v Inverurie Loco Works
Peterhead v East Fife
Elgin City v Arbroath
Forfar Athletic v Dunfermline Athletic
Wick Academy v Raith Rovers
Cowdenbeath v Alloa Athletic