Sunday, May 20, 2007

Asterisk + Openser + Freeradius + Mysql (3)

*Other

14. Firewall
vi /etc/sysconfig/iptables
add:
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5070 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 7890 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 35000:65000 -j ACCEPT

# restart firewall
/etc/init.d/iptables restart

15. Automatically start on boot time
vi /etc/rc.d/rc.local
add:
/usr/local/bin/rtpproxy -l x.x.x.x -s udp:localhost:7890
/usr/local/sbin/radiusd
/usr/local/sbin/openser start

PS: Asterisk was set to start as demand by "make config"

16. Add users
/usr/local/sbin/openserctl add

add group
/usr/local/sbin/openserctl acl grant
ps users should be in "voicemail" group if they wanna the voicemail function

then add user data into /usr/local/etc/radda/users

restart Freeradius

17. Storage
voicemail will be saved in database ( asterisk -> voicemessages )
and /var/spool/asterisk/voicemail/default/XXXX < account no. also in root's mail ( /var/mail/root ) *reference: http://www.frontios.com/freeradius.html http://www.openser.org/docs/openser-radius-1.0.x.html http://www.voip-info.org/wiki/view/Realtime+Integration+Of+Asterisk+With+OpenSER http://www.openser.org/dokuwiki/doku.php/asterisk:realtime-integration

No comments:

Post a Comment