You can do it, but the way I see it will require some asterisk scripting skills, and the CNAM database of course.
You could override the original macro-dialout-trunk and modify it so that it queries the CNAM or internal databases. To override an existing dialplan context, you need to put your code into /etc/asterisk/extensions_override_freepbx.conf. You'll need to copy the entire modified [macro-dialout-trunk] context into this file.
Example:
...
exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)
exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""]?Set(CONNECTEDLINE(num,i)=${DIAL_NUMBER}))
;;; This is the line that puts caller ID as the name of the calling party
exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"!="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:${CALLERID(number)}))
exten => s,n,ExecIf($[$["${DB(AMPUSER/${AMPUSER}/cidname)}" != ""] & $["${CALLERID(name)}"="hidden"]]?Set(CONNECTEDLINE(name,i)=CID:(Hidden)${CALLERID(number)}))
exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
...
You could add or modify the lines to the [macro-dialout-trunk] to query your desired database, something like this:
...
exten => s,n,AGI(iWantTheNameOfThisCompany.agi,${OUTNUM})
exten => s,n,Set(CONNECTEDLINE(name,i)=${awesomeCompanyName})
...
Asterisk will run the iWantTheNameOfThisCompany.agi AGI script, passing the dialed number as argument. The script then could set the ${awesomeCompanyName} variable user in the function CONNECTEDLINE. You can use Perl, PHP, C, Pascal, Bourne Shell - for your query AGI script. it's your choice, really.