[RELEASE] XBMC PBX Addon - Home Telephony Experience using Asterisk

  Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Thumbs Up  [RELEASE] XBMC PBX Addon - Home Telephony Experience using Asterisk
Post: #1
By integratating Asterisk into XBMC you can use it as a front-end for certain functionality (like playing voicemail) and to automate some tasks (like pausing video on incoming calls), among other features.

For downloads, code, documentation, screenshots, etc, please take a look here: http://code.google.com/p/xbmc-pbx-addon/

Changelog:

== 1.0.10 (Eden Only) ==
* Added option to store listened VM messages (MWI);
* Dialer is now numeric-only;
* A valid Caller ID is no longer required (will work with no CID at all);
* Experimental: Added option to display Caller's picture;
* UTF8 encoded all content from CDR & VM;
* Nicer Back-end messages;
* Back-end messages are now also shown on Front-end;
* Script is killed using XBMC Eden method;
* Fixes from vladi (XBMC Forum member) Thanks!;
* Other fixes

== 0.0.9 ==
* Restored autoexec.py which is still needed for Dharma;
* Added option to Auto-select NewChannel State setting based on Asterisk Version;
* Added the ability to call back numbers from the voicemail list;
* Added a Dialpad (keyboard input) to initiate phone calls;
* Some other minor changes;

== 0.0.8 ==
* Updated images (fanart and icons) to comply with this guideline: http://wiki.xbmc.org/index.php?title=Add...lopment%29
* Removed (unnecessary) check for Linux64 that was causing trouble with XBMC Eden(-pre). Thanks freebs (XBMC Forum member);
* Added option to disable background service (so video is not going to be paused and notification popups are not going to be shown);
* Added check for Front-end and Back-end versions to make sure they match;
* Some other minor changes;

== 0.0.7 ==
* Several fixes and improvements done by oneadvent (XBMC Forum member) Thanks!;
* Made it compatible with Dharma and Eden XBMC releases;
* Tested it on XBMC for Linux, Windows, XBMC4XBOX 3.0.1 and LiveCD;
* Added some checks and instructions on server-side;
* Added settings for VoiceMail notification timeout;
* Added settings to display Caller ID and/or pause video only if ALERT_INFO matches;
* Added setting to enable/disable DEBUG;
* Updated py-asterisk library to version 0.2;
* Fixed VoiceMail sorting;
* Added a "Refresh" button, so new CDR and VM information is retrieved from Asterisk;
* GUI moved from PAL to 720p default resolution;
* Added fanart;

== 0.0.6 ==
* Fixed support for both Asterisk 1.4 and Asterisk 1.6;
* Added ability to delete Voice Mail;
* Rewrote skin to avoid localization bug and changed layout;
* Added Music Player controls while playing Voice Mail;
* Plus a few other changes and fixes;

== 0.0.5 ==
* Added new setting to redirect calls if ALERT_INFO matches;
* Restricted AMI permissions;
* Re-arranged script settings;
* Added script image on notifications, tbn, etc;
* Some other minor changes;

== 0.0.4 ==
* Changed the way script settings are used, making possible to reflect them immediately;
* Script splitted in two files (one for background and another for GUI) as XBox is unable to run the same script twice;
* Some fixes;

== 0.0.3 ==
* Updated py-asterisk library;
* Added VoiceMail Context configuration;
* Added NewChannel State configuration;
* Added VoiceMail count notification on script startup;
* Added ability to Redirect(Transfer) phone calls if playing video;
* Some fixes;

== 0.0.2 ==
* Added some error handling and messages for missing CDR & VM files/directory;
* Some fixes;

== 0.0.1 ==
* Started a GUI using WindowsXML;
* GUI skinnable and supporting internationalization;
* Instructions are shown on first use;
* Partially working functionality:
* XBMC actions (i.e. Caller ID notification popup) based on Asterisk events;
* Displaying CDR info into XBMC;
* Initiating an outgoing phone call for the selected record;
* Displaying Voice Mail info into XBMC;
* Should be able to play the VoiceMail recorded message into XBMC.


Have fun!
Hernan.-
(This post was last modified: 2012-03-14 03:27 by hmr.)
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #2
Ok, lots of changes since last post. To mention a few:

* Unified code and directory structure;
* Started a GUI using WindowsXML;
* Partially working functionality:
* XBMC actions (i.e. Caller ID notification popup) based on Asterisk events;
* Displaying CDR info into XBMC;
* Initiating an outgoing phone call for the selected record;
* Displaying Voice Mail info into XBMC;
* Should be able to play the recorded message into XBMC. Need to fix it;
* And maybe something else;

Feedback is welcome!
Hernán.-
find quote
Batemann Offline
Aeon Group
Posts: 323
Joined: Oct 2007
Location: Amsterdam
Post: #3
Sounds interesting. I have VOIP at home, but I don't use it since I don't have a phone... Might be cool to use XBMC for it. ;-)

[Image: widget]
[Image: widget]
find quote
highlandsun Offline
Senior Member
Posts: 152
Joined: Mar 2009
Reputation: 0
Post: #4
I don't mean to sidetrack things, but this reminds me... I use an old dialup modem to read caller ID info for my home phone, and use a small bit of code to broadcast that onto my home network. Might be nice to be able to popup the CID info while XBMC is playing too.

I'll take a look at your code to see how it sets up a listener to deal with this stuff.
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #5
@Batemann
Thanks!, but I have to clarify: This script will only request Asterisk to initiate a phone call between two endpoint and XBMC will not be part of media path.

This means XBMC will not act as a VoIP softphone. However, I would be interested on some directions if it's even possible.

@highlandsun
Thanks, hope you can review the code soon!.

Please let me tell you that CID notification popup is a feature already covered, but your experience on this matter will certainly help. Maybe you can take a look at it and complete it (i.e. settings)

@all
BTW, I've updated the project information on the google code site. Hope it's more clear now!

Best regards!
Hernan.-
find quote
pt-1 Offline
Senior Member
Posts: 175
Joined: Aug 2006
Reputation: 0
Post: #6
Hi,

do you think you could offer this whole package to download as 1x ZIP file?

Additionally do you plan for multiple XMBC installations?

I have 3 running ;-)

THX

PT-1
find quote
CrashX Offline
Posting Freak
Posts: 1,164
Joined: Jan 2009
Reputation: 2
Post: #7
Would this work with Vonage ?

The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #8
Sorry the delay, I've been busy with personal stuff and also testing this script.

There were lot of changes on code and hopefully it is fully working now.
Please check the google code site for changelog, screenshots and documentation!

Do not forget your feedback is necessary and any help con improving it (specially the skin) will be more than welcome!

@pt-1
I've now uploaded a single zip file as you requested.
I do have several XBMC installations where I'm testing it and found no issues so far, but please let me know your feedback.

@CrashX
This script would work with any VoIP provider as long as you have an Asterisk box.

@script developers
There is just one small bug I can't figure it out: When you access the script for the first time, the WindowXML skin is not being localized, and therefore no labels are shown. If you access this script settings and run the script after that, it will be properly localized.

Thank you!
Hernan.-
find quote
pt-1 Offline
Senior Member
Posts: 175
Joined: Aug 2006
Reputation: 0
Post: #9
Hi,

I can browse to http://xxx.xxx.xxx.xxx:8088/static/config/index.html and see the Astersik guy.

Should I be able to browse to http://xxx.xxx.xxx.xxx:8088/xbmc-pbx-addon.php ?? or browse to http://xxx.xxx.xxx.xxx:5038/xbmc-pbx-addon.php ??

The xbmc-pbx-addon.php is in /var/lib/asterisk/static-http

Any Ideas?

PT-1

PS: I did not use your manager_custom.conf, I did my changes in the manager.conf ....
find quote
pt-1 Offline
Senior Member
Posts: 175
Joined: Aug 2006
Reputation: 0
Post: #10
pt-1 Wrote:Hi,

I can browse to http://xxx.xxx.xxx.xxx:8088/static/config/index.html and see the Astersik guy.

Should I be able to browse to http://xxx.xxx.xxx.xxx:8088/xbmc-pbx-addon.php ?? or browse to http://xxx.xxx.xxx.xxx:5038/xbmc-pbx-addon.php ??

The xbmc-pbx-addon.php is in /var/lib/asterisk/static-http

Any Ideas?

PT-1

PS: I did not use your manager_custom.conf, I did my changes in the manager.conf ....

Please forget above, I can login to the Interface via:

http://xxx.xxx.xxx.xxx:8088/manager?acti...ecret=xbmc
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #11
Seems you are using the built-in HTTP Asterisk Manager Interface, aka AJAM.

I haven't tested xbmc-pbx-addon.php there but I would assume it wont work, and it was intended to be running under a traditional web server like Apache, so it will be nice to hear your results.

Remember that php file is going to be called from a python script running under XBMC in order to fill the GUI with CDR/VM information. However, if you want to test it, try this:

http://XXXXX:XXXX/XXXX/xbmc-pbx-addon.php?cdr


Best regards,
Hernán.-
find quote
pt-1 Offline
Senior Member
Posts: 175
Joined: Aug 2006
Reputation: 0
Post: #12
hmr Wrote:Seems you are using the built-in HTTP Asterisk Manager Interface, aka AJAM.

I haven't tested xbmc-pbx-addon.php there but I would assume it wont work, and it was intended to be running under a traditional web server like Apache, so it will be nice to hear your results.

Remember that php file is going to be called from a python script running under XBMC in order to fill the GUI with CDR/VM information. However, if you want to test it, try this:

http://XXXXX:XXXX/XXXX/xbmc-pbx-addon.php?cdr


Best regards,
Hernán.-

I stuck the php file into :/var/lib/asterisk/static-http and :/var/lib/asterisk/static-http/config as I was unsure what you meant with the Asterisk http-root

browsing to: http://xxx.xxx.xxx.xxx:8088/manager?acti...e=&secret=

gives me this:

[Image: asterisk.png]
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #13
The screenshot you provided is the AJAM interface, which is not required nor used by this script.

Instead, you should install a regular web server such as Apache, and then copy the xbmc-pbx-addon.php file into its root directory, which should be /var/www/ if you are using Debian.

Please let me know if you have any questions.

Regards!
Hernán.-
find quote
pt-1 Offline
Senior Member
Posts: 175
Joined: Aug 2006
Reputation: 0
Post: #14
OK,

now I get this in the Explorer Window:

<?xml version="1.0" ?>
<pbx />

When browsing to your PHP File.

I am not at home currently so cannot check from the Xbox
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #15
You are getting closer!

That PHP file is trying to read CDR information from the Master.csv file generated by Asterisk, and given no information is shown, you will need to make sure it is being created.

For more information on this topic: http://www.voip-info.org/wiki/view/Asterisk+cdr+csv

This make me think I will need to add an error message on the PHP file to alert users when Master.csv is not found/readable.

Keep us updated with your progres.

Thanks,
Hernán.-
find quote
Post Reply