Configuring Inbound Calls to Execute REST API for Dynamic Extension Assignment

Dynamic Routes is the way to handle this. If you’re able to get a plain text reply back from a simple URL with GET args, then you can use the URL option directly in dynroutes, otherwise you’ll want to use an AGI script that performs the lookup and process the data returned into an extension number.