Long time i didn’t update my blog, hehehe…

now, i will try to writing about PCRF at IMS, what is that?

PCRF (Policy Control Rule Function) is one of IMS architecture which support for policy and charging control decision based on session and media related information obtained from the P-CSCF. For that implementation, i’m use  UCT Policy Control Framework at my OpenIMS. So you can get the detail information of that at UCT or FOKUS project. UCT Policy Control Framework have defined two software tool for implementation, they are PCRF and PCEF (Policy and Charging Enforcement Point).

PCRF connected to PCEF with the Gx interface, that the function of PCEF’s role encompasses applicable traffic detection and resultant policy enforcement. This entity is typically located at a Gateway node, which varies by transport layer (e.g. a GGSN, PDG etc.). 

You can search the other references related this topic, i can’t explained too detail for that. Maybe you have good reference for this topic, please share with the others. You can comment for this page and share your reference. Hehe 😀

Ok, now let’s begin build that implementation, for prerequisites you must have install openims core and running verry well.

Make sure it,

1. Download the software

Download the extended ser_ims from the 08_cdp_sessions branch

#svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/branches/08_cdp_sessions ser_ims_qos

or maybe you have the source of ser_ims20081023.r0595.tgz, you can extract them and copy folder 08_cdp_sessions ser_ims_qos to your ser_ims_qos direktory

#cp 08_cdp_sessions ser_ims_qos /opt/OpenIMSCore/ser_ims_qos/

Download the uctpcrf tarball here and extract in /opt/OpenIMSCore/

#tar -xvzf /opt/OpenIMSCore/uctpcrf.tar.gz

You will need the following Ubuntu packages: libxerces-java libcommons-httpclient-java tomcat5.5

from the command line:

#sudo apt-get install libxerces-java libcommons-httpclient-java tomcat5.5

2. Configure DNS Server

You need to add DNS entries for the PCRF and PCEF

If you are running the DNS on your own machine add these lines to /etc/bind/open-ims.dnszone:

pcrf            1D IN A

pcef            1D IN A

You will need to restart bind for these changes to take effect:

sudo /etc/init.d/bind9 restart

Check that this all works; try a nslookup and see if you get a response:

nslookup pcrf.open-ims.test

nslookup pcef.open-ims.test

3. Compile source

Compile the CSCFs. In /opt/OpenIMSCore/ser_ims_qos:

#sudo make install-libs all

Set the JAVA_HOME environment variable:

#export JAVA_HOME=”/usr/lib/jvm/java-1.6.0-sun”

Compile the PCRF and PCEF.  In /opt/OpenIMSCore/uctpcrf:


4. Setup Web Interface

Move the web management folder to the document root of the Tomcat server

#cd /opt/OpenIMSCore/uctpcrf

#sudo cp -r uct_web_pcm /var/lib/tomcat5.5/webapps

Move the uct_web_pcm.policy config file to the policy folder of the Tomcat server

#cd /opt/OpenIMSCore/uctpcrf/config

#sudo cp uct_web_pcm.policy /etc/tomcat5.5/policy.d

Change the file permissions on files domain_policies.xml, default_domain_properties.xml, pcef.properties and pcrf.properties.

#chmod uog+rw /opt/OpenIMSCore/uctpcrf/policies/domain_policies.xml

#chmod uog+rw /opt/OpenIMSCore/uctpcrf/policies/default_domain_policies.xml

#chmod uog+rw /opt/OpenIMSCore/uctpcrf/config/pcef.properties

#chmod uog+rw /opt/OpenIMSCore/uctpcrf/config/pcrf.properties

Restart the Tomcat server

#sudo /etc/init.d/tomcat5.5 restart

5. Configure for your ip address and domain with configurator.sh

Set your ip address and domain for your pcrf,pcef and all config folder ser_ims_qos,

root@open-ims:/opt/OpenIMSCore#ser_ims/cfg/configurator.sh uctpcrf/config/pcef.sh uctpcrf/config/pcrf.sh uctpcrf/config/ims.sh uctpcrf/config/DiameterPeerPCEF.xml uctpcrf/config/DiameterPeerPCRF.xml uctpcrf/config/DiameterPeerPCSCF.xml uctpcrf/config/pcscf.qos.cfg uctpcrf/config/pcscf.qos.rtp.cfg uctpcrf/config/pcscf.qos.rtp.sh uctpcrf/config/pcscf.qos.sh uctpcrf/config/pcscf.qos.xml uctpcrf/config/rtpproxy.sh uctpcrf/config/runDiameterClient.sh uctpcrf/config//xcapTest.sh uctpcrf/config/uct_web_pcm.policy uctpcrf/config/ims.qos.rtp.sh uctpcrf/config/ims.qos.sh \ uctpcrf/config/pcrf.properties uctpcrf/config/pcef.properties

Domain Name:open-ims.test
IP Adress:

6. Run

Copy the new configuration files to the OpenIMSCore folder:

#cd /opt/OpenIMSCore/uctpcrf/config

#cp pcscf.qos.cfg pcscf.qos.rtp.cfg pcscf.qos.xml pcscf.qos.sh ims.sh ims.qos.sh ims.qos.rtp.sh  /opt/OpenIMSCore

From /opt/OpenIMSCore run all the core elements (if there is an error try setting the JAVA_HOME environment variable again):


or maybe you can run





Run the PCRF and PCEF each in a new terminal tab (if there is an error try setting the JAVA_HOME environment variable again). Note: the PCEF must be run as super user as it invokes network commands:

cd uctpcrf


sudo ./pcef

Run the Web Management Interface in a suitable web browser:

Go to http://localhost:8180/uct_web_pcm/



UCT Policy Control Framework i