So this was for a client that wanted to dial a DID from selected CIDs and be able to announce over paging system. That required screening CIDs, then sending DTMFs to activate paging. Being able to list multiple CIDs on the inbound route would have made it easier, but this works:
[from-internal-custom]
exten => 6404105,1,noop("CID Screen ...")
exten => 6404105,n,noop("CID: ${CALLERID(num)}")
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,GotoIf($["${CALLERID(num)}" = "1234567890"]?cont)
exten => 6404105,n,Playback(ss-noservice)
exten => 6404105,n,Hangup()
exten => 6404105,n(cont),Set(_exten_digits=845464)
exten => 6404105,n,noop("Digits: ${exten_digits}")
exten => 6404105,n,Dial(SIP/siprr-out/9876543210,,rM(send))
[macro-send]
exten => s,1,Wait(1)
exten => s,n,SendDTMF(${exten_digits})
Obviously a functional copy would have different CIDs. If there was any way to pattern match the CID numbers I would have done that.