Superfecta only works in DEBUG mode

I’ve enabled CID Superfecta on all my INBOUND routes with the DEFAULT scheme (thats all I have). Debug mode work and I get an email sent to me (adding some sources that handle spam will break this, right now here is what I have set to YES

When I dial into a route that goes directly to VM no email is generated. any ideas whats going on?
Leon

  	  	Data Source Name 	Description 	Enabled
		Asterisk Phonebook 	Searches the built in Asterisk Phonebook for caller ID information. This is a very fast source of information.

If you are caching to the phonebook, this should be the first lookup source. Yes No
OpenCNAM https://www.opencnam.com This data source returns CNAM data for any NANPA phone number (any number that starts with +1). Yes No
TrueCNAM truecnam.com lookup module can pull CNAM, stored CNAM and spam score. Yes No
Telco Data http://www.telcodata.com - These listings are generally only return the geographic location of the caller, not a name. Yes No
FccComplaints https://opendata.fcc.gov - This module checks for complaints to the fcc against a given phone number Yes No
Who Called https://whocalled.us - Caller ID Name and SPAM report listings as provided by the whocalled service. Authentication is optional, and is configured by clicking on this data source. Yes No
Send to email This module will send a notification email for all inbound calls to the user supplied email addresses. Yes No

dialing an inbound that rinds an extension I let it hit VM before hanging up again and no email either

on more item looking at the tail of the maillog nothing is sent at all when a call comes in. when I do it in debug mode you definitely (obviously) see the message going out.

Try ordering your Send-to source(s) above your lookup source(s).

1 Like

that worked but on incredible pbx I had it set the way I had it and it always worked.

Thanks leon

There is a known issue with Superfecta that causes this, and you are right it was not always this way.

Hi Lorne…good I’m assuming it will be fixed? also as I previously mentioned adding some of the spam sources seems to cause errors when you run debug mode.

Leon

Us too - the Superfecta developers should be notified. FreePBX just uses it.

The superfecta developers work for sangoma and both of them have replied in this thread.

Lorne…I caught a DID that fails sending email; whenever that whoops comes up emails dont go out. Leon

Debug is on and set at level: 1
The Original Number: 4849830858
The Scheme: Default
Scheme Type: SINGLEFECTA
Debugging Enabled, will not stop after first result

Scheme Asked is: Default
The DID is: 5555555555
The CNUM is: 4849830858
The CNAME is: CID Superfecta!

Starting scheme Default
Executing Send to email
Searching Send to Email …
result took 0.0005 seconds.

Executing Asterisk Phonebook
Searching Asterisk Phonebook …
not found
result took 0.0011 seconds.

Executing OpenCNAM
Searching OpenCNAM …
CNAM determined good.
'Philadelphi, PA’
result took 0.3113 seconds.

Executing TrueCNAM
TrueSpam enabled
TrueSpam Score available
result took 0.3349 seconds.

Executing Telco Data
Searching Telco Data … : 4849830858
’W CHESTER, PA’
result took 0.0698 seconds.

Executing FccComplaints
Searching FCC Data source…
0 reports found, Not a SPAM caller. You can raise the spam threshold in settings.
result took 0.6106 seconds.

Executing Who Called
Searching Who Called for number of user reports …
Score not found
Searching Who Called for CNAM…
CNAM not found
{“error”:{“type”:“Whoops\Exception\ErrorException”,“message”:“Undefined variable: caller_id”,“file”:"/var/www/html/admin/modules/superfecta/sources/source-Who_Called.module",“line”:132}}

Lorne…another bug…check this FULL DEBUG please. PLease note SPAM was NOT in the email nor the callerid displayed and the call was NOT directed to to my SPAM mailbox:

-------- Forwarded Message --------
Subject: Incoming call from Philadelphi, PA at 2676781015
Date: Tue, 5 Sep 2017 14:57:44 -0400 (EDT)
From: [email protected]
To: [email protected]

Incoming call from Philadelphi, PA at 2676781015. Automated notification email sent by the POSSA Superfecta Caller ID Module


Debug is on and set at level: 3
The Original Number: 2676781015
The Scheme: Default
Scheme Type: SINGLEFECTA
Debugging Enabled, will not stop after first result

Scheme Asked is: Default
The DID is: 5555555555
The CNUM is: 2676781015
The CNAME is: CID Superfecta!

Starting scheme Default
Executing Send to email
Searching Send to Email …
result took 0.0004 seconds.

Executing Asterisk Phonebook
Searching Asterisk Phonebook …
not found
result took 0.0011 seconds.

Executing OpenCNAM
Searching OpenCNAM …
Orignal Raw Returned Data:
Philadelphi, PA

CNAM determined good.
'Philadelphi, PA’
result took 0.0635 seconds.

Executing TrueCNAM
TrueSpam enabled
Orignal Raw Returned Data:
{“called_number”: “”, “proposed_calling_number”: “”, “extended_name”: “”, “queries_per_minute_remaining”: 1, “queries_per_day_remaining”: 21, “spam_score”: 100, “calling_number”: “12676781015”, “spam_score_match”: 1, “err”: “0”, “true_clid”: “unknown”, “cnam_match”: 0, “error_msg”: “”, “name”: “”}

TrueSpam Score available
result took 0.3313 seconds.

Executing Telco Data
Searching Telco Data … : 2676781015
Orignal Raw Returned Data:

<?xml version="1.0" encoding="UTF-8"?> 267 678 YES 1 NOCLLIKNOWN PA PHLDLPHZN2 967E PEERLESS NETWORK OF PENNSYLVAN CLEC 04/04/2013

'PHLDLPHZN2, PA’
result took 0.0709 seconds.

Executing FccComplaints
Searching FCC Data source…
Orignal Raw Returned Data:
[]

0 reports found, Not a SPAM caller. You can raise the spam threshold in settings.
result took 0.6267 seconds.

Executing Who Called
Searching Who Called for number of user reports …
SPAM URL: https://whocalled.us/do?action=getScore&name=LeonZetekoff&pass=Leonz$4199&phoneNumber=2676781015&days=365
Orignal Raw Returned Data:
success=1&score=0

Score not found
Searching Who Called for CNAM…
NAME URL: https://whocalled.us/do?action=getWho&name=LeonZetekoff&pass=Leonz$4199&phoneNumber=2676781015
Orignal Raw Returned Data:
success=1&who=Eagleville%2C+PA

'Eagleville%2C+PA’
result took 0.4827 seconds.

Converting result to UTF-8
Post CID retrieval processing
Executing Send to email
Email sent to [email protected] Incoming call from Philadelphi, PA at 2676781015
Done
This scheme would set the caller id to: SPAM Philadelphi, PA

Returned Result would be:SPAM Philadelphi, PA
result took 1.6051669120789 seconds

Lorne – here’s another did that seems to create an error. I did get an email but no spam on it but I never heard the phone ring so this one might have went to the spam mailbox.

-------- Forwarded Message --------
Subject: Incoming call from Claims Dept at 4758977304
Date: Tue, 5 Sep 2017 15:07:47 -0400 (EDT)
From: [email protected]
To: [email protected]

Incoming call from Claims Dept at 4758977304. Automated notification email sent by the POSSA Superfecta Caller ID Module

==========================================

Debug is on and set at level: 3
The Original Number: 4758977304
The Scheme: Default
Scheme Type: SINGLEFECTA
Debugging Enabled, will not stop after first result

Scheme Asked is: Default
The DID is: 5555555555
The CNUM is: 4758977304
The CNAME is: CID Superfecta!

Starting scheme Default
Executing Send to email
Searching Send to Email …
result took 0.0004 seconds.

Executing Asterisk Phonebook
Searching Asterisk Phonebook …
not found
result took 0.0016 seconds.

Executing OpenCNAM
Searching OpenCNAM …
Orignal Raw Returned Data:
Claims Dept

CNAM determined good.
'Claims Dept’
result took 0.8357 seconds.

Executing TrueCNAM
TrueSpam enabled
Orignal Raw Returned Data:
{“called_number”: “”, “proposed_calling_number”: “”, “extended_name”: “”, “queries_per_minute_remaining”: 1, “queries_per_day_remaining”: 18, “spam_score”: 100, “calling_number”: “14758977304”, “spam_score_match”: 1, “err”: “0”, “true_clid”: “unknown”, “cnam_match”: 0, “error_msg”: “”, “name”: “”}

TrueSpam Score available
result took 0.1047 seconds.

Executing FccComplaints
Searching FCC Data source…
Orignal Raw Returned Data:
[{“advertiser_business_phone_number”:“475-897-7304”,“caller_id_number”:“475-897-7304”,“city”:“Goodyear”,“id”:“1786586”,“issue”:“Unwanted Calls”,“issue_date”:“2017-07-18T00:00:00.000”,“issue_time”:“3:04 pm”,“issue_type”:“Phone”,“location_1”:{“type”:“Point”,“coordinates”:[-112.388703,33.480367]},“location_1_city”:“AZ”,“location_1_zip”:“85395”,“method”:“Wired”,“state”:“AZ”,“ticket_created”:“2017-07-18T17:19:59.000”,“type_of_call_or_messge”:“Abandoned Calls”,“zip”:“85395”}
,{“advertiser_business_phone_number”:“None”,“caller_id_number”:“475-897-7304”,“city”:“Dalton Gardens”,“id”:“1681880”,“issue”:“Unwanted Calls”,“issue_date”:“2017-06-02T00:00:00.000”,“issue_type”:“Phone”,“location_1”:{“type”:“Point”,“coordinates”:[-116.793,47.722408]},“location_1_city”:“ID”,“location_1_zip”:“83815”,“method”:“Wired”,“state”:“ID”,“ticket_created”:“2017-06-02T16:17:37.000”,“type_of_call_or_messge”:“Prerecorded Voice”,“zip”:“83815”}
,{“advertiser_business_phone_number”:“None”,“caller_id_number”:“475-897-7304”,“city”:“Paris”,“id”:“1681508”,“issue”:“Unwanted Calls”,“issue_date”:“2017-06-02T00:00:00.000”,“issue_type”:“Phone”,“location_1”:{“type”:“Point”,“coordinates”:[-88.32572,36.305637]},“location_1_city”:“TN”,“location_1_zip”:“38242”,“method”:“Internet (VOIP)”,“state”:“TN”,“ticket_created”:“2017-06-02T14:28:04.000”,“type_of_call_or_messge”:“Abandoned Calls”,“zip”:“38242”}
,{“advertiser_business_phone_number”:“None”,“caller_id_number”:“475-897-7304”,“city”:“Garner”,“id”:“1679214”,“issue”:“Unwanted Calls”,“issue_date”:“2017-05-31T00:00:00.000”,“issue_type”:“Phone”,“location_1”:{“type”:“Point”,“coordinates”:[-78.587726,35.660024]},“location_1_city”:“NC”,“location_1_zip”:“27529”,“method”:“Wired”,“state”:“NC”,“ticket_created”:“2017-06-01T15:52:32.000”,“type_of_call_or_messge”:“Abandoned Calls”,“zip”:“27529”}
,{“advertiser_business_phone_number”:“None”,“caller_id_number”:“475-897-7304”,“city”:“Manhattan”,“id”:“1532047”,“issue”:“Unwanted Calls”,“issue_date”:“2017-03-28T00:00:00.000”,“issue_type”:“Phone”,“location_1”:{“type”:“Point”,“coordinates”:[-96.557276,39.171709]},“location_1_city”:“KS”,“location_1_zip”:“66502”,“method”:“Wired”,“state”:“KS”,“ticket_created”:“2017-03-28T17:08:23.000”,“type_of_call_or_messge”:“Prerecorded Voice”,“zip”:“66502”}]

5 reports found, determined to be SPAM. You can lower the spam threshold in settings.
result took 0.2127 seconds.

Executing Who Called
Searching Who Called for number of user reports …
SPAM URL: https://whocalled.us/do?action=getScore&name=LeonZetekoff&pass=Leonz$4199&phoneNumber=4758977304&days=365
Orignal Raw Returned Data:
success=1&score=0

Score not found
Searching Who Called for CNAM…
NAME URL: https://whocalled.us/do?action=getWho&name=LeonZetekoff&pass=Leonz$4199&phoneNumber=4758977304
Orignal Raw Returned Data:
success=1&who=

CNAM not found
{“error”:{“type”:“Whoops\Exception\ErrorException”,“message”:“Undefined variable: caller_id”,“file”:"/var/www/html/admin/modules/superfecta/sources/source-Who_Called.module",“line”:132}}

File a ticket https://issues.freepbx.org

thanks james

Leon:

Without forcing me to look line by line through the debug, can you summarize what the issue is. The “Undefined variable” issue only shows up on one of your two examples.

Lorne…the first one… PLease note SPAM was NOT in the email nor the callerid displayed and the call was NOT directed to to my SPAM mailbox:

the second one…I did get an email but no spam on it but I never heard the phone ring so this one might have went to the spam mailbox. this is the one with the undefined variable

I already created a ticket in the issues database earlier this afternoon.

HTH

Leon

Hi Leon:

In both cases your clarification is a literal word for word restatement of your original posts. I have gone through the output you’ve provided twice now for both cases, and the ONLY thing I see is that the WhoCalled lookup source is broken. You appear to believe that Superfecta is not meeting your expectations for these two cases. If that’s so, it would be helpful to know what your expectation is and which specific lookup source is causing the issue.

Also vague speculations on what might have happened will not cut it. If there is a problem with call handling, it must be accompanied by a call trace.

Hi Lorne…
my expectations are if there is a known SPAM call and is flagged that the emailed notification has that tagged as well as the callerid/cname displayed on the instruments dialed. That is not happening it seems.

Problem is I come back later and look at the received emails to see what calls I deliberately do not answer because of all the spam lately then I sometimes run a superfecta debug or I go to 411.com and plop the DID in there and it reports back yeah or nay on spam.

I’ll try and get an asertisk debug for you.

================================

back to displaying the DID of the trunk in superfecta. The asterisk folks were confused by my terminology since the have no idea what a inbound route is. SO I ran an asterisk debug and this is what I got. Superfecta already knows the DID see the snippet below. How can we get that variable into the email etc?

Note:

Trunk (inbound DID or called number) = 4848246825
Calling number (source) = 484765-8051

[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:12] GotoIf("SIP/vitel-inbound-00000002", "0?macro-hangupcall") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:13] NoOp("SIP/vitel-inbound-00000002", "") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:14] Set("SIP/vitel-inbound-00000002", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:15] Set("SIP/vitel-inbound-00000002", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:16] Set("SIP/vitel-inbound-00000002", "CALLERID(name-pres)=allowed_not_screened") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:17] Set("SIP/vitel-inbound-00000002", "CALLERID(num-pres)=allowed_not_screened") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:18] Set("SIP/vitel-inbound-00000002", "CIDSFSCHEME=YmFzZV9EZWZhdWx0") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:19] AGI("SIP/vitel-inbound-00000002", "/var/www/html/admin/modules/superfecta/agi/superfecta.agi") in new stack
[2017-09-06 09:59:31] VERBOSE[9884][C-00000003] res_agi.c: Launched AGI Script /var/www/html/admin/modules/superfecta/agi/superfecta.agi
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Executing Scheme..
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Scheme Asked is: Default
**[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: The DID is: 4848246825**
**[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: The CNUM is: 4847658051**
**[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: The CNAME is: 4847658051**
**[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi:**
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Starting scheme Default
[2017-09-06 09:59:32] VERBOSE[9879][C-00000002] app_dial.c: SIP/VoIPms-00000001 is making progress passing it to PJSIP/701-00000000
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Converting result to UTF-8
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Setting caller id to: Backwoods Wirel
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: CID Determined to be: 'Backwoods Wirel'
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: /var/www/html/admin/modules/superfecta/agi/superfecta.agi: Attempting to set lookupcid
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] res_agi.c: <SIP/vitel-inbound-00000002>AGI Script /var/www/html/admin/modules/superfecta/agi/superfecta.agi completed, returning 0
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:20] Set("SIP/vitel-inbound-00000002", "CALLERID(name)=Backwoods Wirel") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:21] NoOp("SIP/vitel-inbound-00000002", "CallerID Entry Point") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:22] Macro("SIP/vitel-inbound-00000002", "prepend-cid,6825: ") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:1] GotoIf("SIP/vitel-inbound-00000002", "1?REPCID") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx_builtins.c: Goto (macro-prepend-cid,s,5)
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:5] Set("SIP/vitel-inbound-00000002", "_RGPREFIX=6825: ") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:6] Set("SIP/vitel-inbound-00000002", "CALLERID(name)=6825: Backwoods Wirel") in new stack
[2017-09-06 09:59:32] VERBOSE[9884][C-00000003] pbx.c: Executing [[email protected]:23] Goto("SIP/vitel-inbound-00000002", "ext-local,vmu798,1") in new stack

let me know if you need anything more lorne…thanks

has any progress happened with this

i have the same issue
however as above putting the send to email at the top before searches
i am getting the email