I use the default settings for the trunk. No CID manipulation. My best guess is that the cnam info gets lost during the call forwarding process and then the call is set to anonymous even though we have the CID. I don’t want to reprint the entire log but here are some parts. You can see the name and number comes in and then name is stripped and call is passed on as anonymous. I used the enum route as example. The same happens on all other routes.
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [5141111111@from-sip-external:1] NoOp("SIP/202.33.120.217-000000cc", "Received incoming SIP connection from unknown peer to 5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [5141111111@from-sip-external:2] Set("SIP/202.33.120.217-000000cc", "DID=5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [5141111111@from-sip-external:3] Goto("SIP/202.33.120.217-000000cc", "s,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (from-sip-external,s,1)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@from-sip-external:1] GotoIf("SIP/202.33.120.217-000000cc", "1?checklang:noanonymous") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (from-sip-external,s,2)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@from-sip-external:2] GotoIf("SIP/202.33.120.217-000000cc", "0?setlanguage:from-trunk,5141111111,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (from-trunk,5141111111,1)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [5141111111@from-trunk:1] Macro("SIP/202.33.120.217-000000cc", "exten-vm,5141111111,5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:1] Macro("SIP/202.33.120.217-000000cc", "user-callerid,") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:1] Set("SIP/202.33.120.217-000000cc", "AMPUSER=5149999999") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:2] GotoIf("SIP/202.33.120.217-000000cc", "0?report") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:3] ExecIf("SIP/202.33.120.217-000000cc", "1?Set(REALCALLERIDNUM=5149999999)") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:4] Set("SIP/202.33.120.217-000000cc", "AMPUSER=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:5] Set("SIP/202.33.120.217-000000cc", "AMPUSERCIDNAME=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:6] GotoIf("SIP/202.33.120.217-000000cc", "1?report") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (macro-user-callerid,s,9)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:9] GotoIf("SIP/202.33.120.217-000000cc", "0?continue") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:10] Set("SIP/202.33.120.217-000000cc", "__TTL=64") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:11] GotoIf("SIP/202.33.120.217-000000cc", "1?continue") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (macro-user-callerid,s,18)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-user-callerid:18] NoOp("SIP/202.33.120.217-000000cc", "Using CallerID "Mr. Spiderman" <5149999999>") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:2] Set("SIP/202.33.120.217-000000cc", "RingGroupMethod=none") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:3] Set("SIP/202.33.120.217-000000cc", "VMBOX=5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:4] Set("SIP/202.33.120.217-000000cc", "__EXTTOCALL=5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:5] Set("SIP/202.33.120.217-000000cc", "CFUEXT=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:6] Set("SIP/202.33.120.217-000000cc", "CFBEXT=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:7] Set("SIP/202.33.120.217-000000cc", "RT=25") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:8] Macro("SIP/202.33.120.217-000000cc", "record-enable,5141111111,IN") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-record-enable:1] MacroExit("SIP/202.33.120.217-000000cc", "") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-exten-vm:9] Macro("SIP/202.33.120.217-000000cc", "dial-one,25,tr,5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:1] Set("SIP/202.33.120.217-000000cc", "DEXTEN=5141111111") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:2] Set("SIP/202.33.120.217-000000cc", "DIALSTATUS_CW=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:3] GosubIf("SIP/202.33.120.217-000000cc", "0?screen,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:4] GosubIf("SIP/202.33.120.217-000000cc", "1?cf,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [cf@macro-dial-one:1] Set("SIP/202.33.120.217-000000cc", "CFAMPUSER=5149999999") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [cf@macro-dial-one:2] ExecIf("SIP/202.33.120.217-000000cc", "0?Return()") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [cf@macro-dial-one:3] Set("SIP/202.33.120.217-000000cc", "DEXTEN=225145555555#") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [cf@macro-dial-one:4] ExecIf("SIP/202.33.120.217-000000cc", "1?Return()") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:5] GotoIf("SIP/202.33.120.217-000000cc", "1?skip1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (macro-dial-one,s,8)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:8] GotoIf("SIP/202.33.120.217-000000cc", "0?nodial") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:9] GotoIf("SIP/202.33.120.217-000000cc", "1?continue") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Goto (macro-dial-one,s,25)
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:25] GotoIf("SIP/202.33.120.217-000000cc", "0?nodial") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:26] GosubIf("SIP/202.33.120.217-000000cc", "0?dstring,1:dlocal,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [dlocal@macro-dial-one:1] Set("SIP/202.33.120.217-000000cc", "DSTRING=Local/225145555555@from-internal/n") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [dlocal@macro-dial-one:2] Return("SIP/202.33.120.217-000000cc", "") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:27] GotoIf("SIP/202.33.120.217-000000cc", "0?nodial") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:28] GotoIf("SIP/202.33.120.217-000000cc", "0?skiptrace") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:29] GosubIf("SIP/202.33.120.217-000000cc", "1?ctset,1:ctclear,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [ctset@macro-dial-one:1] Set("SIP/202.33.120.217-000000cc", "DB(CALLTRACE/225145555555#)=5149999999") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [ctset@macro-dial-one:2] Return("SIP/202.33.120.217-000000cc", "") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:30] Set("SIP/202.33.120.217-000000cc", "D_OPTIONS=tr") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:31] ExecIf("SIP/202.33.120.217-000000cc", "0?SIPAddHeader(Alert-Info: )") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:32] ExecIf("SIP/202.33.120.217-000000cc", "0?SIPAddHeader()") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:33] ExecIf("SIP/202.33.120.217-000000cc", "0?SetMusicOnHold()") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:34] GosubIf("SIP/202.33.120.217-000000cc", "0?qwait,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:35] Set("SIP/202.33.120.217-000000cc", "__CWIGNORE=") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:36] Set("SIP/202.33.120.217-000000cc", "__KEEPCID=TRUE") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] pbx.c: -- Executing [s@macro-dial-one:37] Dial("SIP/202.33.120.217-000000cc", "Local/225145555555@from-internal/n,25,tr") in new stack
[2010-12-18 20:05:45] VERBOSE[17349] app_dial.c: -- Called 225145555555@from-internal/n
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:1] Macro("Local/225145555555@from-internal-e1c7;2", "user-callerid,SKIPTTL,") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-user-callerid:1] Set("Local/225145555555@from-internal-e1c7;2", "AMPUSER=5149999999") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-user-callerid:2] GotoIf("Local/225145555555@from-internal-e1c7;2", "1?report") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Goto (macro-user-callerid,s,9)
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-user-callerid:9] GotoIf("Local/225145555555@from-internal-e1c7;2", "1?continue") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Goto (macro-user-callerid,s,18)
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-user-callerid:18] NoOp("Local/225145555555@from-internal-e1c7;2", "Using CallerID "Mr. Spiderman" <5149999999>") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:2] NoOp("Local/225145555555@from-internal-e1c7;2", "Calling Out Route: Montreal") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:3] Set("Local/225145555555@from-internal-e1c7;2", "MOHCLASS=default") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:4] Set("Local/225145555555@from-internal-e1c7;2", "_NODEST=") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:5] Macro("Local/225145555555@from-internal-e1c7;2", "record-enable,5149999999,OUT,") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-record-enable:1] MacroExit("Local/225145555555@from-internal-e1c7;2", "") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [225145555555@from-internal:6] Macro("Local/225145555555@from-internal-e1c7;2", "dialout-enum,6,225145555555,") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-dialout-enum:1] GosubIf("Local/225145555555@from-internal-e1c7;2", "0?sub-pincheck,s,1") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-dialout-enum:2] Macro("Local/225145555555@from-internal-e1c7;2", "outbound-callerid,6") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:1] ExecIf("Local/225145555555@from-internal-e1c7;2", "0?Set(CALLERPRES()=)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:2] ExecIf("Local/225145555555@from-internal-e1c7;2", "1?Set(REALCALLERIDNUM=5149999999)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:3] GotoIf("Local/225145555555@from-internal-e1c7;2", "0?normcid") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:4] Set("Local/225145555555@from-internal-e1c7;2", "USEROUTCID=5149999999") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:5] GotoIf("Local/225145555555@from-internal-e1c7;2", "1?bypass") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Goto (macro-outbound-callerid,s,7)
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:7] Set("Local/225145555555@from-internal-e1c7;2", "EMERGENCYCID=") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:8] Set("Local/225145555555@from-internal-e1c7;2", "TRUNKOUTCID=") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("Local/225145555555@from-internal-e1c7;2", "1?trunkcid") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Goto (macro-outbound-callerid,s,12)
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:12] ExecIf("Local/225145555555@from-internal-e1c7;2", "0?Set(CALLERID(all)=)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:13] ExecIf("Local/225145555555@from-internal-e1c7;2", "1?Set(CALLERID(all)=5149999999)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("Local/225145555555@from-internal-e1c7;2", "0?Set(CALLERID(all)=)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-outbound-callerid:15] ExecIf("Local/225145555555@from-internal-e1c7;2", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-dialout-enum:3] Set("Local/225145555555@from-internal-e1c7;2", "OUTBOUND_GROUP=OUT_6") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Executing [s@macro-dialout-enum:4] GotoIf("Local/225145555555@from-internal-e1c7;2", "1?nomax") in new stack
[2010-12-18 20:05:45] VERBOSE[17350] pbx.c: -- Goto (macro-dialout-enum,s,6)