News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Obi2Yac: Yac & Growl Notification Daemon

Started by Smee, April 13, 2013, 11:00:35 PM

Previous topic - Next topic

Smee

     The one and only thing I miss about my land line since switching to GV and Obi, is CNAM.  I also used YAC in my home to display CallerID to all of my PCs and TiVos in my house before the switch.  So in January I got to work on building my own YAC server to replace the old, but still use the old YAC clients on my PCs and TiVos.  A few nights later, the first version of Obi2Yac was born.  It relied on Kiwi to execute Obi2Yac whenever the CallerID magic string was received.  I also managed to get Growl notifications to work as well so my tablet and phone could join the fun.  ;D Last month, QBZappy asked that I send him a link to my program.  I did, but I realized that I used a registered version of Kiwi and therefore it would be useless to him.  I updated the application to no longer need Kiwi and instead, it is now its own Syslog daemon.  Thanks QBZappy!  :D

     This application is written using AutoIt.  It is designed to do name substitutions based on a phone number located in local access database.  If the name is not found in the local database, it will query OpenCNAM/WhitePages.com and hope it gets lucky during it's query.  Failing that, it returns NAME UNAVAILABLE for CNAM.  Queries using Whitepages.com will only occur if you have a valid APIKey defined in the INI.  Results are then broadcast to Yac listeners defined in the database or Growl if enabled and installed on the same PC.  All successful  queries are cached to improve speed during future calls. This script runs as a Syslog server and is designed to work with an Obi set to forward Syslog data to PC where Obi2Yac is running.  I have only tested this to run on an Obi configured for Google Voice.  Using it with another SIP provider should work as well, but your mileage may vary.

   You can find my program sources here: https://github.com/TheSmee/obi2yac
   You can find my program releases here: https://github.com/TheSmee/obi2yac/releases
   You can find YAC clients here: http://www.sunflowerhead.com/software/yac/
   You can find Growl for Windows here: http://www.growlforwindows.com/gfw/
   You can find Growl for Android here: https://play.google.com/store/apps/details?id=com.growlforandroid.client

Access Database Tables are as follows:

  • CallLogs: Log of all received calls
  • Listeners: PCs which will receive YAC broadcasts
  • ListenerTypes: Currently defines listener types Obi2Yac can send too.  YAC/NCID are listed, but I never got around to doing NCID broadcasts.
  • Substitutions: Your personal substitutions.  You can add both Obi or regular numbers.
  • SubstitutionsCache: All successful queries to OpenCNAM/WhitePages.com are cached here to avoid lookups & increase spead of CID broadcast

Obi2Yac uses an INI file to define the following:

  • APIKey: WhitePages.com API Key.  If defined, lookups will will occur after OpenCNAM query.
  • GrowlEnable: If defined, will register with Growl if installed on local PC and send CID for broadcast.
  • SysLogIP: If defined, will bind to this IP for Syslog.  Do not use 127.0.0.1. If not defined, will bing to first IP it finds.
  • SysLogPort: If defined, will bind to that port via UDP. Otherwise it will bind to port 514 UDP.
  • NoBreak: If set to 0, will prevent App exit/pause via Systray + Right click.

     This is AutoIt and not terribly sophisticated to use so anyone should be able to follow what I did and make changes rather easily.  Sources are available for download, but if you do improve upon it, please post the changes so others benefit.

Have fun...  ;D

Smee

QBZappy

Smee,

This is one of those 3rd party apps that the OBi community can put to practical use. I appreciate the fact that it is possible to follow the coding and make some minor changes to it in case the OBi syslog messages are modified by obihai, as it has already happened in the past rendering any solutions difficult to modify if it is hardcoded.

Let me be the first to ask for a product feature. Would it be too difficult to do an Outlook contact lookup and open the contact form or journal? I live in my contact management software. This would be a killer extension of the OBi for me, and I suspect others as well. This could be a reward on my 2000th milestone post!

Three cheers for Smee!
Hip hip hooray
Hip hip hooray
Hip hip hooray

Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

ianobi

QBZappy,

Wow - 2000 posts - you have been busy! Thanks for all the useful info you have posted. This forum would not be the same without you   :)


Ostracus

Quote from: ianobi on April 14, 2013, 08:13:17 AM
QBZappy,

Wow - 2000 posts - you have been busy! Thanks for all the useful info you have posted. This forum would not be the same without you   :)

You're not doing too shabby yourself.

Smee

Quote from: MickW on April 14, 2013, 04:38:56 PM
Or Install GrowlerID from Riotouslabs.com here is a link

http://riotouslabs.com/Support/topic6-growlerid-beta-stopped-working.aspx

Sure, if Growl is all you need.  Obi2Yac includes YAC support (Obviosly)  :P + OpenCNAM queries.  Best still, not closed source.  ;D

Smee

Smee

Never content in something only doing one thing, and just because I could, I have been making a few changes to Obi2Yac to help me receive notifications.  I don't know if folks would be interested, but if you are let me know and I'll post the code.  So here is the scenerio.

I have a home alarm system.  It is self managed and it has an auto dialer.  We are in the 21st century and auto dialers are so old school, but still safe bets.  I wanted my alarm to alert me, neighbors and anyone else I want via email and text messaging before the auto dialer even completes the first call. Since Obi2Yac is already monitoring Syslog messages, I figured why not also monitor for DTMF.  The challenge is that I don't want to set the thing off every time my cell number is dialed.  So the solution was to set speed dials as the trigger with the added advantage that the auto dialer completes a call quicker.

I set Obi2Yac to look for one of these three triggers: 69#, 70# or 71#.  Each one can have a unique message sent.  I used the basic SMTP function built into Autoit and as a consequence, it isn't all that robust, but I didn't want to over-complicate the app.  To compensate I used the built in SMTP server which you can install with Windows XP Pro.  It does the job.  :)  The SMTP server then forwards to my ISPs smart host. Currently I have the app only send to one email address, but the code can be updated to handle as many as you need.  I choose to use Gmail to auto forward these Emails to SMS gateways to text folks.  Just easier to manage there.  The result is of course that folks get the text message & email, before the call even completes.

This of course should tell you that hardware hackers out there that want to use the Obi as a cheap DTMF decoder in order to trigger an event, this is great stuff. :-)

Take care...

Smee

Smee

I have posted a new version online.  It has the DTMF trigger code as well as an update on how it handles 11 and 10 digit CIDs.

Take care..

Smee

Veronica

Hello i was wondering if you could help me with this request:

http://www.obitalk.com/forum/index.php?topic=6076.0

also interested on getting notification with that info so the client can see the minutes talked with detail, the number dialed and if is possible to add other usefull info then is welcomed.

I know that your software is for incoming calls, this request is only for outcoming calls.

Let me know if its possible or if its too much to ask lol as i said im willing to negotiate for this, it opens another small business posiblity.

Regards,
~ V

Veronica

btw there should be a section in this forum for 3rth party software so for the user is easier to find this kind of stuff. everything is mixed up.

QBZappy

Veronica ,

There actually is a thread for this. Unfortunately it is hard to find. It seems that the person who owns the thread inherits the responsibility to maintain it. Perhaps it should be made a sticky. If others find it useful enough to become a sticky show your interest here.

3rd party apps development for the OBi 110/100
http://www.obitalk.com/forum/index.php?topic=1648.msg10563#msg10563

Perhaps Smee can add himself to the above mentioned thread.

It is also a good community thread. Any one is free to add their favorites or special finds in that thread. I have seen other 3rd party apps which can be used with the Obi. Some specific to using the OBi:

RonR Obi configurator, Obi provisioning apps

Others of a more general nature:
Which could be used to trouble shoot, auto recording calls, home alarm systems, etc...
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

Rgrocery

Hey could anyone show me how to setup this obi2yac I seem to be doing something wrong since it just crashes when I pick up the phone. Do I have to change the code? or changes in the obi itself?

thanks and sorry to be a noob.

- josh

Smee

Quote from: Rgrocery on August 01, 2013, 08:19:21 PM
Hey could anyone show me how to setup this obi2yac I seem to be doing something wrong since it just crashes when I pick up the phone. Do I have to change the code? or changes in the obi itself?

thanks and sorry to be a noob.

- josh

Sent you a PM.  Going to need a little more info to understand the problem.  I.E., What OS, 32Bit or 64Bit, Is your firewall blocking YAC or Obi2YAC? Etc....

Smee

akel

Need some help here.

I looked in the forums and this seems to be the thread that explains how to use ob2yac.

My first problem is setting up YAC server with Obi. when I am installing YAC on my computer, it asks which modem should it use. I don't know what I should pick for Obi.
Also from some other discussions it seemed to me that Obi needs to be writing something to my computer for these programs to read from, is that correct?

Thanks for the help.

(I tried growlerId and that didnt work for me. I found this while looking for how to fix growler id and this seems to be more useful, so want to set this up)

Smee

Akel,

    Obi2Yac is the server.  When using YAC, you will no longer use that as the server.  You will only be using it as a listener or client by launching it with this command:  yac.exe listen

If you  look in your START menu you should see a shortcut for the YAC listener.  If you are using linux or running the listener on a hacked TiVo it's pretty much the same.  The Windows machine that is running Obi2Yac has an access database in which you will plug in the IPs you want it to contact with the notifications.  It will also log all calls there.  Look inside the file: Obi2Yac.au3 which has some info on what the database tables are for.  If you run Growl on the same PC as Obi2Yac, you can have Obi2Yac send notifications to it for broadcast to other machines running growl instead of using the Yac listener.

Take care..

Smee

akel

#15
Thanks Smee. I am still not 100% clear on what I need to do, so I will try to write it up. It will hopefully help some noob later. (Figured out and now the system is working as advertized :) )

1. Set up Obi to send logging to your computer where obi2yac is going to be running. -> How do I set-up and collect a syslog from an OBi device? (I did not do step 3 from here and it still works)
2. I think I will need to set up port forwarding on my router to allow this communication to come to my computer. (I have done that assuming I will need it)
3. Run Obi2yac as admin when the machine starts. It is a syslog manager, so the it will capture (listen?) when obi writes to the syslog and notify my growl or yac listeners.

Good so far?

The problem I have right now is how to set up Obi2yac.
I have downloaded Obi2Yac_v1.0.0.44.exe from the linked page. Which is just an executable that runs directly and does not do any installs. (no au3 file accompanying it) Same situation for the other download available there, obi2yac.exe. so where is the access database where those tables exist? Do I need to use subversion to get the code?

Thanks for helping out here.

ETA: I can browse and download the code from here. So gonna do that and try to play with those files

ETA2: Got all the files. It seems that I am supposed to update the ini file and the access database and then build my own exe file using aut2exe. (I have never used autoIt, so not sure if I can use the provided exe file with my own ini file and mdb. Don't know how that exe would know where my ini file and mdb are though. So I assume I have to build my own exe

ETA3: The exe file provided reads the ini file from the same directory. (Tested by changing NoBreak parameter) I imagine it will also read mdb file from the same directory. So I won't need to actually make my own exe file. Right now I have enabled growler in the ini file, not touched the mdb file and will test if growler can get the phone call

ETA4: Success! My test call showed up on growl. (after 2nd ring) Now I need to move my google contacts to the mdb file. I need to find if I can schedule a sync between those two. Smee, are you using any other personal contacts in addition to cnam/whitepages? How are you keeping it synced?

Smee

Quote from: akel on October 20, 2013, 03:31:54 PM
Thanks Smee. I am still not 100% clear on what I need to do, so I will try to write it up. It will hopefully help some noob later. (Figured out and now the system is working as advertized :) )


Glad to hear and sorry for that.  It seems that I must have deleted the zip file and only left the executable.  I have uploaded version v1.0.0.45 which will copy any missing files into the working folder on first run including a readme.  It should help others out in the future.  I also uploaded the sources in an archive so you don't have to go through source control.

In so far as using Google Contacts, no I never did that.  As of version 3 of Google Contact API, they have become a little more strict on who and how those contacts are accessed.  I would have to register the application, etc... and I didn't feel it was worth the time.  I just use the substitutions, OpenCNAM as well as the Whitepages for lookups and it works for me that way.  I did a one time dump of my contacts and placed them in the substitution table.

Take care..

Smee




akel

Thanks Smee. v1.0.0.45 is working great. It creates all those files on first run.

Also, if one doesn't have access (I don't have it on my server). mdb viewer plus is a free tool that allows editing the mdb file.

At some point, I am going to try and write a tool that will read from google contacts and write into this mdb file. When I put that tool in a scheduler, I will have a sync.
(If anyone knows similar existing tool with source code availability .. do point me to it)


Smee

Quote from: akel on October 22, 2013, 05:10:08 PM
Thanks Smee. v1.0.0.45 is working great. It creates all those files on first run.

Also, if one doesn't have access (I don't have it on my server). mdb viewer plus is a free tool that allows editing the mdb file.

At some point, I am going to try and write a tool that will read from google contacts and write into this mdb file. When I put that tool in a scheduler, I will have a sync.
(If anyone knows similar existing tool with source code availability .. do point me to it)



Thanks for the tip with MDB Viewer Plus.  Although I have MS Access, it will certainly come in handy on a USB stick for other projects.  In case others need it, you can find it here: http://www.portablefreeware.com/?id=727

As for source, you can try this: http://code.google.com/p/gcontacts-backup/ but it is in Java.  If you go to Google and search for: Google contacts site:code.google.com you will find a lot of stuff, but a lot of it is most likely abandoned.

Take care..

Smee

amallah

Thank you so much for this! With Obi2Yac running on a Windows machine, I now see my Obi202 notifications appear on my OpenElec box (XBMC) via the Call Notifications XBMC add-on. The hardest part was figuring out I had to edit the Listeners manually in the MDB.