Try using ‘ex-girlfriend’ logic instead, You can do a match on your S extension for example.
[test1]
exten = s/_217767[4568],1,Dial(LOCAL/30@from-internal)
exten = s,1,Playtones(congestion)
At first the dialplan is wrong you should have different priorities in order to go on with dialplan. You cannot have in the same section for the same extension s the same priority (1 in your case)
Basically with this code you are saying if CallerID = 2177678 or …74 or 75 or 76 goto Line 30 of the same dialplan section, otherwise goto extension 1 in section from internal.