I have queue 1104 with CID prefix set to Parts- that fails to queue 1112 whis has CID prefix set to ${RGPREFIX} that then fails to queue 1116 which rings back to reception.
Here is the call trace
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:2] Answer("Local/[email protected],2", "") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:3] Set("Local/[email protected],2", "__BLKVM_OVERRIDE=BLKVM/1104/Local/[email protected],2") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:4] Set("Local/[email protected],2", "__BLKVM_BASE=1104") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:5] Set("Local/[email protected],2", "DB(BLKVM/1104/Local/[email protected],2)=TRUE") in new stack
[May 12 08:33:28] VERBOSE[28009] logger.c: -- Local/[email protected],1 answered IAX2/evreading-3501
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:6] ExecIf("Local/[email protected],2", "1|Set|_DIAL_OPTIONS=TtrwWM(auto-blkvm)") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:7] Set("Local/[email protected],2", "__NODEST=1104") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:8] GotoIf("Local/[email protected],2", "1?REPCID") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Goto (ext-queues,1104,13)
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:13] NoOp("Local/[email protected],2", "CALLERID(name) is 001189428440") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:14] Set("Local/[email protected],2", "_RGPREFIX=Parts-") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:15] Set("Local/[email protected],2", "CALLERID(name)=Parts-001189428440") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:16] Set("Local/[email protected],2", "MONITOR_FILENAME=/var/spool/asterisk/monitor/q1104-20090512-083328-1242113608.131773") in new stack
[May 12 08:33:28] VERBOSE[28010] logger.c: -- Executing [[email protected]:17] Queue("Local/[email protected],2", "1104|tr|||20") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:1] GotoIf("Local/[email protected],2", "0?ext-local|1145|1") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:2] Macro("Local/[email protected],2", "user-callerid|") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:1] Set("Local/[email protected],2", "AMPUSER=001189428440") in new stack
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: Set
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:2] GotoIf("Local/[email protected],2", "1?report") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Goto (macro-user-callerid,s,11)
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: GotoIf
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:11] GotoIf("Local/[email protected],2", "0?continue") in new stack
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: GotoIf
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:12] Set("Local/[email protected],2", "__TTL=63") in new stack
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: Set
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:13] GotoIf("Local/[email protected],2", "1?continue") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Goto (macro-user-callerid,s,20)
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: GotoIf
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:20] NoOp("Local/[email protected],2", "Using CallerID "Parts-001189428440" <001189428440>") in new stack
[May 12 08:33:28] DEBUG[28011] app_macro.c: Executed application: Noop
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:3] GotoIf("Local/[email protected],2", "0?skipdb") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:4] GotoIf("Local/[email protected],2", "1?skipov") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Goto (from-internal,1145,9)
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:9] Set("Local/[email protected],2", "RRNODEST=1104") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:10] Set("Local/[email protected],2", "__NODEST=1145") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:11] Set("Local/[email protected],2", "RecordMethod=Group") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:12] Macro("Local/[email protected],2", "record-enable|1145|Group") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Executing [[email protected]:1] GotoIf("Local/[email protected],2", "1?check") in new stack
[May 12 08:33:28] VERBOSE[28011] logger.c: -- Goto (macro-record-enable,s,4)
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:2] Answer("Local/[email protected],2", "") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:3] Set("Local/[email protected],2", "__BLKVM_OVERRIDE=BLKVM/1112/Local/[email protected],2") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:4] Set("Local/[email protected],2", "__BLKVM_BASE=1112") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:5] Set("Local/[email protected],2", "DB(BLKVM/1112/Local/[email protected],2)=TRUE") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:6] ExecIf("Local/[email protected],2", "0|Set|_DIAL_OPTIONS=TtrwWM(auto-blkvm)M(auto-blkvm)") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:7] Set("Local/[email protected],2", "__NODEST=1112") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:8] GotoIf("Local/[email protected],2", "0?REPCID") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:9] GotoIf("Local/[email protected],2", "0?REPCID") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:10] NoOp("Local/[email protected],2", "Current RGPREFIX is Parts-....stripping from Caller ID") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:11] Set("Local/[email protected],2", "CALLERID(name)=001189428440") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:12] Set("Local/[email protected],2", "_RGPREFIX=") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:13] NoOp("Local/[email protected],2", "CALLERID(name) is 001189428440") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:14] Set("Local/[email protected],2", "_RGPREFIX=") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:15] Set("Local/[email protected],2", "CALLERID(name)=001189428440") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:16] Set("Local/[email protected],2", "MONITOR_FILENAME=/var/spool/asterisk/monitor/q1112-20090512-083427-1242113608.131777") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Executing [[email protected]:17] Queue("Local/[email protected],2", "1112|t|||20") in new stack
[May 12 08:34:27] VERBOSE[28012] logger.c: -- Started music on hold, class 'default', on Local/[email protected],2
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:1] GotoIf("Local/[email protected],2", "0?ext-local|1145|1") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:2] Macro("Local/[email protected],2", "user-callerid|") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:1] Set("Local/[email protected],2", "AMPUSER=001189428440") in new stack
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: Set
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:2] GotoIf("Local/[email protected],2", "1?report") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Goto (macro-user-callerid,s,11)
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: GotoIf
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:11] GotoIf("Local/[email protected],2", "0?continue") in new stack
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: GotoIf
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:12] Set("Local/[email protected],2", "__TTL=60") in new stack
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: Set
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:13] GotoIf("Local/[email protected],2", "1?continue") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Goto (macro-user-callerid,s,20)
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: GotoIf
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:20] NoOp("Local/[email protected],2", "Using CallerID "001189428440" <001189428440>") in new stack
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: Noop
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:3] GotoIf("Local/[email protected],2", "0?skipdb") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:4] GotoIf("Local/[email protected],2", "1?skipov") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Goto (from-internal,1145,9)
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:9] Set("Local/[email protected],2", "RRNODEST=1112") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]nternal:10] Set("Local/[email protected],2", "__NODEST=1145") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:11] Set("Local/[email protected],2", "RecordMethod=Group") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:12] Macro("Local/[email protected],2", "record-enable|1145|Group") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Executing [[email protected]:1] GotoIf("Local/[email protected],2", "1?check") in new stack
[May 12 08:34:27] VERBOSE[28074] logger.c: -- Goto (macro-record-enable,s,4)
[May 12 08:34:27] DEBUG[28074] app_macro.c: Executed application: GotoIf
extract from extensions_additional
exten => 1116,1,Macro(user-callerid,)
exten => 1116,n,Answer
exten => 1116,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 1116,n,Set(__BLKVM_BASE=${EXTEN})
exten => 1116,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 1116,n,ExecIf($["${REGEX("(M[(]auto-blkvm[)])" ${DIAL_OPTIONS})}" != "1"],Set,_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm))
exten => 1116,n,Set(__NODEST=${EXTEN})
exten => 1116,n,GotoIf($["foo${RGPREFIX}" = "foo"]?REPCID)
exten => 1116,n,GotoIf($["${RGPREFIX}" != "${CALLERID(name):0:${LEN(${RGPREFIX})}}"]?REPCID)
exten => 1116,n,Noop(Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID)
exten => 1116,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}})
exten => 1116,n,Set(_RGPREFIX=)
exten => 1116,n(REPCID),Noop(CALLERID(name) is ${CALLERID(name)})
exten => 1116,n,Set(_RGPREFIX=${RGPREFIX})
exten => 1116,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})
exten => 1116,n,Set(__ALERT_INFO=info=<Bellcore-dr2>)
exten => 1116,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => 1116,n,Queue(1116,t,,,20)
exten => 1116,n,dbDel(${BLKVM_OVERRIDE})
exten => 1116,n,Set(__NODEST=)
exten => 1116,n,Goto(ext-queues,1115,1)
exten => 1116*,1,Macro(agent-add,1116,)
exten => 1116**,1,Macro(agent-del,1116,1116)