Display Caller ID on your XBMC

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
Code:
[notify-xbmc]
exten => s,1,System(wget "http://xbmc-address:3000/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification%28Incoming%20Call%2C${CALLERID(name)}%20%3C${CALLERID(number)}%3E%2C15000)") ; send caller id
exten => s,2,System(wget "http://xbmc-address:3000/xbmcCmds/xbmcHttp?command=Pause") ; Pause XBMC
Webserver must be enabled on XBMC.

See this reply for a proper how to and other info.
 

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
This works great for Boxee as well, however you would want to replace the Incoming%20Call with nothing, just have

Code:
 XBMC.Notification%28%2c${CALLERID(name)}%20%3C${CALLERID(number)}%3E%2C15000)") ; send caller id
The Boxee screen only has a one line notifier so the type is on top of each other, I have been poking around to see if that is changeable but have not found it yet.
 

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
Thought I would mention my blog post talking about how to modify Boxee so it "looks" better when you get a caller notification.

http://efreestylin.com/2009/03/31/boxee-asterisk-caller-id-fun

Thanks jpe for getting my brain starting to think about that, I've been searching for a way to get growl working on the Apple TV so I could get notifications, this at least gets me one step closer for when we have boxee running.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Wow!

Man - Im downloading the XBMC software now - if this is what it seems to be - WOW - you guys ROCK for posting this.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
:confused5: I am not smart.

I placed the dial plan, and followed the blog. I don't think the PBX is executing it.
Could you provide a little more details about setup?
 

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
So far it is only working for inbound calls that come in from the trunk, I wonder if it is because the calls are coming from a2billing in your setup (correct)? We might need to place the include => notify-systems in another context.

With all these notification systems I struggle with the right spot to place them, heh.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
No - in this case - I was testing on a beater box.

When you say "in from the trunk", do you mean the from-pstn-custom context?

I think Im doing something basic and really dumb incorrectly. But Im not sure where to start looking.
:p
 

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
Agh....check to make sure the web server is running on xbmc under settings. Then try just executing the URL in is or firefox to see if that is working and yes I mean from-pstn-custom
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
I use a module called Dialplan Injection. It does as it's name. Allows one to insert things into your dialplan, eliminating the need to hand edit the config files.

For the instances of caller id that I have (Notify and XBMC), I created ahttp://pbxinaflash.com/community/threads/asterisk-stickies.3754/?t=3754n Injection, put the code to call in it, and set it to send calls to the ring group.. I then set my incoming route to it.

The guru Aster1sk has included this and Growl Notifications to his Asteristickies Project that he is developing. It is turning into a very nice lil thingy. You can learn more about it on his site.
He, myself and a few others regularly hang out in the pbxinaflash irc channel nowadays.
 
Last edited by a moderator:

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
I use a module called Dialplan Injection. It does as it's name. Allows one to insert things into your dialplan, eliminating the need to hand edit the config files.

For the instances of caller id that I have (Notify and XBMC), I created ahttp://pbxinaflash.com/community/threads/asterisk-stickies.3754/?t=3754n Injection, put the code to call in it, and set it to send calls to the ring group.. I then set my incoming route to it.

The guru Aster1sk has included this and Growl Notifications to his Asteristickies Project that he is developing. It is turning into a very nice lil thingy. You can learn more about it on his site.
He, myself and a few others regularly hang out in the pbxinaflash irc channel nowadays.

Thanks for the heads up on the module, I'll have to try to get it working when I get time. I just installed it, getting some errors plus when I try to add an entry nothing happens.

I have been looking at the stickies project, not much interest for me though as I already have a phonebook app wrote that builds XML files for all Cisco model phones with local status etc. Could be interesting for my replacement user portal that I'm working on though, some of the features align.
 
Last edited by a moderator:

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
If you install this module, verify that all the tables get installed, for some reason the install script didn't work which caused a few of the tables to not install hence my errors.

Pretty slick module, so far I like!
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
:helpsmilieb:Ok - How about step-by-step instructions (not including the dial plan injection module) for those of us who still can't get "a ride to the party".

This would solve a need for us - but I cant understand how it works - or rather how it doesn't work - for me.
 

jpe

Member
Joined
Nov 14, 2007
Messages
149
Reaction score
0
The reason I recommend using the DIalplan Injection for this as it is very easy to accomplish and does not require going into the config files.
What it will do is inject a piece of code along the dialplan.

Normally, we would set up
inbound routes -> ring group, extension, etc.

We are going to inject this code in between.
inbound route -> injection -> ring group, extension, etc.


Install Dialplan Injection

1. Download from here to your computer. DO NOT decompress.
2. Go to Module Admin page in FreePBX and Upload Module.
3. Find Module in list and Install.
4. Reload

Create Dialplan Injection

1. Find DialPlan Injection in FreePBX Setup/Advanced/DialplanInjection
2. Add Injection. Give it a Description and optionally an extension number. (you don't need an extension for it's purpose, but can be handy for testing)
3. Save
4. The Injection should be listed on the right. Select it. You should now see a Commands Section.
5. Paste the following code into the text box.
Code:
TrySystem(wget "http://xbmc-address:3000/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification%28Incoming%20Call%2C${CALLERID(name)}%20%3C${CALLERID(number)}%3E%2C15000)") ; send caller id
TrySystem(wget "http://xbmc-address:3000/xbmcCmds/xbmcHttp?command=Pause") ; Pause XBMC
6. Change the 'xbcm-address:3000' to the address and port of your XBMC or spin off.
7. Set the destination to where your inbound route is currently going.
8. Save

9. Go to your inbound route and set the destination for this injection.
10. Save and reload

If it doesn't work, try changing TrySystem to System. Someone was having an issue with that.

If you are using any other app like Notify that needs to get CID info, you can add it into the injection.
Code:
Notify(${CALLERID(num)}|${CALLERID(name)}|${EXTEN}/192.168.1.2)


More info on Dialplan Injection here and here
 
Last edited by a moderator:

blakekrone

Guru
Joined
Aug 27, 2008
Messages
59
Reaction score
0
XBMC Setup How To

  1. Click on Settings
  2. Then click on Network
    screenshot000.png

  3. Cursor down to Servers, cursor right and then down to Enable webserver and make sure this is enabled. You can also change the port if you want to.
    screenshot002.png
  4. If all is working you should be able to fire a test off and see it on the screen.
    Code:
    http://<xbmc_ip>:<xbmc_port>/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification(Incoming%20Call%2C${CALLERID(name)}%20<${CALLERID(number)}>%2C15000%2CF:%5CApps%5CXBMC%5Cmedia%5Cphone.png)
    screenshot004.png
  5. From here follow jpe's post on the dialplan injection module.
 

aster1sk

Guru
Joined
Feb 28, 2009
Messages
79
Reaction score
0
cURL it baby!

Even I agree Asteristickies needs a solid rewrite, module based functionality would be far superior - not everyone needs all the junk that comes with it.

Basically all I did was :

Code:
// extensions_custom.php
[from-pstn-custom]
exten => _N.,1,System(/var/lib/asterisk/agi-bin/asterisk_im "${CALLERID(name)}" "${CALLERID(number)}")

The AGI looks like this :
Code:
curl -s -d 'cid_name='$1'&cid_num='$2'&key=blah' http://127.0.0.1/phonebook/listen.php &

The listen.php file looks in the DB for settings for all of the configured notification engines.

That looks like this :
Code:
if (!empty($xbmc_host)) {
	
	if (!empty($xbmc_port)) {
		$host = $xbmc_host.':'.$xbmc_port;
	} else {
		$host = $xbmc_host;
	}

	if (!empty($xbmc_user)) {
		$creds = '-u '.$xbmc_user.':'.$xbmc_pass;
	} else {
		$creds = null;
	}
	
	if (!empty($first_name)) {
		$curl = "curl $creds \"http://$host/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification%28Incoming%20Call%2C$first_name%20$last_name%20%3C$phone%3E%2C15000)\"";
	} else {
		$curl = "curl $creds \"http://$host/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.Notification%28Incoming%20Call%2C$cid_name%20%3C$cid_num%3E%2C15000)\"";
	}
	 $curl_again = "curl $creds \"http://$host/xbmcCmds/xbmcHttp?command=Pause\"";
	shell_exec($curl_again);
	shell_exec($curl);
	
}

All of that is not required, but it does work VERY well. It also allows for authentication as well. My * box happens to be remote, this allows me to safely open an obscure port and still receive XBMC notifications from the remote system.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
CID Superfecta Data source for XBMC Integration?

Developer Patrick has responded to user rockinthesixstring's suggestion and created a "send_to_URL" datasource.

This is a post processing only data source that sends the number and cname to an external url for additonal processing.

This should be useful for the folks to like to send this data to the XBMC program - and thats where you might be able to help. Can you try this new data source with your XBMC and see how it works for you?
guinea.jpg


Testers can get the alpha data source file here. (Its attached to the ticket)

Please report your results - otherwise well never know if it works for you or not, right?

UPDATE: We have a functional data source. It is attached to the ticket linked above, and its called beta 1. Please give it a try - and let usknow how it works for you.

At this time, it does not support authenitcation to XBMC, so if you have turned that on, this data source wont currently work for you.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Its a done deal. New CID Superfecta Data Source source-Send_to_XBMC.php

New Data Source source-Send_to_XBMC.php

:cheers2:
Thanks to a rapid-fire colaberation between Developer Patrick, forum member rockinthesixstring, and myself - a brand new output only data source allowing CID Superfecta to send caller ID data to the Media Player XBMC, has just been added to the Superfecta Live Update repository.

source-Send_to_XBMC.php

Data source-Send_to_XBMC.php sends both Caller Number and Caller Name data to a computer running XBMC.

This source is an output-only source. It can not look anything up, it only sends whatever has been looked up by the data sources before it on the list. It should be one of the last, if not THE last data source on your list.

NOTE: This data source should be used with Superfecta Version 2.2.3 or later for best performance. It is compatible with Superfecta v2.2.0 and greater.

Previous version of the Superfecta Module may not perform well when processing accented characters through this data source.

This interesting ouput-only data source is NOW AVAILABLE within the Superfecta v 2.2. module's built in data source update function. Be sure and check it out!

The time has never been better to get involved and help create new data sources for the Superfecta Module! The documentation to help get you started is here.

-tshif
 
Joined
Apr 22, 2009
Messages
230
Reaction score
0
2.2.3 is not released yet.
So far the only difference for XBMC is if you use multiple instances of this source to send to different system. It does not change anything for a single instance of this source.
 

madberry

New Member
Joined
Oct 25, 2009
Messages
31
Reaction score
0
Name

Works Like a charm. Just one request could we get the option to either add or remove displaying the name as well?

Posted this in the wrong threat lol
 

Members online

Forum statistics

Threads
25,824
Messages
167,831
Members
19,249
Latest member
jetest
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