Introduction
This addon has two components:
- A front-end, which runs on XBMC side as a Program Add-on;
- A back-end, which runs on the PBX server side as part of the Asterisk itself and as PHP component;
Download necessary files
- Download latest version from here: http://code.google.com/p/xbmc-pbx-addon/downloads/list
- Save this file somewhere, you will need it later;
- We assume this file is named script.xbmc-pbx-addon.zip;
PBX: Back-end Installation
Move files around
- Unzip the script.xbmc-pbx-addon.zip file you downloaded before;
- Find a directory named backend_files inside the file you just extracted;
- Using your favorite FTP program move this folder content to your PBX server;
PBX Time
- Log-in into your PBX server;
- Put the manager_custom.conf file into /etc/asterisk/;
- Edit this file, specially the IP address which has to be IP Address of your XBMC host;
- Remove the trailing ; in order to enable it;
- If you are not using a standard install of FreePBX and Asterisk make sure /etc/asterisk/manager.conf has an include line like this one:
#include manager_custom.conf
- Append the contents from extensions_custom.conf.sample to your own /etc/asterisk/extensions_custom.conf;
- Put the xbmc-pbx-addon.php file somewhere you can access it from a web browser;
- Probably you'll pace it here: /var/www/html/;
- And you may reach it with the web browser at: http://asterisk/xbmc-pbx-addon.php;
- Of course, you must already have a Web Server (i.e. Apache) running on the PBX server;
- Using a standard install of FreePBX and Asterisk you may not have to change any values in the PHP file;
- Once you've finished, restart your PBX software:
- If you have FreePBX installed:
root-pbx$amportal restart
- Otherwise:
root-pbx$/etc/init.d/asterisk restart
Optional
- To stop Fail2Ban from banning XBMC while setting it up set:
ignoreip = [IP OF XBMC]
- Do this in /etc/fail2ban/jail.conf;
- Also, restart it:
root-pbx$service fail2ban restart
XBMC: Front-end Installation
Via zip file
- In XBMC, go to System -> Add-ons -> Install from zip file;
- Find and select the script.xbmc-pbx-addon.zip file you downloaded before;
- You must see a notification pop-up saying XBMC PBX Addon is Enabled;
Via Add-ons official repository
- In XBMC, go to System -> Add-ons -> Get Add-ons -> XBMC.org Add-ons -> Program Add-ons -> XBMC PBX Addon;
- Select the Install option;
- You must see a notification pop-up saying XBMC PBX Addon is Enabled;
Autoexec.py
- For XBMC Eden, you don't need to worry about this;
- For XBMC Dharma, copy the autoexec.py file (from the script.xbmc-pbx-addon.zip file you downloaded before) to ~/.xbmc/userdata/;
- For XBMC4XBOX 3.0.1, customize then copy the autoexec.py file (from the script.xbmc-pbx-addon.zip file you downloaded before) to Q:\scripts;
XBMC: Front-end Configuration
- In XBMC, go to System -> Add-ons -> Enabled Add-ons -> Program Add-ons -> XBMC PBX Addon -> Configure;
- Connection:
- Be very careful to put here the correct values for AMI (the ones you put in /etc/asterisk/manager_custom.conf);
- Also set the hostname to the correct hostname or IP address for your PBX Server;
- CDR & VoiceMail:
- Specify the URL you used with your web-browser to access the xbmc-pbx-addon.php;
- Then you may want to change the Mailbox number for the one you would like to retrieve VoiceMail messages;
- Outbound Calls:
- Customize it with the extension (and context) you would like to use when initiating outbound calls;
- Inbound Calls:
- The first setting (...NewChannel State) defines how inbound calls are detected so you might try these values:
- Ring if you have an Asterisk 1.6 PBX server;
- Down if you have an Asterisk 1.4 PBX server;
- Personalize the remaining settings to modify the XBMC and Asterisk behavior for inbound calls;
- OK:
- Click OK for settings to be saved;
XBMC Restart
- Restart XBMC for the background service to automatically start;
- Once XBMC has loaded, you should see a notification pop-up showing the number of VoiceMail messages you have in your Mailbox;
XBMC: Front-end first run
- To open (run) it, just go to Programs from the XBMC home screen and find XBMC PBX Addon;
- In case you didn't if before, you will be prompted to configure this add-on;
- If everything went fine, you will see the front-end main screen with the list of your phone calls;