(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:
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¶meter=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:
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)
I have never tried this plugin and what i quoted above never worked for me neither. The description below is working without the plugin from thread 1.
I have asterisk 11.10.0, freepbx 2.11.0.30 running and installed on a raspberry pi with raspbx and also on centos6.5, including incrediblepbx 4.11.4 and pbxinalfash scripts. This should work with any form of asterisk, freepbx, xbmc (I'm using latest gotham)
first I needed superfecta, got it from here:
http://pbxossa.org/files/superfecta/ grabbed the latest version
installed it via the freepbx interface without compressing
freepbx webinterface-->admin-->module administration-->upload modules-->choose the superfecta archive&upload-->manage local modules-->CID superfecta-->install
freepbx webinterface-->admin-->CID superfecta-->Default caller ID Scheme-->enable "send to xbmc" data source-->click on "send to xbmc" and configure: hosts (your xbmc IP), port, username, password etc. (make sure in your xbmc you have enabled the http interface and port, username, password are the same-->submit
scroll down and now you need to enter in "CID Prefix URL" the following(without quotes and 192.168.2.10:8080 should be adjusted to your xbmc ip and port):
"http://192.168.2.10:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22GUI.ShowNotification%22,%22params%22:{%22title%22:%22Call%20from%20[thenumber]%22,%22message%22:%22[thenumber]%20calling%20extension%22,%22displaytime%22:15000},%22id%22:1}"
when trying to paste that link into the CID Prefix URL in the freepbx webinterface it kept on being cut off early, some limit on the text box. I had in my browser a web developer extension installed (
http://chrispederick.com/work/web-developer/) and selected "Forms-->Remove Maxium Length" and then it let me copy the whole link into the box.
After that hit "agree and save" and that's it. Next time you receive a call you will see a pop up with the number in your xbmc