Here’s a log file fragment. Notice it’s getting additional Ring Begin events after Starting simple switch. My theory is that it’s looking for caller ID after the first partial ring, but the caller ID isn’t sent until after the ring pattern is finished. Is there a way to make Asterisk wait for the caller ID?
[Oct 14 07:57:28] VERBOSE[6406] logger.c: – Starting simple switch on ‘DAHDI/2-1’
[Oct 14 07:57:28] NOTICE[6406] chan_dahdi.c: Got event 18 (Ring Begin)…
[Oct 14 07:57:29] NOTICE[6406] chan_dahdi.c: Got event 2 (Ring/Answered)…
[Oct 14 07:57:30] NOTICE[6406] chan_dahdi.c: Got event 18 (Ring Begin)…
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Detected ring pattern: 389,322,313
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Checking 0,0,0
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Checking 389,322,315
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern matched in range: 379 to 399
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern matched in range: 312 to 332
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern check range: 10
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Ring pattern matched in range: 305 to 325
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Distinctive Ring matched context incoming-distinct
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:1] Set(“DAHDI/2-1”, “CHAN=2-1”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:2] Set(“DAHDI/2-1”, “CHAN=2”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:3] GotoIf(“DAHDI/2-1”, “1?zacct:westfall”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Goto (incoming-distinct,s,6)
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:6] Set(“DAHDI/2-1”, “CHAN=6”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:7] NoOp(“DAHDI/2-1”, “6”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@incoming-distinct:8] Macro(“DAHDI/2-1”, “from-zaptel-6,1”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-from-zaptel-6:1] NoOp(“DAHDI/2-1”, “Entering macro-from-zaptel-6 with DID = and setting to: 7174633280”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-from-zaptel-6:2] Set(“DAHDI/2-1”, “__FROM_DID=7174633280”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-from-zaptel-6:3] Goto(“DAHDI/2-1”, “from-trunk,7174633280,1”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Goto (from-trunk,7174633280,1)
[Oct 14 07:57:30] VERBOSE[6406] logger.c: == Channel ‘DAHDI/2-1’ jumping out of macro ‘from-zaptel-6’
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:1] Set(“DAHDI/2-1”, “__FROM_DID=7174633280”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:2] Gosub(“DAHDI/2-1”, “app-blacklist-check,s,1”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@app-blacklist-check:1] GotoIf(“DAHDI/2-1”, “0?blacklisted”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@app-blacklist-check:2] Return(“DAHDI/2-1”, “”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:3] ExecIf(“DAHDI/2-1”, “1 ?Set(CALLERID(name)=)”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:4] Set(“DAHDI/2-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:5] Set(“DAHDI/2-1”, “CALLERPRES()=allowed_not_screened”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [7174633280@from-trunk:6] Goto(“DAHDI/2-1”, “ext-group,602,1”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Goto (ext-group,602,1)
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [602@ext-group:1] Macro(“DAHDI/2-1”, “user-callerid,”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:1] Set(“DAHDI/2-1”, “AMPUSER=”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/2-1”, “0?report”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/2-1”, “1?Set(REALCALLERIDNUM=)”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:4] Set(“DAHDI/2-1”, “AMPUSER=”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:5] Set(“DAHDI/2-1”, “AMPUSERCIDNAME=”) in new stack
[Oct 14 07:57:30] VERBOSE[6406] logger.c: – Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/2-1”, “1?report”) in new stack