Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awesome little daemon. #4

Open
sejmann opened this issue Sep 26, 2016 · 4 comments
Open

Awesome little daemon. #4

sejmann opened this issue Sep 26, 2016 · 4 comments

Comments

@sejmann
Copy link

sejmann commented Sep 26, 2016

This isn't really an issue, so close it as you see fit.

It took me a little bit to figure out how twilio/white_pages_pro worked, but I like it. It rejected it's first nuisance call tonight and made me very happy. I had no idea there was such a service with an indefinite free trial. I was going to write something to poll Google, or various sites like 800notes.com.

Incidentally, I'm running it on a mac. I set up a script with "fswatch" monitoring the call_log.csv file for changes, but I thought it'd be nice if norobod could exec an external command for every received phone call. That'd be a nice cross platform way to stub in notifications. (Notifications could also be plugins, like filters, I guess. I'm currently sending notifications to pushover.net, which has subscribed clients on all my devices.)

I initially was confused that the allow.csv was in the same format as the block.csv -- because my instinct was just to export all the phone numbers from my address book and throw them into newline delimited file. But, after browsing the code, I could tell you were just leveraging the same code for both allow and reject filters, which made sense.

Anyway, it works great, and thanks. Let me know if there's anything you'd love help with. =)

@dgnorton
Copy link
Owner

@sejmann, I'm glad you've found norobo useful and thanks for the feedback. I don't know if Twilio's trial is indefinite but the cost of lookups is $0.005 each, which I think is reasonable. I had also planned to write filters for sites like 800notes.com but decided to start with Twilio since it's a reliable service at a reasonable price. I may still add filters that use other services.

Glad to hear it works on Mac. Out of curiosity, are you using the Zoom 3095 modem?

I like the idea of being able to exec an external command. I've added two new issues: #5 for the exec feature and #6 for updating README.md with an explanation of allow.csv and block.csv.

I've also considered adding a feature to allow norobod to access Gmail contacts as an allow filter. Thoughts?

I added a help wanted label to the exec issue. You're welcome to work on it if you have time. PRs are welcomed. :)

Something I'd love help with is creating a web UI for norobod using React. I have a simple one that just displays the call log running locally. I haven't pushed the code for it up yet. It's useful but pretty lame...
image
Anyway, if you have front-end skills and free time, let's talk.

Thanks again!

@dgnorton
Copy link
Owner

dgnorton commented Sep 26, 2016

@sejmann the filter-pkg branch has been merged into master. I also updated the README and closed the doc issue. Hopefully it explains configuration of the allow and block files better now.

@sejmann
Copy link
Author

sejmann commented Sep 29, 2016

@dgnorton Awesome. And yes, I find it super useful. So glad you wrote it. Between norobod and installing Hiya on my iPhone, which blocks a rolling list of like a quarter million spam/scam phone numbers, my life has been much less irritated. =)

I think I'll have time to work on either or both of the react web interface and the external command execution, next week.

I was thinking, rather than using go templates for the command, we could use the Expand func from https://golang.org/src/os/env.go, which basically expands variable names (supplied via Map) in the form "$var" or "${var}" -- very similar to bash. Templates are more powerful, but also can be cumbersome.

My modem looks like it's a white label of the Zoom. $16 bucks and works like a charm. No speaker, though. IIEasy External 56K. It identifies itself as having a CX93001-EIS_V0.2013-V92.

I had two crashes recently of norobod -- but I think they may be due to my upgrading my mac to the newly released "Sierra" version of the OS -- I just now upgraded to go 1.7.1, which apparently has Sierra fixes, so I rebuilt and we'll see if that resolves it.

Oh, I did notice that sometimes a second call event is trigged (with no CID data) at the end of an allowed call, by a trailing RING, with no subsequent CID lines from the modem. I haven't researched it, yet. When I get more info, I'll create an issue.

I like the idea of a Google contacts (live?) lookup -- or maybe being able to read and offline contacts file format -- I just looked and Google exports to its own format CSV, Outlook style CSV, or VCard. Not sure which is most widely supported, but I can take a look.

Oh, and this is from memory, so I might be wrong, but I think you're writing to the CSV log file with printf statement like '"%s", "%s"...' -- I think that'll break the CSV if the CID name has a quote in it. Maybe we can switch it to using encode.csv.Writer, or manually prefixing each quote with a quote, which I think is the proper way to escape them in CSV.

I was also going to play around with getting it to exit gracefully if the serial port disappears, or perhaps wait around until it comes back? (I'm on a laptop, and the modem is only available when I'm at my desk.)

I'll fork, and you can decide what you want pull requests for. =)

@dgnorton
Copy link
Owner

dgnorton commented Oct 3, 2016

@sejmann PR #9 came in over the weekend. At a glance, I like it and think the Go templates look easy to use but haven't had a chance to really review or test it.

If you have time to work on a React web UI, that would be great. I'd like to start with a simple write up. I have some ideas about what I'd like it to do. Also interested in what others would want / expect it to do. It would be good to have the goals written up before coding.

That's great that you have it working with a cheaper modem. I will add that to the README.

When you have a crash, it would be great if you could create a gist with the stack dump and create a new issue with a link to the gist.

Regarding the second call event, I suspect the hayes package needs a little work. The master branch works fine when running on my Linux laptop but not when running on an RPi. I have a branch up with a change that makes it work on RPi but it's not an ideal fix. I have an idea about how to make it right but haven't had time to work on it.

I'll check on the log CSV thing and create an issue if needed. Thanks for pointing that out.

Regarding exiting if the port goes away, I think maybe waiting for it to come back is the better option? Not sure.

Again, thanks for the feedback / help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants