CallerID CNAM disappears after Answer() and prefix lost

Hi everyone,
I am using PBX Distro:12.7.8-2302-1.sng7 , PBX Version:16.0.41 and Asterisk Version:18.16.0

I’ve been troubleshooting a strange issue with incoming PJSIP calls on my FreePBX .
Here’s the behavior I’m seeing:

I’m using multiple inbound routes with different prefixes (e.g. 687.., 794.., etc.) added via the macro-prepend-cid.

The CNAM (prefix + number) is shown correctly before the Answer() application.

Right after Answer(), the CNAM disappears.

Example from the Asterisk log:

BEFORE_ANSWER num=6980111111 name=687..6980111111
AFTER_ANSWER num=306980111111 name=

This happens only for some calls — others preserve the CNAM correctly.

Has anyone seen this behavior before — where the provider resends identity headers (PAI/From) after the Answer() causing Asterisk to overwrite the CNAM?

Any suggestion for how to stop Asterisk from rewriting CallerID after Answer() (or how to lock/preserve it) would be greatly appreciated.

Thanks in advance!


George

Are you able to post more (anonymized) logs into pastebin.freepbx.org ? Including Asterisk logs and SIP traces ?