CIDlookup problem results in unknow numbers

Hi

Since a few days suddenly we are getting both on phone display as at CDR a label “Unknow” instead of the caller numer. We have a CIDLookup in inbound routes that sets caller id name from a mysql DB if it’s found. Numbers not found instead of keeping the number in the name field are translated to “Unknow”. I copy the console dump. If I disable lookup the number is keep in the name (but I don’t have the lookup for know numbers :frowning: )

CIDLookup 15.0.27 (downgraded to 15.0.23 with same results)
FreePBX 15.0.37
Asterisk 16.30.0

    -- Executing [cidlookup_1@cidlookup:1] AGI("PJSIP/trunkid-00000076", "agi://127.0.0.1/cidlookup_mysql.agi,192.168.10.246,,username,password,tablename,,select CALLER_DESCRIPTION as nom from cc_caller where caller_id = '12341234'") in new stack
    -- <PJSIP/trunkid-00000076>AGI Script agi://127.0.0.1/cidlookup_mysql.agi completed, returning 0
    -- Executing [cidlookup_1@cidlookup:2] Return("PJSIP/trunkid-00000076", "") in new stack
    -- Executing [43214321@from-pstn:22] NoOp("PJSIP/trunkid-00000076", "CallerID Entry Point") in new stack
    -- Executing [43214321@from-pstn:23] Goto("PJSIP/trunkid-00000076", "ext-group,6264,1") in new stack
    -- Goto (ext-group,6264,1)
    -- Executing [6264@ext-group:1] GotoIf("PJSIP/trunkid-00000076", "0?cid") in new stack
    -- Executing [6264@ext-group:2] PlayTones("PJSIP/trunkid-00000076", "ring") in new stack
    -- Executing [6264@ext-group:3] Progress("PJSIP/trunkid-00000076", "") in new stack
    -- Executing [6264@ext-group:4] Macro("PJSIP/trunkid-00000076", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/trunkid-00000076", "TOUCH_MONITOR=1680182426.238") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/trunkid-00000076", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:3] Set("PJSIP/trunkid-00000076", "CHANCONTEXT=") in new stack
    -- Executing [s@macro-user-callerid:4] Set("PJSIP/trunkid-00000076", "CHANEXTENCONTEXT=trunkid-00000076") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/trunkid-00000076", "CHANEXTEN=trunkid-00000076") in new stack
    -- Executing [s@macro-user-callerid:6] Set("PJSIP/trunkid-00000076", "CALLERID(number)=12341234") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/trunkid-00000076", "AMPUSER=12341234") in new stack
    -- Executing [s@macro-user-callerid:8] Set("PJSIP/trunkid-00000076", "HOTDESCKCHAN=trunkid-00000076") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/trunkid-00000076", "HOTDESKEXTEN=trunkid") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/trunkid-00000076", "HOTDESKCALL=0") in new stack
    -- Executing [s@macro-user-callerid:11] ExecIf("PJSIP/trunkid-00000076", "0?Set(HOTDESKCALL=1)") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("PJSIP/trunkid-00000076", "0?Set(CALLERID(name)=)") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("PJSIP/trunkid-00000076", "0?report") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/trunkid-00000076", "1?Set(REALCALLERIDNUM=12341234)") in new stack
    -- Executing [s@macro-user-callerid:15] Set("PJSIP/trunkid-00000076", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:16] GotoIf("PJSIP/trunkid-00000076", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:17] Set("PJSIP/trunkid-00000076", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:18] ExecIf("PJSIP/trunkid-00000076", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
    -- Executing [s@macro-user-callerid:19] GotoIf("PJSIP/trunkid-00000076", "1?report") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] NoOp("PJSIP/trunkid-00000076", "Macro Depth is 1") in new stack
    -- Executing [s@macro-user-callerid:29] GotoIf("PJSIP/trunkid-00000076", "1?report2:macroerror") in new stack
    -- Goto (macro-user-callerid,s,30)
    -- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/trunkid-00000076", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:31] ExecIf("PJSIP/trunkid-00000076", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/trunkid-00000076", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:33] GotoIf("PJSIP/trunkid-00000076", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,49)
    -- Executing [s@macro-user-callerid:49] Set("PJSIP/trunkid-00000076", "CALLERID(number)=12341234") in new stack
    -- Executing [s@macro-user-callerid:50] Set("PJSIP/trunkid-00000076", "CALLERID(name)=Unknown") in new stack
    -- Executing [s@macro-user-callerid:51] GotoIf("PJSIP/trunkid-00000076", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:52] Set("PJSIP/trunkid-00000076", "CDR(cnam)=Unknown") in new stack
    -- Executing [s@macro-user-callerid:53] Set("PJSIP/trunkid-00000076", "CDR(cnum)=12341234") in new stack
    -- Executing [s@macro-user-callerid:54] Set("PJSIP/trunkid-00000076", "CHANNEL(language)=es") in new stack

Many thanks for your help,

The value is set by the AGI script. As far as I can tell, that has always been the case, although the FreePBX GIT repository started asking me to login - I guess I exceeded a limit on free views - so my checks for that were incomplete.

What was supposed to be setting it the same as the caller ID? The SIP default would be to not have the field at all, rather than duplicate any part of the URI.

Looking further, this has changed in release 17:

That refers to a bug report that is discussed here:

and seems to say that some versions of 15 and 16 have also been updated.

What I think was always there before was starting with a default of “unknown”, but I suspect the exact way it reacted to not finding it in the database may have changed.

Thanks David,

I checked log and seems last year on july during some days it was giving unknow and later the same month it was self-fixed (autoupdate). It has been working ok until 27 march, when it broke again.

I downgraded to 15.0.20 and it works again, but upgrading to any other version reverses and we get the “Unknow”, which is displayed on the phone bigger than the number.

Thanks

The code is actually setting it to “Unknown”, and that is what your log shows. If you are getting less, the phone is probably garbling it.

The claim is that it should be fixed from 15.0.25 and 16.0.12.

It is in those spot releases, but code to set the name back to “Unknown” is back in subsequent releases. The original bug fixL

https://issues.freepbx.org/browse/FREEPBX-23578

seems to have caused a regression elsewhere:

https://issues.freepbx.org/browse/FREEPBX-23954

I don’t know if too much has been reverted, or whether there is a deeper problem. All I can say with a quick look is that the first change made it impossible to set the name to Unknown, and the second one made it possible again. I’m not sure if the circumstances where this can happen are the same as before the first change.

I think you need to raise an issue pointing out that 23954 has caused a regression of 23578.

Thanks david55 , sorry for the late reply, now I see that I forgot to answer. I already opened a issue, and meanwhile edited cidlookup_mysql.agi to bypass the Unknow callerid issue.

I just updated all of our FreePBX modules over the weekend. We started running into the “UNKNOWN” caller ID issue today. I just rolled back the callerID module to 15.0.25 and it seems to be working again now.

I was the one that originally reported [FREEPBX-23578] CallerID Lookup Module No Longer Passing Default Caller ID Through - Sangoma Issue Tracker

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.