Caller ID on XBMC TV
There is a very quick and easy way to get caller ID working on your TV through XBMC by using XBMC’s http commands. In order for this to work you will need to have the web interface enabled in XBMC.
This is not a full featured script like the project here which is under development. This will just display incoming calls on your TV and pause the movie or music or whatever is playing.
I have Elastix but this will work with any Asterisk distribution. In Elastix you will need to create a Misc Destination. I named my Misc. Destination “XBMC” and then gave it the number *9262 which is the numerical representation of the letters XBMC on a phone dial-pad. It doesn’t matter what number you choose, but this provides coherence.
Once you have it created then you will need to change your inbound route to go to the XBMC destination. So now when a call comes in instead of going to your ring group it will go to this XBMC destination and now we have to tell Asterisk what to do when it gets there. In Elastix you will need to edit extensions_custom.conf
The following is the code that I used in extensions_custom.conf:
[xbmc-cid]
exten => *9262,1,Macro(user-callerid)
exten => *9262,2,TrySystem(wget -b -O /dev/null -o /dev/null "http://192.168.1.100/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.Notification(Incoming%20Call%2C${CALLERID(name)}%20%3C${CALLERID(number)}%3E%2C15000)")
exten => *9262,3,TrySystem(wget -b -O /dev/null -o /dev/null "http://192.168.1.100/xbmcCmds/xbmcHttp?command=Pause")
exten => *9262,4,Goto(ext-group,600,1)
The first line uses your caller ID lookup method to get the ID. The second line uses wget to execute the command to pop-up the notification in XBMC and it passes the CID name and CID number variables to it. In this command make sure you set the correct IP address for XBMC. The thrid line sends a command to pause XBMC. The fourth line moves onto my ring group 600 which rings all the phones in my house. Make sure to include this context in [from-internal-custom] and then reload the dial plan and you are done.