Trying to use CID superfecta and found two issues. Because the OpenCNAM doesn’t seem so open anymore, I decided to give a try with EZCNAM.com that works over http.
So, CID superfecta doesn’t seem to support simple http queries. Very weird, is it correct or I’m doing something wrong??? It’s pretty basic thing, I’d be surprised if it doesn’t work.
Trunk_provided module works, but the option “Discard Numeric” when enabled, does nothing. One trunk passes a number again as a CID name and it goes thru, while shouldn’t.
Debug is on and set at level: 3
The Original Number: 480686xxxx
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: 480686xxxx
The CNAME is: CID Superfecta!
Starting scheme Default
Executing Asterisk Phonebook
Searching Asterisk Phonebook ...
not found
result took 0.0039 seconds.
Executing Trunk Provided
Looking for Trunk Provided Caller ID ...
We're in Debug/Test mode, this module only runs on live calls.
result took 0.0004 seconds.
Executing PhoneSpamFilter
Searching PhoneSpamFilter...
Orignal Raw Returned Data:
0
Found 0
Not a SPAM caller
result took 0.5020 seconds.
Executing Send to URL
Searching Send to URL ...
result took 0.0004 seconds.
Executing Telco Data
Searching Telco Data ... : 480686xxxx
Orignal Raw Returned Data:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root SYSTEM "areacodexml.dtd">
<root>
<exchangedata>
<npa>480</npa>
<nxx>686</nxx>
<valid>YES</valid>
<validnumeric>1</validnumeric>
<clli>CHNDAZ79DS0</clli>
<state>AZ</state>
<ratecenter>PHOENIX</ratecenter>
<ocn>318J</ocn>
<company>COMCAST IP PHONE, LLC</company>
<companytype>IPES</companytype>
<assigndate>01/04/2007</assigndate>
<englishname>CHANDLER</englishname>
<switchtype></switchtype>
<tandem></tandem>
</exchangedata>
</root>
'PHOENIX, AZ'
result took 0.1712 seconds.
Converting result to UTF-8
Post CID retrieval processing
Executing Send to URL
Send to URL: http://api.ezcnam.com/v1?key=xxxxxxxx&phone=480686xxxx&out=text
Orignal Raw Returned Data:
NAME LASTNAME
Done
This scheme would set the caller id to: PHOENIX, AZ
Returned Result would be:PHOENIX, AZ
result took 1.0781168937683 seconds
So the name is resolved correctly by ezcnam, can tell from the log. But never used. Also, “Send to URL” is executed in like two chunks, once in unreasonably quick timing, then afterwards, with correct data output. If only "“send to url” is selected as a source, result is “No callerid found”.
Tried changing the format to xml and json as well but no luck
The superfecta module Send to URL is only used to send CNAM data to an external API after the name has been found. If you want to query an external URL for name data, the superfecta module to do this is called Regular Expressions 1.
It would be quite easy to provide an EZCNAM module for superfecta, just need to create a file in the style of