External number route

Dear Guys,

There’s a scenario. But I’m not sure which module should go with it.

Asterisk’s calling from outside. And I will define a rule according to CLI.

If it comes with a CLI, I’ll authorize the external search authority on the trunk defined in the system.

What should be followed here?

To match a CLI use “ex-girlfriend logic” (google it), or string operations, possibly including regular expressions, with ExecIf, or GoToIf. Asterisk has no concept of a search authority, or a trunk, so I don’t know what the rest means.