Set Outbound CID for specific Extension via CLI / Database Edit

When I make a call, the outbound CID for the extension is set by this statement in macro-outbound-callerid:
exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${AMPUSER}/outboundcid)})
Confirm (in your Asterisk log) that this is the same for you. Confirm that you have set it properly.
At the Asterisk command prompt, type
database show AMPUSER/1234/outboundcid
and you should see the entry for extension 1234.

However, what you are doing seems (to me) an error prone and inefficient workflow. Some examples:

If a user makes calls on behalf of a few different people, departments or organizations, I’d give him an extension for each, on separate line buttons. He’d press the corresponding line button for his call. Callbacks made from device history or contacts would automatically choose the correct ‘line’.

If you have local numbers in many cities, you might prefix the incoming caller ID to indicate which DID was called, and use that prefix to select the outbound CID. It could have mnemonic value, e.g. 0212 for your New York office and 0415 for San Francisco.

If you are an answering service and need to call on behalf of your customers, set up custom dialplan that integrates with your CRM to pull the correct number from the database.

Describe your application in some detail and we may be able to find a way to automate this.