Kilmarnock will host Ayr United in the second round of the Scottish League Cup.
The Ayrshire derby was one of 11 ties drawn at Murrayfield, with five Premiership sides entering the competition at this stage.
Partick Thistle visit Greenock Morton, Stenhousemuir host Hearts and St Mirren taken on Dunfermline.
The winner of the first-round tie between Queen's Park and Rangers will have a home tie against Inverness.
Matches will be played on 26 and 27 August.
Ian Murray takes his Dumbarton side to Easter Road to face old club Hibernian.
Ross County make the long journey from the Highlands to face Stranraer and there's an all-Championship tie between Livingston and Queen of the South.
|Scottish League Cup Second Round|
|Greenock Morton||v||Partick Thistle|
|Queen's Park or Rangers||v||Inverness Caledonian Thistle|
|Hamilton Academical||v||Alloa Athletic|
|Livingston||v||Queen of the South|
|Stenhousemuir||v||Heart of Midlothian|
|St Mirren||v||Dunfermline Athletic|
The tie of the round will be at Rugby Park. Kilmarnock last met Ayr United in the League Cup when the two clashed at Hampden in 2012, when an injury time strike by Dean Shiels settled the semi-final before they went on to win the trophy against Celtic.
Inverness, who went agonisingly close to winning the trophy last year before losing on penalties to Aberdeen, knocked Rangers out at Ibrox two seasons ago and may have to do the same again should Ally McCoist's men win the one outstanding tie from round one.
Holders Aberdeen do not enter until the third round, along with Celtic, Motherwell and St Johnstone.