Cos.agi: CallerID not Parseable - received Anonymous - exiting with DENY

I have extensions on a remote system that do not send CallerID, they are anonymous.
When a call comes in from one of them to one of my ring groups, it gets denied with cos.agi: Starting Class Of Service checks__cos.agi: CallerID not Parseable - received Anonymous - exiting with DENY
Using the COS module.

0x7f2af411f760 – Probation passed - setting RTP source address to 10.1.1.183:10910
[2017-10-21 15:40:48] NOTICE[114485][C-0000d180]: channel.c:4302 __ast_read: Dropping >incompatible voice frame on SIP/G200AN-00017497 of format g722 since our native format has changed >to (ulaw)
cos.agi: Starting Class Of Service checks
cos.agi: CallerID not Parseable - received Anonymous - exiting with DENY
– AGI Script Executing Application: (Goto) Options: (macro-trunk-dial,barred,1)
– Goto (macro-trunk-dial,barred,1)
– <SIP/G200AN-00017497>AGI Script cos.agi completed, returning 0
[2017-10-21 15:40:48] WARNING[114485][C-0000d180]: pbx.c:6863 __ast_pbx_run: Channel >‘SIP/G200AN-00017497’ sent to invalid extension but no invalid handler: context,exten,priority=macro->trunk-dial,barred,2

How would you expect this to work? You aren’t sending callerid cos can’t do anything because it doesn’t know what to do

Let the call proceed as it’s coming from a trunk, like it’s a call with CallerID.
Don’t see why COS should interfere there, as it controls permissions for internal extensions only.

Asterisk makes no distinction between trunk calls or non-trunk calls, the only thing it sees are contexts. To what context are these trunk calls arriving?

from-internal

A trunk should never come into your from-internal dialplan. that is just plain dangerous.

In this case it’s ok, cause it’s a second PBX on the same local network handling our analog sets.

You answered your own question. Your “trunk” is sending anything into ‘from-internal’ So now it’s an internal extension with no callerid. What is the point of hiding the callerid from the second PBX to the first? If you want to go right to the trunk you need to set it to a context that is not from-internal.

There are a few confidential extensions we don’t want people to know the number of and call back.

We want the call to easily be sent out another trunk to the PSTN if needed, hence the from-internal context.

Well you can’t do that and use COS. Sorry.

Ok. Thanks to all for answering.