FYI Caller ID with XBMC

Jadon R

New Member
Joined
Jul 9, 2013
Messages
15
Reaction score
0
I have been using PIAF for some years now and have recently attempted to get caller id popups to my media center. I have XBMC (Frodo) installed in a Linux environment and have followed various instructions and addons and have not been successful. I was able to configure the XBMC PBX addon to see voicemail, but unable to get the caller id to popup. I have also tried to use CID Superfecta to send to XBMC in combination with the Dialplan Injection. Again, no CID popup. I know I could use growl or yak in a windows environment, but I have an AppleTV with CrystalBuntu installed. Any suggestions are welcome!
 

Jadon R

New Member
Joined
Jul 9, 2013
Messages
15
Reaction score
0
I am using Superfecta 2.11. So wouldn't it be possible for me to rollback to 2.2?
 

Jadon R

New Member
Joined
Jul 9, 2013
Messages
15
Reaction score
0
Ok I did as suggested and installed 2.2.6.1. Enabled "Send to SBMC", and then pointed to the ip address, port, username, and password of my apple tv. Also set to the Json RPC mode. Verified that all Inbound Routes had Caller ID Superfecta enabled. I even restarted PIAF. When I use the debug feature of Superfecta, it shows that it has sent it to the host, yet I do not see a notification on XBMC. Here's the output from debug in PIAF:

Code:
Sent Xbmc command To Host: 192.168.66.110
Pause : [URL]http://username:[email protected]:8080/jsonrpc?request=%7B%22method%22%3A%22Player.PlayPause%22%2C%22params%22%3A%7B%22play%22%3A%22pause%22%7D%2C%22jsonrpc%22%3A%222.0%22%7D[/URL]
Notif : [URL]http://username:[email protected]:8080/jsonrpc?request=%7B%22method%22%3A%22GUI.ShowNotification%22%2C%22params%22%3A%7B%22title%22%3A%22BLUFFTON+IN%22%2C%22message%22%3A%22%28260%29+307-5008%22%2C%22image%22%3A%22DefaultActor.png%22%2C%22displaytime%22%3A5000%7D%2C%22jsonrpc%22%3A%222.0%22%7D[/URL]
 
Joined
Jul 28, 2011
Messages
162
Reaction score
48
At XBMC Frodo, the devs dropped the old web service protocol. You must now use JSON (but I see you switched to that).

Did you enable the web interface from the XBMC settings menu?

Call notifications are working on my XMBC (12.3) system, but I am doing it a bit differently than you are. I am using superfecta's "Send to URL" module to send the request to an IIS server where I have a perl program that catches the number and caller id information (found by earlier superfecta sources), logs it to a file (for other programs to use), then sends the JSON notification to XBMC.

On a side note, I never knew how many telemarketers my phone system was blocking until I put this in place. when anyone calls my number, they go to an automated attendant that says "Please hold while I find someone to take your call" which it rings the home phones. I guess the message confuses whatever software the telemarketers use, because they always disconnect before the home phones actually start ringing.
 

Jadon R

New Member
Joined
Jul 9, 2013
Messages
15
Reaction score
0
The Web server on XBMC is enabled and the "Send to XBMC" is pointing to that address and port. Wish this was clearly documented somewhere so I could get it to work :(. Doesn't make sense that it is so complicated. O well, I guess I'll just have to upgrade to a Windows box with XBMC to get it to work.

*Edit*

I have two different installs of XBMC - one is Eden v11 and one is Frodo v12. I've tried it on both and changed to the appropriate setting in CID Superfecta before testing. Neither work.

*Edit 2*

So I just tried something as a last resort. I booted up my Eden install, went to my computer, and fired off the following command:

Code:
http://192.168.66.110:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification(Incoming Call,${CALLERID(name)} <${CALLERID(number)}>,15000,F:\Apps\XBMC\media\phone.png

This caused a notification to popup on my screen! Is that helpful and how can I use that to move forward?

*Edit 3*
I set the CID Superfecta "Send to XBMC" mode to 'Old API: For XBMC up to v11' and it issued the following debug:

Code:
Notif : [URL]http://atv:[email protected]:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.Notification(BLUFFTON+IN%2C%28261%29+307-5008%2C5000%2CDefaultActor.png)[/URL]

When I copied and pasted into my browser, it returns an error that windows cannot find. When I compare the two, it looks like the superfecta module is trying to format it incorrectly.
 
Joined
May 22, 2013
Messages
301
Reaction score
44
I got it working tonight in about 2 minutes. I am using another Raspi (quelle surprise ha!) to run XBMC, my preferred flavour is Openelec.tv as it's so fast on the Pi. Their latest build uses XBMC Gotham and the module build of Superfecta is 2.11.14.

All I did was to enable 'send to XBMC' within Superfecta, type in the IP address of the media centre, username/password/port as per services-settings-webserver. Then I selected Frodo as the build - even though this is Gotham it's looking for JSON which is Frodo and higher.

Now each time the phone rings I get an on-screen notification. The only bug I have noticed, and I would like some advice on this if anyone can help (hint lgaetz ;) ) is Superfecta gives options to pause playback and how long to display the notification for. Whatever I change on these settings all playback stops regardless and the notification only appears for about three seconds. Any suggestions on a fix? I have looked in the XBMC menus and there's nothing obvious so I am guessing it is down to the way this info is pushed from Superfecta.
 
Joined
May 22, 2013
Messages
301
Reaction score
44
Thanks lgaetz I ran this with a debug. Really interesting as actually the time does adjust now, no idea why it wasn't before, but the most interesting bit is whether pause is set or not Superfecta still fires the pause command. Does that help with identifying a bug?

Incidentally here's the command it fires, I'm guessing looking at the command there's false in it which is possibly to say ifnore this command, but is it possible if pause is unchecked to simply not send this command? -
Code:
Pause URL: http://username:password@ipaddress:port/jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Player.PlayPause%22%2C%22params%22%3A%7B%22playerid%22%3A1%2C%22play%22%3Afalse%7D%7D
 
Joined
May 22, 2013
Messages
301
Reaction score
44
Thanks Lorne that bug fix did just the trick. I know we're all a little bit geeky here but it still blows my mind thinking in the UK 20 maybe 25 years ago we didn't even have caller ID, and up until 1984 we had a state monopoly phone provider with the GPO (now BT). I was very young at the time but I remember it being the height of fashion if you had a Trimphone http://en.wikipedia.org/wiki/Trimphone instead of the standard 700 series every home had http://www.robertopiecollection.com/application/products/teleph/tel4gb.asp.

All this is only a handful of years ago, so now I sit at home with a phone system more featured than every office implementation I know of or have used, that checks multiple look-up sources and can flash up details on a media centre who is calling (which since that bug fix it works superbly smoothly on XBMC Gotham and I'd highly recommend anyone with XBMC to give this a try, it's so simple).

We are working with some fantastic systems here and some very talented developers.
 

tm1000

Schmoozecom INC/FreePBX
Joined
Dec 1, 2009
Messages
1,360
Reaction score
78
We are working with some fantastic systems here and some very talented developers.


Also of note is that fact that lgaetz does this in his spare time and is not paid for it (though he does use a version of FreePBX in his company). He would never brag about that though :)

Open Source at it's finest
 

ChicoCanada

Member
Joined
Jun 1, 2011
Messages
98
Reaction score
6
This is excellent and thank you :) I have it running on my HTPC with Frodo. It works when external calls hit my PBX, which is great. Rookie question: Is there a way to make it work when an internal call rings my extension?

Cheers
 

Patrick Charette

New Member
Joined
Sep 20, 2014
Messages
3
Reaction score
1
lgaetz

hi lgaetz, sorry for double posting
i just realized you are the dev for cid superfecta
im having a tiny issue with with the xbmc source

which works great when xbmc is on
however if its off it takes 12 seconds before it times out
causing the incomming call to timeout and fail and the caller gets a fast busy
the source file for xbmc has a setting to timeout after 0.5 seconds if the xbmc machine is not available
however its not following this time

as a temporary workarround i used your suggestion from 2 posts up (#19)
i created a custom extenssion and call a secondary scheeme that only notifies xbmc
removed xbmc from primary scheeme
my main ring group now includes the custom extenssion
so effectively cidsuperfecta does only a lookup then passes the call, then the ring group calls the secondary superfecta scheeme which does another lookup
this works because the other extenssions are already ringing even if the xbmc machine is unreachable

i still need to find a way to enforce the .05 second timeout in the source
any assistance in correctly resolving this would be greatly appreciated
 
Joined
May 22, 2013
Messages
301
Reaction score
44
I don't have that problem, have you tried putting xbmc as the last item in your lookup?
 

Patrick Charette

New Member
Joined
Sep 20, 2014
Messages
3
Reaction score
1
I don't have that problem, have you tried putting xbmc as the last item in your lookup?


yes it is last
as per post above by lgaetz
the call will not continue until all sent to url's have completed

try adding more xbmc ip's
and make sure they are all off (for testing this)
it takes about 3-4 seconds to timeout per url
once you hit about 10 seconds total, the call fails, your phones ring about a 1/4 ring and caller gets fast busy
my temp workaround takes care of the issue as the send happens after the phones ring
only the custom extenssion time out
in the end this may actually be better
 

Patrick Charette

New Member
Joined
Sep 20, 2014
Messages
3
Reaction score
1
Patrick Charette, I'm not an XBMC user so I am not really familiar with the ins and outs of this module, it was originally developed by others. After a bit of testing, I was able to reproduce what you see. I know the problem, but I don't know the fix. Some details:
  • The "$my_host_timeout = 0.5;" is a stray line from past coders, it is not used for anything.
  • The Lookup Timeout parameter does not appear to have any effect on the Send to modules. I have logged an issue for this bug.
  • The Send to XBMC module uses three URLs, each of which has to time out before the call can continue. If you disable the 'change volume' and 'pause playback' options, you would only have to wait for one URL to timeout before the call can proceed. It will speed things up a lot, but perhaps not enough.
To avoid fragmentation, you can delete your other related post.

thank you for logging the issue
much appreciated

to be noted the workarround (mentioned above) that i built arround your custom extenssion post
works perfectly in the mean time
it just requires a second scheeme and a folow me
 
Joined
May 22, 2013
Messages
301
Reaction score
44
I don't use pause and change volume, and only have one XBMC device so that's probably why I am not seeing the problem. Thanks for highlighting it and to lgaetz for reporting a bug.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top