Parking Lot: CallerID prepend for Timed-Out Orphans

Hi,

I would have filed this as a bug but given my performance over the last week I’m holding off and wanted to run it by the forum first.

I have set a CallerID Prepend for parking lot orphans but the caller ID is always reset to the default for caller. I don’t know if there is another config option I need to avoid this behaviour or whether it is an issue.

Here’s an example of an internal caller being orphaned:

[Apr 21 15:53:11] VERBOSE[7861] pbx.c:     -- Executing [SIP01247@park-dial:2] Set("SIP/1102-00000045", "__ALERT_INFO=<Simple-5>") in new stack
[Apr 21 15:53:11] VERBOSE[7861] pbx.c:     -- Executing [SIP01247@park-dial:3] Set("SIP/1102-00000045", "CALLERID(name)=Orphan:Chris-Dect") in new stack
[Apr 21 15:53:11] VERBOSE[7861] pbx.c:     -- Executing [SIP01247@park-dial:4] Playback("SIP/1102-00000045", "pls-wait-connect-call") in new stack
[Apr 21 15:53:11] VERBOSE[7861] file.c:     -- <SIP/1102-00000045> Playing 'pls-wait-connect-call.gsm' (language 'en')
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [SIP01247@park-dial:5] Goto("SIP/1102-00000045", "from-did-direct,1100,1") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Goto (from-did-direct,1100,1)
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [1100@from-did-direct:1] GotoIf("SIP/1102-00000045", "0?ext-local,1100,1") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [1100@from-did-direct:2] Macro("SIP/1102-00000045", "user-callerid,") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:1] Set("SIP/1102-00000045", "AMPUSER=1102") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:2] GotoIf("SIP/1102-00000045", "0?report") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:3] ExecIf("SIP/1102-00000045", "0?Set(REALCALLERIDNUM=1102)") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:4] Set("SIP/1102-00000045", "AMPUSER=1102") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:5] Set("SIP/1102-00000045", "AMPUSERCIDNAME=Chris-Dect") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:6] GotoIf("SIP/1102-00000045", "0?report") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:7] Set("SIP/1102-00000045", "AMPUSERCID=1102") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:8] Set("SIP/1102-00000045", "CALLERID(all)="Chris-Dect" <1102>") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:9] ExecIf("SIP/1102-00000045", "0?Set(CHANNEL(language)=)") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:10] GotoIf("SIP/1102-00000045", "0?continue") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:11] Set("SIP/1102-00000045", "__TTL=63") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:12] GotoIf("SIP/1102-00000045", "1?continue") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Goto (macro-user-callerid,s,19)
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [s@macro-user-callerid:19] NoOp("SIP/1102-00000045", "Using CallerID "Chris-Dect" <1102>") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Executing [1100@from-did-direct:3] GotoIf("SIP/1102-00000045", "1?skipdb") in new stack
[Apr 21 15:53:13] VERBOSE[7861] pbx.c:     -- Goto (from-did-direct,1100,5)

You can see that it sets the prepended callerID but then still goes of to the DB to get the callerID… the destination for timed out orphans is another extension.

Should I bug it? (2.8Beta)

Thanks,
Chris

the definition of ‘orphans’ is sometimes a bit misleading.

the prepend should only happen if the call is really ‘orphaned’ meaning that the phone that parked it is no longer available to be called (e.g. it was a softphone and the laptop was powered off after parking).

if that is your scenario and the prepend is not working then it may be a bug though if if original caller was an internal extension, the prepend may not work anyhow (still probably a bug, but may not be one that is easy to fix for reasons a bit complicated to describe here). So first try this with an external caller if you still think it is a bug.

Ok, so I was testing internally using the ‘true’ definition you mention, i.e. ignoring the callback to the extension that parked the call and letting it go to the Orphaned Parked calls destination and yes, externally you are right it does work after closer observation/debug (this was hampered by the fact that my phone decided to helpfully look up the number also).

However, it doesn’t work internally but hey, who cares right? I won’t bother bugging it…

So thanks for the sanity check… I do hope I have a better week next week, I’m sure it’s my age…

well technically it is a bug…

this issue is that the call comes back looking just like a new call would look.

We would have to find a way to put some state information and detect that it is coming from the parking lot so macro-user-callerid doesn’t determine that it is just the given device making a call and go lookup their proper CID information as a result.

That is something that I would most likely divert addressing because of the rarity of the situation and the possible overhead to every call ever made to deal with a scenario that happens almost never and is non-critical in nature.

It’s a good catch though, I had never thought about that scenario until your comment here an a quick glance at the above code making me guess what was probably happening.

philippe

p.s. I guess a “proper” way to fix the bug is to modify the tooltip documentation and say the prepend only applies to calls that came in from the outside :slight_smile: