TUTORIAL How to install Openfire and Asterisk-IM on PBXAF 1.3+

cjkeeme

Guru
Joined
Jun 18, 2008
Messages
203
Reaction score
0
I find Openfire and the Asterisk-IM plugin for Openfire to be a very valuable addition to my PBXAF server. Even after reading information on these forums I had to figure out or piece together a few things for myself. Here is the procedure I go through on my production servers to anyone who is interested.

How to install Openfire on PBX in a Flash 1.3:

Download Java JDK .rpm.bin file to root directory and install using the following commands:
Code:
chmod a+x jdk-6<version>-linux-i586-rpm.bin
./jdk-6<version>-linux-i586-rpm.bin


Download Openfire .rpm file to root directory and isntall using the following commands:
Code:
rpm -ivh openfire<version>.rpm


Setup your database with phpMyAdmin:
Database: openfire
Username: openfire
Password: Generate one and document this password
Privileges: Grant all privileges

Import the schema file:
/opt/openfire/resources/database/openfire_mysql.sql into new DB.

Add the following lines to /etc/sysconfig/iptables above the word COMMIT:
Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9091 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9090 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5222 -j ACCEPT

Reboot the system.

Browse to http://xxx.xxx.xxx.xxx:9090 and complete the installation.

NOTE: Enable Subscription, Registration, IM Gateway, and the Asterisk-IM Openfire plugins after installations the do the following:

Server –> Server Settings –> Subscription Properties and do the following:
Select ‘Accept’ – Subscription requests will be intercepted and accepted
Select ‘All’ – All Subscription requests will be intercepted and automatically accepted.​




How to install Asterisk-IM on PBX in a Flash 1.3:

1. Enable Asterisk-IM plugin and click ‘Save’
2. Click ‘Add Server’
3. Fill in the fields with the following data
a. Server Name: asterisk
b. Server Address: xxx.xxx.xxx.xxx
c. Port: 5038
d. Username: admin
e. Password is contained in /etc/amportal.conf – default is ‘amp111’​
4. Fill in the field for ‘Configure Phone Manager’ with the following data:
a. Asterisk Queue Presence: Yes
b. Drop-down device selection: Yes
c. Asterisk Context: from-interal
d. Default Called ID: DefaultCID​
5. Edit /etc/asterisk/manager.conf and add the following line:
permit=xxx.xxx.xxx.xxx/255.255.255.0 #Where xxx.xxx.xxx.xxx is the ip address of the server

6. Then do an ‘amportal restart’
7. If the plugin is still not connected disable and re-enable the plugin to connect.
8. Now click on ‘Phone Mappings’ and map you phones using the following scheme:
a. Username: <spark username>
b. Device: Protocal/Extension - Ex. SIP/200 or IAX/201
c. Extension: Extension – Ex. 200 or 201
d. Called ID: Name of Person Using the Phone
e. Check ‘Primary’ and click Save.
f. Do the same for everyone using Spark with a phone attached to Asterisk.​
 

TheShniz

Guru
Joined
Nov 15, 2007
Messages
560
Reaction score
2
This install has already been covered several times, but nothing wrong with the reminder :)

A.) You should find Java is already included w/ the Openfire .rpm

B.) Those ports will get you started, but there's actually a couple more if you really get into all its features.

Code:
# Allow connections to our Openfire Server
#  - Web Administration
-A INPUT -p tcp -m tcp --dport 9090 -j ACCEPT
#  - Remote Administration
-A INPUT -p tcp -m tcp --dport 9091 -j ACCEPT
#  - XMPP Clients
-A INPUT -p tcp -m tcp --dport 5222 -j ACCEPT
#  - Flash Clients
-A INPUT -p tcp -m tcp --dport 5229 -j ACCEPT
#  - Connection Manager
-A INPUT -p tcp -m tcp --dport 5262 -j ACCEPT
#  - XMPP Servers
-A INPUT -p tcp -m tcp --dport 5269 -j ACCEPT
#  - File Transfer
-A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT
#  - External Components
-A INPUT -p tcp -m tcp --dport 10015 -j ACCEPT

C.) The latest versions of Openfire have issues with reliably passing CID through, when the caller is be processed through a queue in Asterisk. The workaround is to instead setup a Ring Group.

D.) You can also use an embedded database for small installations, but just make sure to alter the database to get Asterisk-IM going (available in Ignite forums)

X.) Spark IM is most definately an aging client, and it desperately needs updating... unfortunately it is the only client you can use w/ Asterisk-IM.
 

gaijin

Guru
Joined
Nov 16, 2007
Messages
170
Reaction score
0
Not sure if anyone has had any luck, but I can't seem to get presence to work with my SCCP extensions...

Has anyone else got this to work?
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
SMS phone to phone ?
I have installed openfire on my piaf server and it works great.
I have some Yealink phones that i'm testing, and they can send and receive sms messages but I have been unable to get it to work, it does state in the manual you need to enable this feature on the voip server. has anyone setup this type of feature before on asterisk or used it with sip phones.

Gary
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Will these instructions still work on the most recent Incredible Ubuntu release? How about PIAF Raspberry Pi Jesse? I'm not as concerned about the Asterisk integration (it would be nice though) as just a separate install of Open Fire running on my PIAF server. Will they interfere with each other?
 

hecatae

resident hecatae
Joined
Feb 7, 2014
Messages
769
Reaction score
202
@Jake

If you need Openfire, I would seriously consider Elastix 4.0, as it's included.

Other than that the instructions should work.
 
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