UNKNOWN CIDLOOKUP.LUA issue

Status
Not open for further replies.

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I am trying to have the incoming dial plan reference the contacts before displaying the incoming caller ID

So I use the following dial plan (attached - please reference attachment)

As you can see the cidlookup.lua is at the bottom. It works great as is. If the contact is in the contacts list, it displays that contacts name as the caller id name.

But

If the contact does not exist it shows UNKNOWN as the caller ID. If I remove the lua line that says cidlookup.lua then the caller ID displays correctly, but it won't reference the contacts list first.

Does anyone know how I can adjust this to ensure it references the contacts list and if not there shows the incoming ID? As it is now, if it is not in the contacts list all incoming shows as UNKNOWN.
 

Attachments

  • screenshot1.png
    screenshot1.png
    55.5 KB · Views: 66
  • screenshot2.png
    screenshot2.png
    63 KB · Views: 64

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I'm not sure that caller-details is the best place to put the call to cidlookup. I generally put the call in the inbound route just before the transfer statement.

cidlookup.lua does not set caller_id_name or effective_caller_id_name unless a contacts match is found so I have no idea where the UNKNOWN is comming from in your case.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
Thank you Adrian - In your solution that would mean if I had 10 DID's pointed to that domain, I would need to insert the cidlookup.lua 10 times, correct?
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
I did try inserting at destination level (see attached)

Same results as above. Shows the contact if it is in there but shows UNKNOWN if it is not
 

Attachments

  • screenshot3.png
    screenshot3.png
    63 KB · Views: 52

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
if I had 10 DID's pointed to that domain, I would need to insert the cidlookup.lua 10 times, correct?
Yes and No.

If you have distinct individual numbers going to individual extensions or applications then yes. But if you have a number range (DDIs) that transfer to a range of extensions then it is possble with a little regex and only one inbound route.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Same results as above. Shows the contact if it is in there but shows UNKNOWN if it is not

cidlookup.lua does not set anything to UNKNOWN. It does attempt to query mod_cidlookup if it exists so maybe this is where UNKNOWN is coming from if you have mod_cidlookup enabled. I do not.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
Ok that was the issue.

cidlookup MOD I had set to enable false, but it still showed running. I set it to true so it would allow me to stop it from running, then I set it back to enabled false.

After doing this it now works as expected. If the name is not in the contact list it is now displaying the caller ID passed from the gateway.

Perfect! Thank you Adrian!
 

mattswainston

Member
Sep 27, 2018
44
1
8
52
whenever I add an lua the following statement that used to transfer to an extension or ring group now changes to the same lnie - what is going on?!!?!?
1636646541217.png
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Hi @mattswainston
I tried to replicate your fault on version 4.5.27 but it all appeared to work fine.

What version are you running? Have you tried adding the lua line using a different PC/Browser?
 

mattswainston

Member
Sep 27, 2018
44
1
8
52
I'm running 4.5.20 and I have tried doing this in edge, internet explorer and chrome - all has the same effect. I can remove the LUA line and it all works normally - so weird!
 
Status
Not open for further replies.