I am having an issue setting up CID for individual extensions


I am running out of a PostgreSQL DB and have created a Users Table

Using Lua I am dynamically generating the Directory

I have a column in the table for CID, but have been unsuccessful in implementing CID for outbound calling


I want the extension to display internally, but to add CID when calling outside of the system


How can I implement this?  And can it be done using Lua to dynamically lookup in the DB for each users CID?