I now have asteridex setup and working on my Trixbox/FreePBX (current release) and am trying to see if I can get a CID set when the intercom phone is used which rings through the phone lines. There does not appear to be any sort of CID set/seen (REALCALLERIDNUM=") and so asteridex seems to assign the first entry in the DB. Is there anyway to assign a CID when an intercom system calls through? There must be some identifier somewhere which I can use to assign a CID?
Below is what the call looks like in the full log.
[May 6 08:51:49] NOTICE[12214] chan_zap.c: Got event 18 (Ring Begin)…
[May 6 08:51:50] NOTICE[12214] chan_zap.c: Got event 2 (Ring/Answered)…
[May 6 08:51:53] VERBOSE[12215] logger.c: == Parsing ‘/etc/asterisk/manager.conf’: [May 6 08:51:53] VERBOSE[12215] logger.c: Found
[May 6 08:51:53] VERBOSE[12215] logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: [May 6 08:51:53] VERBOSE[12215] logger.c: Found
[May 6 08:51:53] VERBOSE[12215] logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: [May 6 08:51:53] VERBOSE[12215] logger.c: Found
[May 6 08:51:53] VERBOSE[12215] logger.c: == Manager ‘admin’ logged on from 127.0.0.1
[May 6 08:51:54] VERBOSE[12215] logger.c: == Manager ‘admin’ logged off from 127.0.0.1
[May 6 08:51:54] NOTICE[12214] chan_zap.c: Got event 18 (Ring Begin)…
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:1] NoOp(“Zap/4-1”, "Entering from-zaptel with DID == “) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:2] Ringing(“Zap/4-1”, “”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:3] Set(“Zap/4-1”, “DID=s”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:4] NoOp(“Zap/4-1”, “DID is now s”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:5] GotoIf(“Zap/4-1”, “1?zapok:notzap”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (from-zaptel,s,8)
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:8] NoOp(“Zap/4-1”, “Is a Zaptel Channel”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:9] Set(“Zap/4-1”, “CHAN=4-1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:10] Set(“Zap/4-1”, “CHAN=4”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:11] Macro(“Zap/4-1”, “from-zaptel-4|s|1”) in new stack
[May 6 08:51:54] WARNING[12214] app_macro.c: No such context ‘macro-from-zaptel-4’ for macro ‘from-zaptel-4’
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:12] NoOp(“Zap/4-1”, “Returned from Macro from-zaptel-4”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-zaptel:13] Goto(“Zap/4-1”, “from-pstn|s|1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (from-pstn,s,1)
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:1] Set(“Zap/4-1”, “__FROM_DID=s”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:2] Gosub(“Zap/4-1”, “cidlookup|cidlookup_2|1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:1] MYSQL(“Zap/4-1”, “Connect connid localhost root asteridex”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:2] MYSQL(“Zap/4-1”, “Query resultid 1 SELECT name FROM user1
WHERE out
LIKE ‘%%’”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:3] MYSQL(“Zap/4-1”, “Fetch fetchid 2 CALLERID(name)”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:4] MYSQL(“Zap/4-1”, “Clear 2”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:5] MYSQL(“Zap/4-1”, “Disconnect 1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [cidlookup_2@cidlookup:6] Return(“Zap/4-1”, “”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:3] Gosub(“Zap/4-1”, “app-blacklist-check|s|1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@app-blacklist-check:1] LookupBlacklist(“Zap/4-1”, “”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@app-blacklist-check:2] GotoIf(“Zap/4-1”, “0?blacklisted”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@app-blacklist-check:3] Return(“Zap/4-1”, “”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:4] ExecIf(“Zap/4-1”, “0 |Set|CALLERID(name)=”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:5] Set(“Zap/4-1”, "[email protected]”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:6] Answer(“Zap/4-1”, “”) in new stack
[May 6 08:51:54] DEBUG[12214] chan_zap.c: Took Zap/4-1 off hook
[May 6 08:51:54] DEBUG[12214] chan_zap.c: No echo training requested
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:7] Wait(“Zap/4-1”, “0”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:8] Set(“Zap/4-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:9] SetCallerPres(“Zap/4-1”, “allowed_not_screened”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@from-pstn:10] Goto(“Zap/4-1”, “timeconditions|1|1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (timeconditions,1,1)
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [1@timeconditions:1] GotoIfTime(“Zap/4-1”, “08:00-19:00|mon-sun||?ext-group|600|1”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (ext-group,600,1)
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [600@ext-group:1] Macro(“Zap/4-1”, “user-callerid|”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:1] Set(“Zap/4-1”, “AMPUSER=”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: Set
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:2] GotoIf(“Zap/4-1”, “0?report”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: GotoIf
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:3] ExecIf(“Zap/4-1”, “1|Set|REALCALLERIDNUM=”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: ExecIf
[May 6 08:51:54] DEBUG[12214] app_macro.c: Last app: Set|REALCALLERIDNUM=
[May 6 08:51:54] DEBUG[12214] func_db.c: DB: DEVICE//user not found in database.
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:4] Set(“Zap/4-1”, “AMPUSER=”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: Set
[May 6 08:51:54] DEBUG[12214] func_db.c: DB: AMPUSER//cidname not found in database.
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:5] Set(“Zap/4-1”, “AMPUSERCIDNAME=”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: Set
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:6] GotoIf(“Zap/4-1”, “1?report”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (macro-user-callerid,s,11)
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: GotoIf
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:11] GotoIf(“Zap/4-1”, “0?continue”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: GotoIf
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:12] Set(“Zap/4-1”, “__TTL=64”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: Set
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:13] GotoIf(“Zap/4-1”, “1?continue”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (macro-user-callerid,s,20)
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: GotoIf
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [s@macro-user-callerid:20] NoOp(“Zap/4-1”, “Using CallerID “American Airlines” <>”) in new stack
[May 6 08:51:54] DEBUG[12214] app_macro.c: Executed application: Noop
[May 6 08:51:54] VERBOSE[12214] logger.c: – Executing [600@ext-group:2] GotoIf(“Zap/4-1”, “1?skipdb”) in new stack
[May 6 08:51:54] VERBOSE[12214] logger.c: – Goto (ext-group,600,4)