Preventing answering unknown DID and responding with SIP 404

Still can’t come up with a way to prevent “The number you have dialed is not in service…” response by *. Need not to answer unknown DID and respond with SIP 404.

Posting once more to get new ideas. Thanks.

send undefined DID to a working route.