WIP Call Notifications
#1
Brick 
Call Notifications

Call Notifications does what the name says:
On incoming phone calls XBMC will show a notification.

The idea and parts of code are based on XBMC Yac Listener developed by @doug. (Forum Thread)

Since he won't update his code anymore I decided to code this thing.

Any feedback and contributions are welcome. Asterisk Client is already on my TODO list.

Features:
  • Support for different CallerID clients/servers
  • Set Volume / Mute Volume / Pause Playback on incoming calls
  • Fully configurable through XBMC Gui
  • Reverse Search for telephone numbers (WIP)
Installation:
current version: 0.5.3
download: 0.5.3.zip
github: https://github.com/mablae/service.script.call-notifications/

Screenshots:
Image
Image

Client Support:
  • Fritzbox Fon
    This is what I use personally. Fritzboxes offer a
    "Callmonitor" Tcp Server on Port 1012.
    This feature needs to be enabled on your Fritzbox by dialing #96*5* with an
    analoge Phone connected to the Fritzbox directly.

  • Ncid (Network Caller ID)
    Ncid seems to be the standard for unix based CallerID.
    It supports wide range of configurations.

  • YAC-Server
    This is the original Windows application used by doug in his addon.

Credits
doug, hernandito, and rest xbmc Community BlushBlush - I hope anybody will find this useful. If so, please let me know.

reserved
Reply
#2
please make the id "service.script.call-notifications" or "service.call.notifications" or similar.

xbmc.* is reserved for xbmc itself and having service.* make it more clear what it does.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Nice!

Since the PBX add on is abandoned I can't wait for your asterisk implementation - fingers crossed.
Reply
#4
Hey Martijn,

okay changed that. Thanks for all the help!
Reply
#5
It's actually possible to send call notifications from Asterisk (and probably any other software-based PBX) to XBMC now. I found the information buried in this article and this is an excerpt of the pertinent part:

Quote:If you have XBMC running on a system on your local network, you could use a line such as this to send notifications to it:

In Eden and other Pre-Frodo versions:

exten => ****1122,1,TrySystem(wget -b -O /dev/null -o /dev/null “http://192.168.0.234:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification(Call%20from%20%22${URIENCODE(${CALLERID(name)})}%22%2C${CALLERID(number)}%20calling%20extension%2C15000%2C%2Fhome%2Fusername%2Fphone.png)”)

In Frodo and later versions:

exten => ****1122,n,TrySystem(wget -b -O /dev/null -o /dev/null “http://192.168.0.234:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Call%20from%20${URIENCODE(${CALLERID(name)})}%22,%22message%22:%22${CALLERID(number)}%20calling%20extension%22,%22displaytime%22:15000,%22image%22:%22%2Fhome%2Fusername%2Fphone.png%22},%22id%22:1}”)

Note that each of the above is a single long line, and to see either line in its entirety you will need to copy and paste it to a text editor. The above examples assume that XBMC is configured to allow control via a Web interface, at a fixed IP address and port (192.168.0.234 port 8080 in this example). If you happen to still have a Linux version of Boxee, the Eden version line might also work with it, perhaps with a bit of tweaking. I have no idea if it would work (with appropriate modification) with any other standalone home theater PC equipment. You will likely need to replace username with the user’s name, extension with the called extension’s number, and change the icon path to wherever you put the phone.png file (which is an icon you need to supply, such as the one at the right). Note that the icon path requires %2F in place of forward slashes (therefore %2Fhome%2Fusername%2Fphone.png really means /home/username/phone.png) and this refers to the icon directory and filename — if you choose not to use an icon then leave that part out, along with the %2C that comes just before it (or in the Frodo version, leave out this part:
,%22image%22:%22%2Fhome%2Fusername%2Fphone.png%22
Note the comma at the start; it must be included in the deleted section).

If you try to use one of the lines above, change the quotation marks back to regular plain ones, rather than the enhanced ones that are shown in this post, otherwise they won't work.

Note that the extension ****1122 refers to a technique the author used to make this work in FreePBX as explained in the original article - in basic Asterisk you'd just use the extension number. Also, the phone icon mentioned is this:

Image

See the original article for more information, but keep in mind that it was aimed at FreePBX users so if you are using basic Asterisk, there are probably instructions there that don't apply to you.

(Edited to include change made by blog's author after I pointed out an error, and additional changes for Frodo)
Reply
#6
Nordish this is awesome... thank you!

My Yac has been crapping out on me... and I cant test... I will give it a good try at fixing.

One thing that I thing would be awesome, is to say in the addon folder have a folder whenre the user uploads photos of various common callers. The jpg file will be named the phone number of the person calling. So the script puts the persons icon when it matches the incoming phone number....

I will spend a few hours diagnosing my Yac.

Thank you!
Image
Reply
#7
deleted double post...
Image
Reply
#8
When installing, I get a "dependency not met error".... Do I still need the original YAC addon?
Image
Reply
#9
(2013-11-27, 19:44)xbmclinuxuser Wrote: It's actually possible to send call notifications from Asterisk (and probably any other software-based PBX) to XBMC now. I found the information buried in this article and this is an excerpt of the pertinent part:

Thanks, I'll take a look at it.


hernandito Wrote:When installing, I get a "dependency not met error".... Do I still need the original YAC addon?

It should work with Gotham and Frodo. What XBMC version are you running? Dougs Addon is not needed anymore. You may delete the folder, to be sure it does not conlict on ports.

Can you send a debug log to pastie, with the installing part in it?


Cheers Nordish a.k.a mablae
Reply
#10
(2013-11-28, 04:47)NordishByNature Wrote:
(2013-11-27, 19:44)xbmclinuxuser Wrote: It's actually possible to send call notifications from Asterisk (and probably any other software-based PBX) to XBMC now. I found the information buried in this article and this is an excerpt of the pertinent part:

Thanks, I'll take a look at it.

There was one small part of the example line I didn't understand so I contacted the author, and he made a small edit in the original blog post, and replied saying it was an error that had slipped through. I have updated my post above to include that edit.
Reply
#11
Hi NordishByNature,

thanks for this great addon.

Just to get it right: Using this addon in connection with a FritzBox does not require to have FritzBox running a Yac-Server (e.g. Freetz-Image) ? The addon may then use the built in callmonitor-server of the FritzBox instead - correct?

Brgds,

FantasticN
Reply
#12
(2013-11-27, 23:09)hernandito Wrote: My Yac has been crapping out on me... and I cant test... I will give it a good try at fixing.
Remember: you cannot use it on same ip / lan interface. The XBMC needs to sit on some other IP than YAC Software. Also this YAC Software does Client/Server part wrong. The Server is hosted inside XBMC and the Client is the Windows program. Very strange.

(2013-11-27, 23:09)hernandito Wrote: One thing that I thing would be awesome, is to say in the addon folder have a folder whenre the user uploads photos of various common callers. The jpg file will be named the phone number of the person calling. So the script puts the persons icon when it matches the incoming phone number....

Yeah, the lookup part is going live today. I am thinking about how to integrate with as much configurations and PBX Systems and make it also user-friendly.

Nobody wants to enter their Phonebooks in XBMC manually. Big Grin


(2013-11-28, 10:03)fantasticn Wrote: Just to get it right: Using this addon in connection with a FritzBox does not require to have FritzBox running a Yac-Server (e.g. Freetz-Image) ? The addon may then use the built in callmonitor-server of the FritzBox instead - correct?

Exactly! Please try it out and let me know if it worked. Smile


cheers Nordish
Reply
#13
(2013-11-28, 04:47)NordishByNature Wrote:
hernandito Wrote:When installing, I get a "dependency not met error".... Do I still need the original YAC addon?

It should work with Gotham and Frodo. What XBMC version are you running? Dougs Addon is not needed anymore. You may delete the folder, to be sure it does not conlict on ports.

Can you send a debug log to pastie, with the installing part in it?


Cheers Nordish a.k.a mablae

I am using Openelec Frodo 12.2... debug log from right after doing this is this:

http://pastebin.com/iRPnujPU

Thanks for your help!

Hernando
Image
Reply
#14
(2013-11-28, 17:12)hernandito Wrote: I am using Openelec Frodo 12.2... debug log from right after doing this is this:

http://pastebin.com/iRPnujPU

Thanks for your help!

Hernando

I have to thank you, Sir Big Grin
Code:
10:04:44 T:140093996463936   DEBUG: Addon script.module.twisted requires script.module.zope-interfaces version 4.0.5 which is not available

Okay, I changed the name of that module to script.module.zope.interface ... Sad My mistake I am sorry..

Also the name of the addon changed from xbmc.addon.call-notifications to service.script.call-notifications

- Please delete the old version manually to avoid errors. New Version: v0.5.3

I hope things get more stable soon...



Nordish
Reply
#15
No luck Nordish...

I am getting this:

Code:
12:37:33 T:140344841652032   DEBUG: ------ Window Deinit (FileBrowser.xml) ------
12:37:33 T:140344841652032   DEBUG: GetZipList - Processing zip://%2fstorage%2fdownloads%2fservice.script.call-notifications-0.5.3.zip/
12:37:33 T:140344841652032   DEBUG: Addon script.module.twisted requires script.module.zope-interfaces version 4.0.5 which is not available
12:37:33 T:140344841652032   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
12:37:33 T:140344841652032    INFO:   msg: PICTURE::LoadImage: Unable to open image: /storage/downloads/service.script.call-notifications-0.5.3.zip/icon.png Error: (2)
12:37:33 T:140344841652032   ERROR: Texture manager unable to load file: /storage/downloads/service.script.call-notifications-0.5.3.zip/icon.png
12:37:33 T:140344841652032   DEBUG: LIRC: Update - NEW at 108727:160 0 KEY_OK_UP devinput (KEY_OK_UP)
12:37:39 T:140344841652032   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
12:37:43 T:140344841381632   DEBUG: Suspended the Sink

I have to leave to visit family (Thanksgiving) and I will return tomorrow... I cannot wait to try it.

Thanks.

H.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Call Notifications2