Docstoc

SIP-Based Multimedia System

Document Sample
SIP-Based Multimedia System Powered By Docstoc
					           SIP-Based Multimedia System




                Mr. Tiranat Taweewatanapan
                   Mr. Nadpiya Bhekanan




A Project Submitted in Partial Fulfillment of the Requirements
          for the Degree of Bachelor of Engineering
Department of Computer Engineering, Faculty of Engineering
    King Mongkut’s University of Technology Thonburi
                    Academic Year 2009
                              SIP-Based Multimedia System




                              Mr. Tiranat Taweewatanapan
                                 Mr. Nadpiya Bhekanan




              A Project Submitted in Partial Fulfillment of the Requirements
                        for the Degree of Bachelor of Engineering
              Department of Computer Engineering, Faculty of Engineering
                    King Mongkut’s University of Technology Thonburi
                                  Academic Year 2009




Project Committee
……………………………………………………………                                  Advisor
(Asst. Prof. Peerapon Siripongwutikorn, Ph.D.)

……………………………………………………………                                  Committee
(Santitham Prom-on, Ph.D.)

……………………………………………………………                                  Committee
(James Finn, Ph.D.)
                                              -i-


       Project Title          SIP-Based Multimedia System
       Project Credit         4 credits
       Project Participant    Mr. Tiranat Taweewatanapan
                              Mr. Nadpiya Bhekanan
       Advisor                Asst. Prof. Peerapon Siripongwutikorn, Ph.D.
       Degree of Study        Bachelor's Degree
       Department             Computer Engineering
       Academic Year          2009




                                           Abstract


       The multimedia systems nowadays provide convenience for human being. Presently,
we gain benefit of the system by using the multimedia service such as; audio call, video call,
instant messenger, and file transfer. These services are now very essential to run business
efficiently. The question is it is possible to combine all of these services together and adding
more services to the same system. Since, these services are now running independently on the
various application and system. For example, MSN may provide you a good instant
messenger, but if you want to have high quality audio or video call, you may need another
application. This means that there are two applications and systems required on your
business, so more budget and more complexity.
       To provide the solution for this problem, there is need of complete solution of
multimedia system, which is able to provide all of the services that exist on the network, in
the same application and system. This statement may rise another question that what kind of
system and application having all services all at one.
       We would like to introduce new generation multimedia system core, IP Multimedia
Subsystem (IMS), which is communicating by using Session Initiation Protocol (SIP). IMS
provides the complete solution of multimedia system core, and SIP completely provides
multimedia services protocol. By using these two components, we can create the application
that has the above properties, which is the application that is able to provide all the
multimedia functions within one efficient system.
                                            - ii -




                                 Acknowledgement

       We could not complete this project without the help of our advisor, Asst. Prof.
Peerapon Siripongwutikorn, Ph.D. He shared his time to guide us and help us to make our
project run smoothly. We are very thankful to him.
       We would like to thank our classmates, friends and graduate students for their help
and support. We also appreciate the Computer Engineering Department for providing us the
International Student Service room and project room which have served us many benefits in
finishing our project. Finally, we would like to thank every committee who given us
knowledge and guiding us in the project examinations.
                                   - iii -


                               Contents

                                              Pages

Chapter 1 Introduction
     1.1 Project Background                   1
     1.2 Project Objective                    1
Chapter 2 Related Theories
     2.1 Session Initiation Protocol (SIP)    2
     2.2 IP Multimedia Subsystem (IMS)        4
     2.3 FOKUS Open IMS                       9
Chapter 3 Methodology

     3.1 System Requirement                   11
     3.2 Software and Tools used in Project   11
     3.3 Program Features                     11
     3.4 Program Design                       12
     3.5 Flow Chart                           13


Chapter 4 Result and Discussion
     4.1 Results on Clients                   14
     4.2 Results on Server                    28
Chapter 5 Conclusions
     5.1 Server                               32
     5.2 Clients                              32


References                                    33

Appendix A – IMS Installation                 34

Appendix B – HSS Web Interface                75
                                            - iv -




List of Figures
                                                       Pages
     Figure 2.1 Voice call communication using SIP     4
     Figure 2.2 IMS Overview                           5
     Figure 2.3 IMS registration                       6
     Figure 2.4 IMS session establishment              7
     Figure 3.1 Program Interface                      12
     Figure 4.1 Login as Alice                         14
     Figure 4.2 Login successfully                     14
     Figure 4.3 Typing message                         17
     Figure 4.4 Message is sent                        17
     Figure 4.5 Bob replies                            17
     Figure 4.6 [Alice Side] Alice calls bob           19
     Figure 4.7 [Bob Side] Bob client is ringing       19
     Figure 4.8 [Alice Side] The call is connected     20
     Figure 4.9 [Bob Side] The call is connected       20
     Figure 4.10 [Alice Side] The call is terminated   23
     Figure 4.11 [Bob Side] The call is terminated     23
     Figure 4.12 Alice selects the file to transmit    24
     Figure 4.13 [Alice Side] Sending                  25
     Figure 4.14 [Bob Side] Receiving                  25
     Figure 4.15 [Alice Side] Finished                 25
     Figure 4.16 [Bob Side] Finished                   25
     Figure 4.17 P-CSCF Registration                   28
     Figure 4.18 P-CSCF Instant Message                28
     Figure 4.19 P-CSCF Voice Call                     29
     Figure 4.20 P-CSCF File Transfer                  29
     Figure 4.21 S-CSCF Registration                   30
     Figure 4.22 S-CSCF Instant Message                30
     Figure 4.23 S-CSCF Voice Call                     31
                                         -v-




List of Tables
                                               Pages
     Table 2.1 Request code and definition     2
     Table 2.2 Response code and definition    3
                                             -1-


                                         Chapter 1


                                        Introduction


1.1 Project Background
       SIP-Based Multimedia System is the system providing many kinds of multimedia
service. The examples of services provide on this system are VoIP, instant messenger, and
file sharing. Actually, the services provide on this system is numerous, since any multimedia
service can be added to this system. The protocol using in this system is SIP (Session
Initiation Protocol), since SIP provides many function suited to our system.
       Also, we introduce the implementing of IMS (IP Multimedia Subsystem). It is an
international standard multimedia system core which enables person-to-person and person-to-
content communications in many modes including voice, text, image and video. It provides
basic functionality of multimedia system core such as; login system, user database system,
user permission system. By using these functions, we can easily create the multimedia system
based on this multimedia system core.
       In this project, we emphasize on developing multimedia system providing VoIP,
instant messenger, and file sharing service, using SIP (Session Initiation Protocol) as our
protocol and IMS (IP Multimedia Subsystem) as our multimedia system core.



1.2 Project Objectives

       1. To study IMS for basic application.

       2. To study how to implement an IMS application with open source IMS software.

       3. To create a simple IMS application that can communicate voice and data.
                                               -2-


                                         Chapter 2


                                    Related Theories


2.1 Session Initiation Protocol (SIP)
       Session Initiation Protocol (SIP) is a signaling protocol, which can provide the
multimedia service. Almost every multimedia service can be used over this protocol such as;
instant messenger, audio call, video call. Also, by using this protocol, we can implement the
exampled services to gain more benefit on business such as; video conference, or broadcast
the company news over the network.
       The major task of the SIP is to initiate the session of the multimedia. In order to
initiate the multimedia session, the information about, IP address, port, and codec, must be
provided. The SIP is the communicator which goes and asks for the willingness to receive the
multimedia session. If both sender and receiver willing to establish the session, SIP also ask
for the IP address, port, that will be used in the communication and negotiate for the codec of
the multimedia. [1]
       SIP works in the request and response fashion, once the sender sends request to the
receiver; the receiver must send a response message to the sender. The tables below show
some of the request and response code in order to gain the reader to understand the protocol.




                               Table 2.1 Request code and definition
                                               -3-




                               Table 2.2 Response code and definition


       We would like to demonstrate the use of SIP protocol in the diagram below. The
diagram below shows the example of voice call using SIP to initiate the RTP session. It
consists of 2 users, which are user A and user B. The user A sends the INVITE request to the
user B, in order to ask the user B to receive the voice call. In the diagram user B response 100
TRYING, which is the response message to tell the sender that user B is received the
message and notification process is processing. Also, 180 RINGING response message is
sent to tell the user A that the client of user B is now prompt the user to accept or reject the
call. Then, user B reply 200 OK response message, in order to tell user A that the call is
received. Following by the request message ACK from the user A, this ACK message is to
ensure that user A really receive the response from the user B.
       You can see that SIP only sending request and response for ask and negotiate 2 users
to communicate using voice call. Once both users agree to communicate to each other, RTP
Session is begun, in order to transmit the voice.
       After a while, user A need to terminate the call, once again the SIP play an important
role to terminate the call, by sending BYE request message to user B. Then user B reply 200
OK response message in order to inform user A that the session is terminated. [2]
                                               -4-




                           Figure 2.1 Voice call communication using SIP



2.2 IP Multimedia Subsystem (IMS)
       IP Multimedia Subsystem (IMS) is an international standard for Voice over IP
(VoIP) and multimedia services which enables person-to-person and person-to-content
communications in many modes including voice, text, image and video. IMS compose of
two main parts which is Home Subscriber Server (HSS) to manage user profiles and
associated routing rules and SIP server called Call State Control Function (CSCF), the
central routing unit, which included Serving CSCF (S-CSCF), Proxy CSCF (P-CSCF) and
Interrogating CSCF (I-CSCF). [3]


       The Home Subscriber Server (HSS) is a master user database that supports the IMS
network entities that actually handle calls. It contains the subscription-related information
(user profiles), performs authentication and authorization of the user, and can provide
information about the user's physical location.
                                              -5-




                                     Figure 2.2 IMS Overview



The responsibility and roles of each control function are listed below,


   1. Proxy CSCF (P-CSCF) act as SIP proxy server which accept SIP request from the
      users and then serves these requests internally or forward them to other servers.

   2. Serving CSCF (S-CSCF) act as SIP registrar to accept user registration, it download
      and upload user profiles to HSS. It also performs SIP session control function for a
      registered user and maintains session state as needed by the network operator for
      support of the services. Then, S-CSCF decides which AS is appropriate to receive
      information related to an incoming SIP request to ensure appropriate service handling.
      The decision at the S-CSCF is based on filter information received from the HSS.

   3. Interrogating CSCF (I-CSCF) act as SIP function that queries the HSS to retrieve the
      user location and then route SIP requests to the assigned S-CSCF. [4]
                                              -6-


Registration


        Before IMS registration, which allows the User Equipment (UE) to use IMS services,
the UE must obtain an IP connectivity bearer and discover an IMS entry point (P-CSCF).




                                   Figure 2.3 IMS registration
        IMS registration contains two phases: the left part of Figure 3.1 shows how the
network challenges the UE. The right part of Figure 3.1 shows how the UE responds to the
challenge and completes the registration.


Network challenges the UE process
   1. The UE sends a SIP REGISTER request, which contain an identity to be registered
      and a home domain name (address of the Interrogating-CSCF, or I-CSCF), to the
      discovered P-CSCF.

   2. The P-CSCF processes the REGISTER request and uses the provided home domain
      name to resolve the IP address of the I-CSCF.

   3. The I-CSCF will contact the Home Subscriber Server (HSS) for S-CSCF selection.

   4. After S-CSCF selection the I-CSCF forwards the REGISTER request to the S-CSCF.

   5.    The S-CSCF realizes that the user is not authorized and, therefore, retrieves
        authentication data from the HSS and challenges the user with a 401 Unauthorized
        response.
                                               -7-




UE responds to the challenge and completes the registration


   1. The UE will calculate a response to the challenge and send another REGISTER
      request to the P-CSCF.

   2. The P-CSCF finds the I-CSCF.

   3. The I-CSCF finds the S-CSCF.

   4. The S-CSCF checks the response and, if it is correct, downloads a user profile from
      the HSS and accepts the registration with a 200 OK response.

Once the UE is successfully authorized, the UE is able to initiate and receive sessions.




Session Initiation




                             Figure 2.4 IMS session establishment flow
                                             -8-


User A wants to have a session with User B
   1. UE A generates a SIP INVITE request and sends to the P-CSCF.

   2. The P-CSCF processes the request: for example, it decompresses the request and
      verifies the originating user’s identity before forwarding the request to the S-CSCF.

   3. The S-CSCF processes the request, executes service control which may include
      interactions with Application Servers (ASs) and eventually determines the entry point
      of the home operator of User B based on User B’s identity in the SIP INVITE request.

   4. The I-CSCF receives the request and contacts the HSS to find the S-CSCF that is
      serving User B.

   5. The request is passed to the S-CSCF.

   6. The S-CSCF takes charge of processing the terminating session, which may include
      interactions with ASs and eventually delivers the request to the P-CSCF.

   7. UE B generates a response 183 Session Progress which traverses back to UE A
      following the route that was created on the way from UE A.

Both sets of UE complete session establishment and are able to start the actual application.


Services
Here are lists of services in IMS
   •   Presence services
   •   Full Duplex Video Telephony
   •   Instant messaging
   •   Unified messaging
   •   Multimedia advertising
   •   Multiparty gaming
   •   Video streaming
   •   Web/Audio/Video Conferencing
   •   Push-to services, such as push-to-talk, push-to-view, push-to-video
                                               -9-


2.3 FOKUS Open IMS
        Fraunhofer FOKUS is a provider of Open IMS core. Open IMS is open source, which
provides full functionality of IMS system. So, we intend to implement Open IMS to our
project, since it is free and efficient. [5]
        FOKUS provides the Open IMS source code for both CSCFs and HSS with the
limited feature as follow: [6]

Features of the Open Source IMS P-CSCF:

       Signaling firewall and user identity assertion (P-Preferred-Identity, P-Asserted-
        Identity header support)
       Local registrar synchronization through "reg" event RFC 3680
       Path header support
       Service-Route verification/enforcement
       Dialog statefulness and Record-Route verification/enforcement
       IPSec set-up using CK and IK from AKA
       Integrity-protection for authentication
       Security-Client, Security-Server, Security-Verify header support
       basic P-Charging-Vector support
       Visited-Network-ID header support
       NAT support for signaling
       NAT support for media through RTPProxy

Features of the Open Source IMS I-CSCF:

       Full Cx interface support (LIR, UAR)
       S-CSCF selection based on user capabilities
       Serial forking for forwarding to S-CSCF
       Visited-Network-ID header support and roaming permission verification
       Topology Hiding (THIG)
       Network Domain Security (NDS)

Features of the Open Source IMS S-CSCF:

       Full Cx interface support (MAR, SAR, PPR, RTR)
       Authentication through AKAv1-MD5, AKAv2-MD5 and MD5
       Service-Route header support
       Path header support
       P-Asserted-Identity header support
       Visited-Network-ID header support
       Download of Service-Profile from HSS
       Initial Filter Criteria triggering
       ISC interface routing towards Application Servers
       "reg" event server with access restrictions
       Dialog statefulness
                                         - 10 -


Features of the HSS:

      Support for the 3GPP Cx,Sh,Zh Diameter application
      Integrated simple AuC functionality
      Java Diameter Stack implementation
      Web-based management console
                                           - 11 -


                                       Chapter 3


                                     Methodology


3.1     System Requirements

      Server

         - Linux Ubuntu
         - Space Requirement : 100MB

      Client

         -     Operating System : Windows XP
         -     CPU : Intel Celeron
         -     RAM : 256MB
         -     Space Requirement : 1GB


3.2     Software and Tools used in Project

         -     Java Media Framework (JMF)
         -     Netbean IDE version 6+
         -     JAIN-SIP Library
         -     GCC3/4, make, JDK1.5, ant
         -     MySQL
         -     bison, flex
         -     libxml2 (> 2.6), libmysql - both with development
         -     Linux kernel 2.6


3.3     Program Features
         -     Instant Messenger
         -     Voice Call
         -     File Transfer
                                              - 12 -


         3.4    Program Design




                            Program Status                 Contact List     User Name




Access Voice Call Feature                                                 Access File Transfer Feature




                                                                          Message Box




     Typing Message Box
                                                                          Send Text Message




                                    Figure 3.1 Program Interface
                             - 13 -


3.5   Flow Chart



                              Start




                              Login




                          Authenticate?

               No
                                         Yes


                            Idle State




                          Select Callee




      Instant Messenger    Voice Call          File Transfer




                              Exit?
                No


                                         Yes


                              Stop
                                              - 14 -


                                           Chapter 4


                                   Result and Discussion


4.1 Results on Clients

       In this project, there are many features in our SIP multimedia application. We are
going to bring you through the program feature and flow. We separated the application into 5
sections, which are register, instant messenger, voice call, file transfer, and unregister.


Register
       In order to use the application, you need to register to the IMS server.




       Figure 4.1 Login as Alice                                      Figure 4.2 Login successfully
                                                        - 15 -


         In the application, to login is just simple as this, click and then done. The SIP message
behind this scene are shown below, also their description of SIP message request and
response between Alice and IMS server in registration phase.



>>> REGISTER sip:open-ims.test SIP/2.0
Call-ID: 3e706f7ff8af408f8adcead3123850c9@192.168.1.102
CSeq: 5 REGISTER
From: <sip:alice@open-ims.test>;tag=1000
To: <sip:alice@open-ims.test>
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bK958d1024897cc5056ebc091848fa603b363133
Max-Forwards: 20
Contact: <sip:alice@192.168.1.102:4060>;expires=3600
Content-Length: 0


<<< SIP/2.0 401 Unauthorized - Challenging the UE
Call-ID: 3e706f7ff8af408f8adcead3123850c9@192.168.1.102
CSeq: 5 REGISTER
From: <sip:alice@open-ims.test>;tag=1000
To: <sip:alice@open-ims.test>;tag=617e2da59acf2863733e4dde77fd8703-1aa7
Via: SIP/2.0/UDP 192.168.1.102:4060;rport=4060;branch=z9hG4bK958d1024897cc5056ebc091848fa603b363133
Path: <sip:term@pcscf.open-ims.test:4060;lr>
Service-Route: <sip:orig@scscf.open-ims.test:6060;lr>
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,PUBLISH,MESSAGE,INFO
Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
Warning: 392 192.168.94.128:6060 "Noisy feedback tells:               pid=4120 req_src_ip=192.168.94.128 req_src_port=5060
in_uri=sip:scscf.open-ims.test:6060 out_uri=sip:scscf.open-ims.test:6060 via_cnt==3"
WWW-Authenticate: Digest realm="open-ims.test",nonce="32c16716529cee4411a539936f13304f",algorithm=MD5,qop="auth,auth-
int"
Content-Length: 0


>>> REGISTER sip:open-ims.test SIP/2.0
Call-ID: 3e706f7ff8af408f8adcead3123850c9@192.168.1.102
CSeq: 5 REGISTER
From: <sip:alice@open-ims.test>;tag=1002
To: <sip:alice@open-ims.test>
Via: SIP/2.0/UDP 192.168.1.102:4060
Max-Forwards: 20
Contact: <sip:alice@192.168.1.102:4060>;expires=3600
Expires: 3600
Content-Length: 0
                                                          - 16 -




<<< SIP/2.0 200 OK - SAR succesful and registrar saved
Call-ID: 3e706f7ff8af408f8adcead3123850c9@192.168.1.102
CSeq: 5 REGISTER
From: <sip:alice@open-ims.test>;tag=1002
To: <sip:alice@open-ims.test>;tag=617e2da59acf2863733e4dde77fd8703-45eb
Via: SIP/2.0/UDP 192.168.1.102:4060;rport=4060;branch=z9hG4bK677b8e9c8b0a90bc78d44d8e698cb094363133
P-Associated-URI: <sip:alice@open-ims.test>
Contact: <sip:alice@192.168.1.102:4060>;expires=3600
Path: <sip:term@pcscf.open-ims.test:4060;lr>
Service-Route: <sip:orig@scscf.open-ims.test:6060;lr>
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,PUBLISH,MESSAGE,INFO
P-Charging-Function-Addresses: ccf=pri_ccf_address
Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
Warning: 392 192.168.94.128:6060 "Noisy feedback tells:               pid=4118 req_src_ip=192.168.94.128 req_src_port=5060
in_uri=sip:scscf.open-ims.test:6060 out_uri=sip:scscf.open-ims.test:6060 via_cnt==3"
Content-Length: 0




           Firstly, the application sends the REGISTER request to the IMS server. The reply
 from the IMS server is “Unauthorized - Challenging the UE”, which attached with the nonce,
 in order to prove the identity of the user.
           In this case, the application log in as “Alice”. The nonce response from server is
 encrypted using MD5 hash function. So, we need to gather the information of “Alice”
 including username, password, and replied nonce, to make MD5 hash response to the server
 and re-send the REGISTER request to the IMS server attaching with response.
           After the IMS server receives the correct response from the user, 200 OK response is
 replied to the client, to inform the client that he is authorized to gain access to the server.
                                           - 17 -


Instant Message
       Another feature we would like to present is instant message. This feature use simply
SIP request, which is MESSAGE request to send the message to the receiver.




      Figure 4.3 Typing message                              Figure4.4 Message is sent




                                    Figure 4.5 Bob replies
                                                      - 18 -



   The SIP message behind the message sending are shown below, also their description.



>>> MESSAGE sip:bob@open-ims.test SIP/2.0
Call-ID: 43c891f7f750bd49953a52b843aa4aa9@192.168.1.102
CSeq: 6 MESSAGE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bK9737d39f31229cde18d6d0f069d2d1df323037
Max-Forwards: 20
Content-Type: text/plain/
Route: <sip:orig@open-ims.test:6060;lr>
Content-Length: 12


Hello Bob !!


<<< SIP/2.0 200 OK
Call-ID: 812f208c0ea9c6fca6298ef4581ae371@192.168.1.102
CSeq: 6 MESSAGE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=1005
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bKdfa519a252a4a236e7340a32f41eb5a9343938
P-Asserted-Identity: <sip:bob@open-ims.test>
Content-Length: 0




               Firstly, the application sends the MESSAGE request containing “Hello Bob !!”
   message to bob. To claim that bob has received the message, 200 OK response must be
   replied. The same process is done for bob replied message.
                                               - 19 -


Voice Call


        The voice call is also one of the services in our application. This feature has more
complexity in using SIP. There are several request and response type use in order to establish
the call. Also, the addition protocol, Session Description Protocol (SDP), is used.
        SDP is use cooperative with SIP, to add more ability in negotiate the codec or port
that the client going to use, for transmitting the voice.




  Figure 4.6 [Alice Side] Alice calls bob                   Figure 4.7 [Bob Side] Bob client is ringing
                                                    - 20 -




Figure 4.8 [Alice Side] The call is connected                Figure 4.9 [Bob Side] The call is connected


The SIP message behind the voice call invitation are shown below, also their description.


>>> INVITE sip:bob@open-ims.test SIP/2.0
Call-ID: dcb9f1b7a2caffe354d3fd65ff1fce10@192.168.1.102
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bKd7bedca7891044d6a2d4091696bb38e7393037
Max-Forwards: 20
Content-Type: application/sdp
Route: <sip:orig@open-ims.test:6060;lr>
Contact: <sip:alice@192.168.1.102:4060>
Content-Length: 114


v=0
o=- 3475113557 3475113557 IN IP4 192.168.1.102
s=-
c=IN IP4 192.168.1.102
t=0 0
m=audio 40000 RTP/AVP 3
                                                             - 21 -

<<< SIP/2.0 100 trying -- your call is important to us
Call-ID: dcb9f1b7a2caffe354d3fd65ff1fce10@192.168.1.102
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bKd7bedca7891044d6a2d4091696bb38e7393037
Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
Warning: 392        192.168.94.128:6060    "Noisy feedback    tells:   pid=4118   req_src_ip=192.168.1.102   req_src_port=4060
in_uri=sip:bob@open-ims.test out_uri=sip:bob@192.168.94.128:5062 via_cnt==1"
Content-Length: 0




<<< SIP/2.0 180 Ringing
Record-Route: <sip:mt@pcscf.open-ims.test:4060;lr>,<sip:mt@scscf.open-ims.test:6060;lr>
Call-ID: dcb9f1b7a2caffe354d3fd65ff1fce10@192.168.1.102
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=1006
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bKd7bedca7891044d6a2d4091696bb38e7393037
Contact: <sip:bob@192.168.94.128:5062>
P-Asserted-Identity: <sip:bob@open-ims.test>
Content-Length: 0


<<< SIP/2.0 200 OK
Record-Route: <sip:mt@pcscf.open-ims.test:4060;lr>,<sip:mt@scscf.open-ims.test:6060;lr>
Call-ID: dcb9f1b7a2caffe354d3fd65ff1fce10@192.168.1.102
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=454326
Via: SIP/2.0/UDP 192.168.1.102:4060;branch= z9hG4bKd7bedca7891044d6a2d4091696bb38e7393037
Contact: <sip:bob@192.168.94.128:4060>;expires=3600
Content-Type: application/sdp
P-Asserted-Identity: <sip:bob@open-ims.test>
Content-Length: 108


v=0
o=- 3475203872 3475203872 IN IP4 192.168.94.128
s=-
c=IN IP4 192.168.94.128
t=0 0
m=audio 40000 RTP/AVP 3
                                                       - 22 -

>>> ACK sip:bob@192.168.94.128:4060 SIP/2.0
Call-ID: dcb9f1b7a2caffe354d3fd65ff1fce10@192.168.1.102
CSeq: 3 ACK
Via: SIP/2.0/UDP 192.168.1.102:4060;branch=z9hG4bKd7bedca7891044d6a2d4091696bb38e7393037
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=454326
Max-Forwards: 70
Route: <sip:mt@scscf.open-ims.test:6060;lr>,<sip:mt@pcscf.open-ims.test:4060;lr>
Contact: <sip:alice@192.168.1.102:4060>
Content-Length: 0




         Firstly, Alice sends the INVITE request to Bob. You can observe that in the INVITE
request, there is SDP information including, which contain the information of IP address,
port, and protocol that both client going to use in order to communicate to each other.
In this case, the protocol we selected is RTP and the port is 40000. The codec number 3
means that we use GSM.
         Then, Bob replied 100 TRYING and 180 RINGING to inform Alice that he received
the INVITE request, and now he is considering accepting or rejecting the call.
After a while, bob decided to accept the call. The SIP response, which indicates the
accepting, is 200 OK. As you can observe, in the 200 OK response, it contains SDP package,
which contain the information such as IP address, port, and codec, that Bob is going to use in
the communication.
         The last step, after Alice receives the 200 OK response from Bob, Alice sends ACK
to inform Bob that she received the response, and now communication is begun.


For the call termination, the below pictures and their SIP messages are shown below.
                                                        - 23 -




 Figure 4.10 [Alice Side] The call is terminated                      Figure 4.11 [Bob Side] The call is terminated




>>>>> BYE sip:bob@192.168.94.128:4060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.102:4060
CSeq: 3 BYE
Call-ID: 7e75d82c73ee046d235028558e47d9a9@192.168.1.102
From: <sip:alice@open-ims.test>;tag=1006
To: <sip:bob@open-ims.test>;tag=454326
P-Asserted-Identity: <sip:bob@open-ims.test>
Max-Forwards: 70
Route: <sip:mt@scscf.open-ims.test:6060;lr>,<sip:mt@pcscf.open-ims.test:4060;lr>
Content-Type: application/sdp
Content-Length: 114
                                               - 24 -




File Transfer

       The last feature that we would like to present is file transfer. This feature has similar
process in using SIP to voice call. Of course, the addition protocol, Session Description
Protocol (SDP), is used.




                                 Figure 4.12 Alice selects the file to transmit
                                    - 25 -




Figure 4.13 [Alice Side] Sending             Figure 4.14 [Bob Side] Receiving




Figure 4.15 [Alice Side] Finished            Figure 4.16 [Bob Side] Finished
                                                           - 26 -



      The SIP message behind the voice call invitation are shown below, also their description.


>>> INVITE sip:bob@open-ims.test SIP/2.0
Call-ID: aaabdc67c4db6a8edee67678526cc934@10.55.3.84
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>
Via: SIP/2.0/UDP 10.55.3.84:4060;branch=z9hG4bK63e15b28591c7b2ea2b811681c2fcdae3738
Max-Forwards: 20
Content-Type: application/sdp
Route: <sip:orig@open-ims.test:6060;lr>
Contact: <sip:alice@10.55.3.84:4060>
Content-Length: 126


v=0
o=- 3475206163 3475206163 IN IP4 10.55.3.84
s=Einstein-Relativity.pdf
c=IN IP4 10.55.3.84
t=0 0
m=file 13267 TCP 38


<<< SIP/2.0 100 trying -- your call is important to us
Call-ID: aaabdc67c4db6a8edee67678526cc934@10.55.3.84
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>
Via: SIP/2.0/UDP 10.55.3.84:4060;branch=z9hG4bK63e15b28591c7b2ea2b811681c2fcdae3738
Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
Warning: 392 10.55.3.37:6060 "Noisy feedback tells: pid=4731 req_src_ip=10.55.3.84 req_src_port=4060 in_uri=sip:bob@open-
ims.test out_uri=sip:bob@10.55.3.29:4060 via_cnt==1"
Content-Length: 0
                                                           - 27 -




<<< SIP/2.0 200 OK
Record-Route: <sip:mt@pcscf.open-ims.test:4060;lr>,<sip:mt@scscf.open-ims.test:6060;lr>
Call-ID: aaabdc67c4db6a8edee67678526cc934@10.55.3.84
CSeq: 3 INVITE
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=454326
Via: SIP/2.0/UDP 10.55.3.84:4060;branch=z9hG4bK63e15b28591c7b2ea2b811681c2fcdae3738
Contact: <sip:bob@10.55.3.29:4060>;expires=3600
Content-Type: application/sdp
P-Asserted-Identity: <sip:bob@open-ims.test>
Content-Length: 108


v=0
o=- 3475206163 3475206163 IN IP4 10.55.3.29
s=-
c=IN IP4 10.55.3.29
t=0 0
m=audio 40000 RTP/AVP 3


>>> ACK sip:bob@10.55.3.29:4060 SIP/2.0
Call-ID: aaabdc67c4db6a8edee67678526cc934@10.55.3.84
CSeq: 3 ACK
Via: SIP/2.0/UDP 10.55.3.84:4060;branch=z9hG4bKe8a7b6820cd5d6aa1a0ab87341a3319e3738
From: <sip:alice@open-ims.test>;tag=1004
To: <sip:bob@open-ims.test>;tag=454326
Max-Forwards: 70
Route: <sip:mt@scscf.open-ims.test:6060;lr>,<sip:mt@pcscf.open-ims.test:4060;lr>
Contact: <sip:alice@10.55.3.84:4060>
Content-Length: 0




              Firstly, Alice sends the INVITE request to Bob. You can observe that in the INVITE
      request, there is SDP information including, which contain the information of IP address,
      port, and protocol that both client going to use in order to communicate to each other.
              In this case, the protocol we selected is TCP and the port is 13267. After a while, Bob
      replies 200 OK response including SDP message to Alice. ACK request is sent from Alice to
      inform Bob that she received the 200 OK response. After the file transfer is done, the
      application notice that the file transfer is finished.
                                             - 28 -


4.2 Results on Server


P-CSCF


Alice (10.55.3.84) and Bob (10.55.3.29) register to server




                              Figure 4.17 P-CSCF Registration


Instant Message from Alice to Bob




                         Figure 4.18 P-CSCF Instant Message
                                               - 29 -


Voice Call from Alice to Bob




                                Figure 4.19 P-CSCF Voice Call


File Transfer from Alice to B




                                Figure 4.20 P-CSCF File Transfer
                                             - 30 -


S-CSCF


Alice (10.55.3.84) and Bob (10.55.3.29) register to server




                              Figure 4.21 S-CSCF Registration


Instant Message from Bob to Alice




                              Figure 4.22 S-CSCF Instant Message
                                              - 31 -


Voice Call from Alice to Bob




                               Figure 4.23 S-CSCF Voice Call
                                              - 32 -




                                          Chapter 5


                                         Conclusion




       According to the project proposal, our project is done successfully. We would like to
separate our project into 2 parts, which are server and client.


Server
       We have successfully installed Open IMS server on Linux Ubuntu. There are three
type of server core, which are P-CSCF, I-CSCF, and S-CSCF. All the server cores can work
cooperatively and produce efficient IMS server to the user.


Client
       There are four features designed in our application, which are register, voice call,
instant messenger, and file transfer. All functions are worked successfully.
       The user can begin to experience all the multimedia services that we provide on our
application by register to the IMS server. The user needs to register to the IMS server to gain
benefit of using IMS, as such; you can contact to the people in your contact list without
knowing their IP address.
       For instant messenger, user will experience the fast and reliable message sending, via
our application. Since, we use SIP to create this service, as we know, SIP is reliable and
worldwide. For voice call, user will experience low delay voice communication, since we use
RTP, which cooperative with SIP, to provide the voice call service. Finally, file transfer
service is also provided. We use SIP and TCP to provide this service.
       In conclusion, our project consists of 2 parts, which are server and client. Both server
and client provide efficient service to the user. User can gain new experience of using
multimedia system, which entirely using Session Initiation Protocol.
                                    - 33 -


                                    Reference


Cited documents in the previous work are listed below.

1. Session Initiation Protocol,
   http://en.wikipedia.org/wiki/Session_Initiation_Protocol [5/7/09]

2. SIP for VoIP: http://www.mind-tek.net/sip.php [15/7/09]

3. IMS System Work Flow,
   http://www.fokus.fraunhofer.de/en/fokus_testbeds/open_ims_playground/compon
   ents/osims/index.html [7/7/09]

4. IMS System Concept, http://en.wikipedia.org/wiki/IP_Multimedia_Subsystem
   [9/7/09]

5. Open Source implementation of IMS Call Session Control Functions,
   http://www.openimscore.org/ [15/8/09]

6. The FOKUS Open Source IMS Core:
   http://www.fokus.fraunhofer.de/en/fokus_testbeds/open_ims_playground/compon
   ents/osims/index.html [15/8/09]
                                           - 34 -


                               Appendix A – IMS Installation


       (Install Tips: For Ubuntu Linux) In terminal, type sudo apt-get install and follow by

             - subversion
             - ant
             - sun-java6-jdk
             - bison
             - flex
             - mysql-server
             - libmysqlclient15-dev
             - libxml2
             - libxml2-dev
             - bind


1. Get the Source Code

       Checkout the CSCFs
   -   mkdir ser_ims
   -   svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_ims

       Checkout the HSS
   -   mkdir FHoSS
   -   svn checkout http://svn.berlios.de/svnroot/repos/openimscore/FHoSS/trunk FHoSS

2. Compile the Source Code

       Compile the CSCFs
   -   cd ser_ims
   -   make install-libs all

   Compile the HSS

   -   cd FHoSS
   -   ant compile
   -   ant deploy
                                            - 35 -


3. Configure the environment

   Set up JAVA HOME environment
   After install Java(JRE & JDK), modify the file: profile

   -   vim /etc/profile

       export JAVA_HOME=/usr/lib/jvm/java-1.X.X-sun
       export
       CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/to
       ols.jar
       export PATH=$JAVA_HOME/bin:$PATH

   Set up MySQL

       Type the MySQL comands:
       mysql -u root -p -h localhost < ser_ims/cfg/icscf.sql
       mysql -u root -p -h localhost < FHoSS/scripts/hss_db.sql
       mysql -u root -p -h localhost < FHoSS/scripts/userdata.sql

   Set up DNS

   1.) Edit /etc/bind/named.conf by adding following zone in it:

       zone "open-ims.test" {
       type master;
       file "/etc/bind/open-ims.dnszone";
       };


   2.) Copy open-ims.dnszone file to /etc/bind/

       sudo cp ser_ims/cfg/open-ims.dnszone etc/bind/

   3.) Edit /etc/resolv.conf

       # Generated by NetworkManager
       search open-ims.test
       domain open-ims.test
       nameserver Server IP Address

   4.) Edit etc/hosts

       127.0.0.1 localhost
       Server IP Address your-laptop
       Server IP Address open-ims.test mobicents.open-ims.test ue.open-ims.test
       presence.open-ims.test icscf.open-ims.test scscf.open-ims.test
       pcscf.open- ims.test hss.open-ims.test
                                            - 36 -



5.) Switching from localhost to Server IP address by replacing all 127.0.0.1 with your Server
    IP Address.
    (eg: 192.168.1.186)

   /etc/bind/open-ims.test

   Change CSCFs setting:

icscf.cfg

# Interrogating - CSCF configuration script
# ----------- global configuration parameters ------------------------

debug=3
log_stderror=yes
memlog=5
sip_warning=yes

fork=yes
children=4

listen=192.168.1.186
port=5060
alias="icscf.open-ims.test"
alias="open-ims.test"

check_via=no          # (cmd. line: -v)
dns=no                      # (cmd. line: -r)
rev_dns=no            # (cmd. line: -R)

# ------------------ module loading ----------------------------------

# Uncomment this if you want to use SQL database
loadmodule "/opt/OpenIMSCore/ser_ims/modules/mysql/mysql.so"
loadmodule "/opt/OpenIMSCore/ser_ims/modules/sl/sl.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/tm/tm.so"
modparam("tm", "fr_timer", 10000)

loadmodule "/opt/OpenIMSCore/ser_ims/modules/rr/rr.so"
loadmodule "/opt/OpenIMSCore/ser_ims/modules/maxfwd/maxfwd.so"
loadmodule "/opt/OpenIMSCore/ser_ims/modules/textops/textops.so"


loadmodule "/opt/OpenIMSCore/ser_ims/modules/icscf/icscf.so"
modparam("icscf","name","icscf.open-ims.test")

modparam("icscf","db_url","mysql://icscf:heslo@localhost/icscf")
modparam("icscf","db_nds_table","nds_trusted_domains")
modparam("icscf","db_scscf_table","s_cscf")
modparam("icscf","db_capabilities_table","s_cscf_capabilities")

# Comment the following line to enable realm routing
modparam("icscf","forced_hss_peer","hss.open-ims.test")
                                    - 37 -

modparam("icscf","hash_size",128)

modparam("icscf","icid_value_prefix","I-CSCFabcd")
modparam("icscf","icid_gen_addr","192.168.1.186")
modparam("icscf","orig_ioi","open-ims.test")
modparam("icscf","term_ioi","open-ims.test")

modparam("icscf","route_on_term_user_unknown","lir_term_user_unknown")

loadmodule "/opt/OpenIMSCore/ser_ims/modules/enum/enum.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/cdp/cdp.so"
modparam("cdp","config_file","/opt/OpenIMSCore/icscf.xml")


# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

# -------------------------   request routing logic -------------------

# main routing logic

route{

      route(Sanity_Checks);

      #route(NDS);

      if (method=="REGISTER"){
            route(REGISTER);
            break;
      }

      #If there is a Route header we try to do loose route
      if (search("^Route:")){
            # subsequent messages within a dialog should take the
            # path determined by record-routing
            if (loose_route()) {
                  # mark routing logic in request
                  append_hf("P-hint: I-CSCF rr-enforced\r\n");
                  if (!t_relay()){
                        sl_reply_error();
                        break;
                  }
                  break;
            }
      }

      if (method=="INVITE" || method=="SUBSCRIBE" || method=="MESSAGE" ||
          method=="INFO" || method=="PUBLISH" || method=="CANCEL"){
            route(Initial_Request);
            break;
      }else{
            # Shouldn't get here unless missconfigured (add more methods as
initial) or
            # somebody is routing here unknown messages
            if ( !t_newtran()) {
                  sl_reply_error();
                                   - 38 -

                  break;
            };
            append_to_reply("Allow:
INVITE,SUBSCRIBE,MESSAGE,INFO,PUBLISH,CANCEL\r\n");
            t_reply("406","Initial Request Method not allowed at the I-
CSCF");
            break;
      }
}


route[Sanity_Checks]
{
      # initial sanity checks -- messages with
      # max_forwards==0, or excessively long requests
      if (!mf_process_maxfwd_header("10")) {
            sl_send_reply("483","Too Many Hops");
            exit;
      };

      if (msg:len >= max_len ) {
            sl_send_reply("513", "Message too big");
            exit;
      };

      if(@hf_value.max_forwards=="0"){

            exit;
      }
}

route[NDS]
{
      if (!I_NDS_is_trusted()){
            log(-1,"Received message from NDS untrusted domain!\n");
            if (method=="REGISTER"){
                  sl_send_reply("403","Forbidden - Network Domain Security
doesn't trust traffic from source domain");
                  break;
            }
            I_NDS_strip_headers();
      }
}

route[REGISTER]
{
      # first, don't repeat a succesful UAR
      if (I_trans_in_processing())
            break;

      # I_UAR("0") means UAR_REGISTRATION/DEREGISTRATION
      # I_UAR("1") means UAR_REGISTRATION_AND_CAPABILITIES
      if (I_UAR("0")){
            if (I_scscf_select("0")) {
                  t_on_reply("REGISTER_reply");
                  t_on_failure("REGISTER_failure");
                  if (!t_relay()) {
                        if ( !t_newtran()) {
                              sl_reply_error();
                                   - 39 -

                              break;
                        };
                        t_reply("500","Error forwarding towards S-CSCF");
                        break;
                  }
                  break;
            }else{
                  I_scscf_drop();
                  if ( !t_newtran()) {
                        sl_reply_error();
                        break;
                  };
                  t_reply("500", "Server error on UAR select S-CSCF");
                  break;
            }
      }else{
            if ( !t_newtran()) {
                  sl_reply_error();
                  break;
            };
            t_reply("500", "Server error on UAR");
            break;
      }
}

onreply_route[REGISTER_reply]
{
      if (!t_check_status("(408)|(480)")){
            I_scscf_drop();
      }
}

failure_route[REGISTER_failure]
{
      if (t_check_status("(408)|(480)")){
            #log(-1,"Got a failure for REGISTER!!!\n");
            if (I_scscf_select("1")) {
                  t_on_reply("REGISTER_reply");
                  t_on_failure("REGISTER_failure");
                  if (!t_relay()) {
                        t_reply("500","Error forwarding towards next S-
CSCF");
                        break;
                  }
                  break;
            }else{
                  t_reply("500", "Server error on UAR select next S-CSCF");
                  break;
            }
      }else{
            I_scscf_drop();
      }
}


route[Initial_Request]
{
      # first, don't repeat a succesful LIR
      if (I_trans_in_processing())
                                   - 40 -

            break;

      if (I_LIR()){
            if (I_scscf_select("0")) {
                  t_on_reply("Initial_Request_reply");
                  t_on_failure("Initial_Request_failure");
                  if (!t_relay()) {
                        if ( !t_newtran()) {
                              sl_reply_error();
                              break;
                        };
                        t_reply("500","Error forwarding towards S-CSCF");
                        break;
                  }
                  break;
            }else{
                  I_scscf_drop();
                  if ( !t_newtran()) {
                        sl_reply_error();
                        break;
                  };
                  t_reply("500", "Server error on LIR select S-CSCF");
                  break;
            }
      }else{
            if ( !t_newtran()) {
                  sl_reply_error();
                  break;
            };
            t_reply("500", "Server error on LIR");
            break;
      }
}

onreply_route[Initial_Request_reply]
{
      if (!t_check_status("(408)|(480)")){
            I_scscf_drop();
      }
}

failure_route[Initial_Request_failure]
{
      if (t_check_status("(408)|(480)")){
            #log(-1,"Got a failure for Initial Request!!\n");
            if (I_scscf_select("1")) {
                  t_on_reply("Initial_Request_reply");
                  t_on_failure("Initial_Request_failure");
                  if (!t_relay()) {
                        t_reply("500","Error forwarding towards next S-
CSCF");
                        break;
                  }
                  break;
            }else{
                  t_reply("500", "Server error on LIR select next S-CSCF");
                  break;
            }
      }else{
                                   - 41 -

            I_scscf_drop();
      }
}

onreply_route[PSTN_reply]
{
      log(1,">>       PSTN_reply\n");
}


route[PSTN]
{
      t_on_reply("PSTN_reply");
      t_relay_to_udp("192.168.1.186", "9060");
      exit;
}

route[lir_term_user_unknown]
{
    if (uri=~"tel:.*") {
        # not an existing tel identity in our domain
        # maybe it should go to PSTN... maybe to another IMS domain...
query ENUM!
        if(!enum_query()){
                route(PSTN);
                exit;
        }
            if ( ! uri=~".*@open-ims\.test.*") { # ENUM resolved to another
domain
            t_on_reply("Initial_Request_reply");
                  t_on_failure("Initial_Request_failure");
                  if (!t_relay()) {
                        t_reply("500","Error forwarding to external
domain");
                        exit;
                  };
                  exit;
            } else {
                  if ( !t_newtran()) {
                        sl_reply_error();
                        exit;
                  };
                  t_reply("604","Does not exist anywhere - HSS User
Unknown");
                  exit;
            };
      } else {
            if ( uri=~".*@open-ims\.test.*") { # we received a request for
our domain (non-tel), but HSS said "User Unknown"
                  if ( !t_newtran()) {
                        sl_reply_error();
                        exit;
                  };
                  t_reply("604","Does not exist anywhere - HSS User
Unknown");
                  exit;
            } else {
                  # try to forward non-tel request to other domain
                  t_on_reply("Initial_Request_reply");
                                    - 42 -

                   t_on_failure("Initial_Request_failure");
                   if (!t_relay()) {
                         t_reply("500","Error forwarding to external
domain");
                           exit;
                   };
                   exit;
            };
       };
}



icscf.xml

<?xml version="1.0" encoding="UTF-8"?>
<DiameterPeer
      FQDN="icscf.open-ims.test"
      Realm="open-ims.test"
      Vendor_Id="10415"
      Product_Name="CDiameterPeer"
      AcceptUnknownPeers="1"
      DropUnknownOnDisconnect="1"
      Tc="30"
      Workers="4"
      QueueLength="8">
      <Peer FQDN="hss.open-ims.test" Realm="open-ims.test" port="3868"/>

       <Acceptor port="3869" bind="192.168.1.186"/>

       <Auth id="16777216" vendor="10415"/><!-- 3GPP Cx -->
       <Auth id="16777216" vendor="4491"/><!-- CableLabs Cx -->
       <Auth id="16777216" vendor="13019"/><!-- ETSI/TISPAN Cx -->

       <DefaultRoute FQDN="hss.open-ims.test" metric="10"/>

<!-- Realm Routing configuration - Uncomment and Edit!

       <Realm name="open-ims.test">
             <Route FQDN="hss1.open-ims.test" metric="10"/>
             <Route FQDN="hss2.open-ims.test" metric="20"/>
       </Realm>
       <Realm name="another.open-ims.test">
             <Route FQDN="hss3.open-ims.test" metric="10"/>
             <Route FQDN="hss2.open-ims.test" metric="20"/>
       </Realm>
       <DefaultRoute FQDN="hss.open-ims.test" metric="10"/>
       <DefaultRoute FQDN="hss4.open-ims.test" metric="20"/>

-->

</DiameterPeer>
                                     - 43 -


pcscf.cfg

# Proxy - CSCF configuration script
# ----------- global configuration parameters ------------------------

debug=3
log_stderror=yes
memlog=5
sip_warning=yes

fork=yes
children=4


listen=192.168.1.186
port=4060

# Uncomment here to enable TLS!
#listen=tls:127.0.0.1
#tls_port_no=4061
#enable_tls=yes

alias="pcscf.open-ims.test":4060

check_via=no              # (cmd. line: -v)
dns=no                    # (cmd. line: -r)
rev_dns=no          # (cmd. line: -R)

# ------------------ module loading ----------------------------------


loadmodule   "/opt/OpenIMSCore/ser_ims/modules/sl/sl.so"
loadmodule   "/opt/OpenIMSCore/ser_ims/modules/tm/tm.so"
loadmodule   "/opt/OpenIMSCore/ser_ims/modules/dialog/dialog.so"
loadmodule   "/opt/OpenIMSCore/ser_ims/modules/rr/rr.so"
loadmodule   "/opt/OpenIMSCore/ser_ims/modules/maxfwd/maxfwd.so"
loadmodule   "/opt/OpenIMSCore/ser_ims/modules/textops/textops.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/pcscf/pcscf.so"

modparam("pcscf","name","sip:pcscf.open-ims.test:4060")

modparam("pcscf","registrar_hash_size",256)
modparam("pcscf","reginfo_dtd","/opt/OpenIMSCore/ser_ims/modules/pcscf/regi
nfo.dtd")

modparam("pcscf","subscriptions_hash_size",256)

modparam("pcscf","dialogs_hash_size",256)
modparam("pcscf","dialogs_expiration_time",3600)
modparam("pcscf","dialogs_enable_release",1)
modparam("pcscf","max_dialog_count",20000)
modparam("pcscf","min_se",90)

modparam("pcscf","use_ipsec",1)
modparam("pcscf","ipsec_host","192.168.1.186")
modparam("pcscf","ipsec_port_c",4060)
modparam("pcscf","ipsec_port_s",4060)
                                     - 44 -


# Comment here to enable TLS!
modparam("pcscf","use_tls",0)
# Uncomment here to enable TLS!
#modparam("pcscf","use_tls",1)
#modparam("pcscf","tls_port",4061)

modparam("pcscf","ipsec_P_Inc_Req","/opt/OpenIMSCore/ser_ims/modules/pcscf/
ipsec_P_Inc_Req.sh")
modparam("pcscf","ipsec_P_Out_Rpl","/opt/OpenIMSCore/ser_ims/modules/pcscf/
ipsec_P_Out_Rpl.sh")
modparam("pcscf","ipsec_P_Out_Req","/opt/OpenIMSCore/ser_ims/modules/pcscf/
ipsec_P_Out_Req.sh")
modparam("pcscf","ipsec_P_Inc_Rpl","/opt/OpenIMSCore/ser_ims/modules/pcscf/
ipsec_P_Inc_Rpl.sh")
modparam("pcscf","ipsec_P_Drop","/opt/OpenIMSCore/ser_ims/modules/pcscf/ips
ec_P_Drop.sh")

modparam("pcscf","NAT_enable", 1)
modparam("pcscf","ping", 1)
modparam("pcscf","ping_all", 0)
modparam("pcscf","nat_detection_type", 0x17)
modparam("pcscf","rtpproxy_socket", "udp:192.168.1.186:34999")
modparam("pcscf","rtpproxy_enable", 0)
modparam("pcscf","rtpproxy_disable_tout", 60)
modparam("pcscf","rtpproxy_retr", 5)
modparam("pcscf","rtpproxy_tout", 1)


modparam("pcscf","subscribe_retries", 1)

modparam("pcscf","assert_fallback", 0)

modparam("pcscf","icid_value_prefix","P-CSCFabcd")
modparam("pcscf","icid_gen_addr","192.168.1.186")
modparam("pcscf","orig_ioi","open-ims.test")
modparam("pcscf","term_ioi","open-ims.test")

# persistency_mode - 0 None / 1 Files / 2 Databases
modparam("pcscf","persistency_mode",0)

#modparam("pcscf","persistency_mode",1)
#modparam("pcscf","persistency_location","/opt/OpenIMSCore/persistency")
#modparam("pcscf","persistency_timer_dialogs",60)
#modparam("pcscf","persistency_timer_registrar",60)
#modparam("pcscf","persistency_timer_subscriptions",60)


# e2 Interface configuration (NASS-Bundled Authentication)
#modparam("pcscf","forced_clf_peer","clf.open-ims.test")
modparam("pcscf","use_e2",0)

# Uncomment here to enable the e2 interface (NASS-Bundled Authentication)
#loadmodule "/opt/OpenIMSCore/ser_ims/modules/cdp/cdp.so"
#modparam("cdp", "config_file", "/opt/OpenIMSCore/pcscf.xml")


# -- rr params --
# add value to ;lr param to make some broken UAs happy
                                        - 45 -

modparam("rr", "enable_full_lr", 1)

# Uncomment here to enable TLS!
#loadmodule "/opt/OpenIMSCore/ser_ims/modules/tls/tls.so"

#modparam("tls", "tls_method", "TLSv1")
#modparam("tls", "private_key",
"/opt/OpenIMSCore/PCSCF_CA/pcscf_private_key.pem")
#modparam("tls", "certificate", "/opt/OpenIMSCore/PCSCF_CA/pcscf_cert.pem")
#modparam("tls", "ca_list", "/opt/OpenIMSCore/PCSCF_CA/pcscf_ca_list.pem")
#modparam("tls", "verify_certificate", 1)
#modparam("tls", "require_certificate", 0)
#modparam("tls", "tls_disable_compression", 1)

#set the emergency support: 0 for disable and 1 for enable
modparam("pcscf","emerg_support",1)
modparam("pcscf","ecscf_uri", "sip:ecscf.open-ims.test:7060")

# -------------------------     request routing logic -------------------

# main routing logic

route{

        route(Sanity_Checks);

        force_rport();

        # Early-IMS checks
        if (!P_check_via_sent_by()){
              P_add_via_received();
        }

        if (method=="REGISTER") {
              route(REGISTER);
              break;
        }
#   Only allow REGISTER as unprotected message
#       else {
#             if (!P_is_integrity_protected()){
#                   append_to_reply("Proxy-Require: sec-agree\r\n");
#                   sl_send_reply("494","Security Agreement Required");
#                   exit;
#             }
#       }

        if (method=="NOTIFY"&&uri==myself){
              route(NOTIFY);
              break;
        }

        if (!P_mobile_terminating()){

              # Request Initiated by the UE


              if (P_is_in_dialog("orig")){
                    if (method!="CANCEL") route(Orig_Subsequent);
                    else route(Orig_Standalone);
                                   - 46 -

                  break;
            }

            if (P_is_in_dialog("term")){
                  if (method!="CANCEL") route(Term_Subsequent);
                  else route(Orig_Standalone);
                  break;
            }

            # No dialog yet - ACK not relayed as hop-to-hop
            if (method=="ACK"){
                  t_release();
                  break;
            }else
            if (method=="INVITE" || method=="SUBSCRIBE"){
                  route(Orig_Initial);
                  break;
            }else{
                  if (method=="UPDATE"){
                        sl_send_reply("403","Forbidden - Target refresh
outside dialog not allowed");
                        break;
                  }
                  if (method=="BYE" || method=="PRACK"){
                        sl_send_reply("403","Forbidden - Originating
subsequent requests outside dialog not allowed");
                        break;
                  }
                  route(Orig_Standalone);
                  break;
            }

      }else{

            # TODO - check if this does come from an UE and that UE is
unregistered

            # Request Terminated by the UE

            if (!P_is_in_dialog("term") &&
                  (method=="INVITE" || method=="SUBSCRIBE")){
                  route(Term_Initial);
                  break;
            } else {
                  if (P_is_in_dialog("term")){
                        if (method!="CANCEL") route(Term_Subsequent);
                        else route(Term_Standalone);
                        break;
                  }else{
                        if (method==UPDATE){
                              sl_send_reply("403","Forbidden - Target
refresh outside dialog not allowed");
                              break;
                        }
                        if (method=="BYE" || method=="ACK" ||
method=="PRACK"){
                              sl_send_reply("403","Forbidden - Terminating
subsequent requests outside dialog not allowed");
                              break;
                                   - 47 -

                        }
                        route(Term_Standalone);
                        break;
                  }
            }
            break;
      }

}

route[Sanity_Checks]
{
      # initial sanity checks -- messages with
      # max_forwards==0, or excessively long requests
      if (!mf_process_maxfwd_header("10")) {
            sl_send_reply("483","Too Many Hops");
            exit;
      };

      if (msg:len >= max_len ) {
            sl_send_reply("513", "Message too big");
            exit;
      };

      if(@hf_value.max_forwards=="0"){

            exit;
      }
}

route[Check_Session_Expires]
{
      if (!P_check_session_expires())       {
            P_422_session_expires();
            exit;
      };
}


route[REGISTER_494]
{
      append_to_reply("Proxy-Require: sec-agree\r\n");
      t_reply("494","Security Agreement Required");
}

route[REGISTER]
{
    t_newtran();

      if(P_emergency_flag()){
            log(1, ">> emergency flag in REGISTER\n");
            if(!P_emergency_serv_enabled()){
                  P_380_em_alternative_serv("no Emergency Services support
at this PCSCF");
                  t_reply("380", "Alternative Services");
                  exit;
            }
    }
                                   - 48 -

      if (!P_verify_security()) {
            route(REGISTER_494);
            break;
      };
      if (!P_is_integrity_protected()){
            #Variant 1 - accept also non IPSec clients
            P_remove_security_client();

            #Variant 2 - accept only IPSec clients
            #if (!P_remove_security_client()){
            #     route(REGISTER_494);
            #     break;
            #}
            P_add_integrity_protected("no");
      }else{
            if (!P_remove_security_verify()||!P_remove_security_client()){
                  route(REGISTER_494);
                  break;
            }
            P_add_integrity_protected("yes");
      };

      P_remove_header_tag("Require","sec-agree");
      P_remove_header_tag("Proxy-Require","sec-agree");
      P_remove_security_verify();
      P_add_path();
      P_add_require();
      P_add_p_charging_vector();
      P_add_p_visited_network_id("open-ims.test");

      # trigger the UDR on the e2 interface (NASS-Bundled Authentication)
      P_access_network_info("open-ims.test");

      t_on_reply("REGISTER_reply");
      t_on_failure("REGISTER_failure");

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding to Home Domain");
            break;
      };
}

onreply_route[REGISTER_reply]
{
      #log(-1,"Got a response for REGISTER!!!\n");
      if (t_check_status("401")){
            if (!P_remove_ck_ik()){
#                 t_reply("500","P-CSCF Error on hiding CK, IK");
                  break;
            }
            P_security_401();
      }
      if (t_check_status("200")){
            if (!P_save_location()){
#                 t_reply("500","P-CSCF Error on saving location");
                  break;
            }
            P_security_200();
            P_subscribe();
                                   - 49 -

      }
      if (!P_security_relay())
            P_NAT_relay();
      exit;
}

failure_route[REGISTER_failure]
{
      #log(-1,"Got a failure for REGISTER!!!\n");
      if (t_check_status("408"))
            t_reply("504","Server Time-Out");
}




route[NOTIFY]
{
      if ( !t_newtran()) {
            sl_reply_error();
            break;
      }
      if (P_process_notification()) {
            t_reply("200","OK - P-CSCF processed notification");
            break;
      }else{
            t_reply("500","Error encountered while processing
notification");
            break;
      }
}

#######                  ORIGINATING


route[Orig_Initial]
{
      log(1,">>       Orig_Initial\n");
      if (P_emergency_ruri()){
            route(Orig_Initial_Emergency);
            break;
      }

      if (!P_is_registered()){
              sl_send_reply("403","Forbidden - Not Registered! You must
register first with a S-CSCF");
              break;
      };
      if (!P_assert_identity()){
              sl_send_reply("403","Forbidden - You must register first with
a S-CSCF");
              break;
      };
      # add IBCF/THIG route here if required
      loose_route();
      if (!P_follows_service_routes()){
            #Variant 1 - deny access to the network
            sl_send_reply("400","Bad Request - Not following indicated
Service-Routes");
                                      - 50 -

            break;
            #Variant 2 - enforce routes and let the dialog continue
            #P_enforce_service_routes();
      }

      P_record_route("orig");

      P_remove_header_tag("Require","sec-agree");
    P_remove_header_tag("Proxy-Require","sec-agree");
    P_remove_security_verify();

      P_add_p_charging_vector();

      route(Check_Session_Expires);

      if (!P_save_dialog("orig")){
            sl_send_reply("514","Originating dialog save failure - P-CSCF
maximum dialog count reached!");
            exit;
      }

      if (method=="INVITE"){
            P_SDP_manipulate();
      }

      t_on_reply("Orig_Initial_reply");
      #t_on_failure("Orig_Initial_failure");
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding originating initial
request");
            P_drop_dialog("orig");
            break;
      };
}

route[Orig_Initial_Emergency]
{
      log(1,">>       Emergency Call\n");
      if(!P_emergency_serv_enabled()){
            log(1, ">> this P-CSCF has no Emergency Services enabled");
            t_reply("380", "Alternative Services");
            exit;
      }
      #loose_route();
      #select and enforce a route to an ECSCF
      if(!P_enforce_sos_routes()){
              sl_send_reply("503","Internal Error, could not select an
ECSCF");
              exit;
      }

      if (P_is_anonymous_identity()){
            log(1,">> Anonymous caller! sending it to E-CSCF\n");
      }else{
            if (!P_is_registered()){
                    sl_send_reply("403","Forbidden - Not Registered! You
must first do an Emergency registration");
                  exit;
            };
                                      - 51 -


            if (!P_assert_identity()){
                    sl_send_reply("403","Forbidden - You must register
first with a S-CSCF or use an Anonymous Identity for Emergency");
                    exit;
            };
            log(1,">> Registered caller! sending it to E-CSCF\n");
      }

      P_record_route("orig");

      P_remove_header_tag("Require","sec-agree");
    P_remove_header_tag("Proxy-Require","sec-agree");
    P_remove_security_verify();

      P_add_p_charging_vector();

      route(Check_Session_Expires);

      if (!P_save_dialog("orig")){
            sl_send_reply("514","Originating dialog save failure - P-CSCF
maximum dialog count reached!");
            exit;
      }

      # NAT + emergency is disabled because P_SDP_manipulate() does not
support yet multi-part bodies
      #if (method=="INVITE"){
      #     P_SDP_manipulate();
      #}

      t_on_reply("Orig_Initial_reply");
      #t_on_failure("Orig_Initial_failure");

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding originating initial
request");
            P_drop_dialog("orig");
            break;
      };

}

onreply_route[Orig_Initial_reply]
{
      log(1,">>       Orig_Initial_reply\n");
      if (t_check_status("(180)|(183)|([2-9]..)")){
            P_SDP_manipulate();
      }
      if (!t_check_status("(408)|(480)")){
            P_update_dialog("orig");
      }else{
            P_drop_dialog("orig");
      }
      if (!P_security_relay())
            P_NAT_relay();
      break;
}
                                      - 52 -

failure_route[Orig_Initial_failure]
{
      log(1,">>       Orig_Initial_failure\n");
      if (t_check_status("(408)|(480)")){
            P_drop_dialog("orig");
            break;
      }
      #if (method=="INVITE")
      #     P_drop_session();
      #P_drop_dialog();
      break;
}


route[Orig_Subsequent]
{
      log(1,">>       Orig_Subsequent\n");
      if (P_is_registered()){
            if (!P_assert_identity()){
                    sl_send_reply("403","Forbidden - You must register
first with a S-CSCF");
                break;
            };
      }
#     else{
            # let it continue as this probably does not come from an UE
        #sl_send_reply("403","Forbidden - Not Registered! You must register
first with a S-CSCF");
        #break;

#     }

      loose_route();

      if (method!="CANCEL" && !P_follows_dialog_routes("orig")){
            log(1,">>       Orig_Subsequent: Request not following
indicated dialog routes\n");
            #Variant 1 - deny access to the network
            if (method!=ACK){
                sl_send_reply("400","Bad Request - Not following indicated
dialog routes");
            } else{
                  log(1,">>   Orig_Subsequent: ACK not following dialog
routes discarded silently!!!\n");
            }
            break;
            #Variant 2 - enforce routes and let the dialog continue
            #P_enforce_dialog_routes("term");
            #break;
      }

      #P_record_route("orig");

      route(Check_Session_Expires);

      P_update_dialog("orig");

      if (method=="ACK" || method=="BYE"){
            P_SDP_manipulate();
                                   - 53 -

      }

      P_remove_header_tag("Require","sec-agree");
        P_remove_header_tag("Proxy-Require","sec-agree");
        P_remove_security_verify();

      # reply routes unused as empty at the moment
      t_on_reply("Orig_Subsequent_reply");
      #t_on_failure("Orig_Subsequent_failure");

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding originating subsequent
request");
            break;
      };
}

onreply_route[Orig_Subsequent_reply]
{
      log(1,">>       Orig_Subsequent_reply\n");
      if (t_check_status("[1-2]..")){
            P_update_dialog("orig");
            #     P_replace_contact();???
      }
      if (!P_security_relay())
                  P_NAT_relay();
      break;
}

failure_route[Orig_Subsequent_failure]
{
      log(1,">>       Orig_Subsequent_failure\n");
      break;
}


route[Orig_Standalone]
{
      log(1,">>       Orig_Standalone\n");
      if (!P_is_registered()){
              sl_send_reply("403","Forbidden - Not Registered! You must
register first with a S-CSCF");
              break;
      };
      if (!P_assert_identity()){
              sl_send_reply("403","Forbidden - You must register first with
a S-CSCF");
              break;
      };

      loose_route();

      if (!P_follows_service_routes()){
            #Variant 1 - deny access to the network
            sl_send_reply("400","Bad Request - Not following indicated
service routes");
            break;
            #Variant 2 - enforce routes and let the dialog continue
            #P_enforce_service_routes();
                                      - 54 -

      }

      # add IBCF/THIG route here if required

      P_remove_header_tag("Require","sec-agree");
      P_remove_header_tag("Proxy-Require","sec-agree");
      P_remove_security_verify();
      P_add_p_charging_vector();

      # reply routes unused as empty at the moment
      t_on_reply("Orig_Standalone_reply");
      #t_on_failure("Orig_Standalone_failure");

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding originating standalone
request");
            break;
      };

}

onreply_route[Orig_Standalone_reply]
{
      log(1,">>       Orig_Standalone_reply\n");
      #P_store_charging();
      if (!P_security_relay())
                  P_NAT_relay();
      break;
}

failure_route[Orig_Standalone_failure]
{
      log(1,">>       Orig_Standalone_failure\n");
      break;
}


#######                   TERMINATING

route[Term_Initial]
{
      log(1,">>        Term_Initial\n");

      P_record_route("term");

      route(Check_Session_Expires);

      if (!P_save_dialog("term")){
            sl_send_reply("514","Terminating dialog save failure - P-CSCF
maximum dialog count reached!");
            exit;
      }

      loose_route();

      t_on_reply("Term_Initial_reply");
      #t_on_failure("Term_Initial_failure");
      if (method=="INVITE") {
            P_SDP_manipulate();
                                   - 55 -

      }
      if (!P_security_relay())
                  P_NAT_relay();
      t_on_reply("Term_Initial_reply");
      #t_on_failure("Term_Initial_failure");
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding terminating initial
request");
            P_drop_dialog("term");
            break;
      };

}


onreply_route[Term_Initial_reply]
{
      log(1,">>       Term_Initial_reply\n");
      if (t_check_status("(180)|(183)|([2-9]..)")){
            P_SDP_manipulate();
      }

      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed");
            P_enforce_via_list();
      };

      if (t_check_status("(1[1-9].)|(1.[1-9])|(2..)")){
            if (!P_follows_record_routes()){
                  log(1,">>      P_follows_record_routes - failed\n");
                  P_enforce_record_routes();
            }
      }

      if (!t_check_status("(408)|(480)")){
            P_assert_called_identity();
            P_update_dialog("term");
            break;
      }else{
            P_drop_dialog("term");
            break;
      }

}

failure_route[Term_Initial_failure]
{
      log(1,">>       Term_Initial_failure\n");
      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed - this is a bug in
P_follows_via_list()!\n");
      #     P_enforce_via_list();
      };
      if (t_check_status("(408)|(480)")){
            P_drop_dialog("term");
            break;
      }
      break;
}
                                      - 56 -




route[Term_Subsequent]
{
      log(1,">>       Term_Subsequent\n");

      route(Check_Session_Expires);

      P_update_dialog("term");

      loose_route();

      #P_record_route("term");

      if (method=="ACK" || method=="BYE"){
            P_SDP_manipulate();
      }


      P_remove_header_tag("Require","sec-agree");
        P_remove_header_tag("Proxy-Require","sec-agree");
        P_remove_security_verify();

      t_on_reply("Term_Subsequent_reply");
      #t_on_failure("Term_Subsequent_failure");
      if (!P_security_relay())
                  P_NAT_relay();
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding terminating subsequent
request");
            break;
      };

}

onreply_route[Term_Subsequent_reply]
{
      log(1,">>       Term_Subsequent_reply\n");
      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed\n");
            P_enforce_via_list();
      };
      if (t_check_status("[1-2]..")){
            P_update_dialog("term");
      }
      break;
}

failure_route[Term_Subsequent_failure]
{
      log(1,">>       Term_Subsequent_failure\n");
      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed\n");
            P_enforce_via_list();
      };
      break;
}
                                   - 57 -


route[Term_Standalone]
{
      log(1,">>       Term_Standalone\n");

      loose_route();

      t_on_reply("Term_Standalone_reply");
      #t_on_failure("Term_Standalone_failure");
      if (!P_security_relay())
                  P_NAT_relay();
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding terminating standalone
request");
            break;
      };

}

onreply_route[Term_Standalone_reply]
{
      log(1,">>       Term_Standalone_reply\n");
      P_assert_called_identity();
      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed\n");
            P_enforce_via_list();
      };
      break;
}

failure_route[Term_Standalone_failure]
{
      log(1,">>       Term_Standalone_failure\n");
      if (!P_follows_via_list()) {
            log(1,">>      P_follows_via_list - failed\n");
            P_enforce_via_list();
      };
      break;
}




pcscf.xml

<?xml version="1.0" encoding="UTF-8"?>
<DiameterPeer
      FQDN="pcscf.open-ims.test"
      Realm="open-ims.test"
      Vendor_Id="10415"
      Product_Name="CDiameterPeer"
      AcceptUnknownPeers="1"
      DropUnknownOnDisconnect="1"
      Tc="30"
      Workers="4"
      QueueLength="8"
>
      <Peer FQDN="clf.open-ims.test" Realm="open-ims.test" port="3868"/>
                                    - 58 -


       <Acceptor port="3867" bind="192.168.1.186"/>

       <Auth id="16777231" vendor="13019"/><!-- ETSI e2 -->

       <DefaultRoute FQDN="clf.open-ims.test" metric="10"/>

<!-- Realm Routing configuration - Uncomment and Edit!

       <Realm name="open-ims.test">
             <Route FQDN="clf1.open-ims.test" metric="10"/>
             <Route FQDN="clf2.open-ims.test" metric="20"/>
       </Realm>
       <Realm name="another.open-ims.test">
             <Route FQDN="clf3.open-ims.test" metric="10"/>
             <Route FQDN="clf2.open-ims.test" metric="20"/>
       </Realm>
       <DefaultRoute FQDN="clf.open-ims.test" metric="10"/>
       <DefaultRoute FQDN="clf4.open-ims.test" metric="20"/>

-->

</DiameterPeer>


scscf.cfg
# Serving - CSCF configuration script
# ----------- global configuration parameters ------------------------

debug=3
log_stderror=yes
memlog=5
sip_warning=yes

fork=yes
children=4

listen=192.168.1.186
port=6060
alias="scscf.open-ims.test":6060

check_via=no             # (cmd. line: -v)
dns=no                   # (cmd. line: -r)
rev_dns=no         # (cmd. line: -R)

# ------------------ module loading ----------------------------------

loadmodule "/opt/OpenIMSCore/ser_ims/modules/sl/sl.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/tm/tm.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/dialog/dialog.so"


loadmodule "/opt/OpenIMSCore/ser_ims/modules/rr/rr.so"
loadmodule "/opt/OpenIMSCore/ser_ims/modules/maxfwd/maxfwd.so"
loadmodule "/opt/OpenIMSCore/ser_ims/modules/textops/textops.so"
                                   - 59 -

loadmodule "/opt/OpenIMSCore/ser_ims/modules/enum/enum.so"

loadmodule "/opt/OpenIMSCore/ser_ims/modules/scscf/scscf.so"

modparam("scscf","name","sip:scscf.open-ims.test:6060")

#Comment the following line to allow for realm routing on the Cx interface
#modparam("scscf","forced_hss_peer","hss.open-ims.test")

modparam("scscf","auth_data_hash_size",64)
modparam("scscf","auth_vector_timeout",60)
modparam("scscf","auth_data_timeout",60)
modparam("scscf","av_request_at_once",1)
modparam("scscf","av_request_at_sync",1)

modparam("scscf","server_assignment_store_data",0)

# only one of user_data validation file should normaly be declared here
# because if both are specified the data will be checked twice
#modparam("scscf","user_data_dtd","/opt/OpenIMSCore/ser_ims/modules/scscf/C
xDataType.dtd")
modparam("scscf","user_data_xsd","/opt/OpenIMSCore/ser_ims/modules/scscf/Cx
DataType_Rel7.xsd")

modparam("scscf","registrar_hash_size",256)

modparam("scscf","registration_default_expires",3600)
modparam("scscf","registration_min_expires",30)
modparam("scscf","registration_max_expires",1000000)
modparam("scscf","registration_qop","auth,auth-int")

#modparam("scscf","registration_default_algorithm","AKAv1-MD5")
#modparam("scscf","registration_default_algorithm","AKAv2-MD5")
modparam("scscf","registration_default_algorithm","MD5")
#modparam("scscf","registration_default_algorithm","CableLabs-Digest")
#modparam("scscf","registration_default_algorithm","3GPP-Digest")
#modparam("scscf","registration_default_algorithm","TISPAN-
HTTP_DIGEST_MD5")
# Let the HSS decide
#modparam("scscf","registration_default_algorithm","HSS-Selected")

# The next authentication methods are implemented here but not yet
completed in FHoSS
# please do not complain about bugs when using with FHoSS, yet!
#modparam("scscf","registration_default_algorithm","NASS-Bundled")

modparam("scscf","registration_disable_early_ims",1)
modparam("scscf","registration_disable_nass_bundled",1)

modparam("scscf","subscription_default_expires",3600)
modparam("scscf","subscription_min_expires",30)
modparam("scscf","subscription_max_expires",1000000)

modparam("scscf","dialogs_hash_size",256)
modparam("scscf","dialogs_expiration_time",3600)
modparam("scscf","dialogs_enable_release",1)
modparam("scscf","max_dialog_count",20000)
modparam("scscf","min_se",90)
                                       - 60 -

# persistency_mode - 0 None / 1 Files / 2 Databases
modparam("scscf","persistency_mode",0)

# support for wildcard PSI 0 No 1 Yes
modparam("scscf","support_wildcardPSI",0)

#modparam("scscf","persistency_mode",1)
#modparam("scscf","persistency_location","/opt/OpenIMSCore/persistency")
#modparam("scscf","persistency_timer_authdata",60)
#modparam("scscf","persistency_timer_dialogs",60)
#modparam("scscf","persistency_timer_registrar",60)


loadmodule "/opt/OpenIMSCore/ser_ims/modules/isc/isc.so"

modparam("isc","my_uri","scscf.open-ims.test:6060")
modparam("isc","isc_fr_timeout",5000)
modparam("isc","isc_fr_inv_timeout",20000)
modparam("isc","expires_grace",120)


loadmodule "/opt/OpenIMSCore/ser_ims/modules/cdp/cdp.so"
modparam("cdp","config_file","/opt/OpenIMSCore/scscf.xml")

# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)



# -------------------------      request routing logic -------------------

# main routing logic

route{

        route(Sanity_Checks);

        # don't repeat work for a transaction already in processing
        if (method!="ACK" && S_trans_in_processing()) {
              log(1,"Trans already in processing... skip\n");
              break;
        }

        if (method=="REGISTER") {
              route(REGISTER);
              break;
    }

        if (method=="SUBSCRIBE" && search("^(Event|o)([ \t]*):([ \t]*)reg"))
{
             route(SUBSCRIBE);
             break;
        }

        if (method=="ACK") {
              loose_route();
              t_relay();
              exit;
        }
                                   - 61 -


      if (S_mobile_originating()||ISC_from_AS("orig")){
            # support for AS origination on behalf of unregistered user
            if (S_orig_not_registered()) {
                  S_assign_server_unreg("open-ims.test", "orig");
            }

            # Originating
            route(Orig);
            break;
      }else{
            if (S_is_in_dialog("orig")){
                  route(Orig_Subsequent);
                  break;
            }
            if (S_is_in_dialog("term")){
                  route(Term_Subsequent);
                  break;
            }

            # Terminating
            if (uri=~"sip:(.*)@open-ims\.test(.*)" || uri=~"tel:.*"){
                  if (S_term_not_registered())
                        S_assign_server_unreg("open-ims.test", "term");
            }else{
                  sl_send_reply("403","Forbidden - Dialog not found on S-
CSCF or Terminating user not suitable for unregistered services");
                  exit();
            }

            route(Term);

            break;
      }

}

route[Sanity_Checks]
{
      # initial sanity checks -- messages with
      # max_forwards==0, or excessively long requests
      if (!mf_process_maxfwd_header("10")) {
            sl_send_reply("483","Too Many Hops");
            exit;
      };

      if (msg:len >= max_len ) {
            sl_send_reply("513", "Message too big");
            exit;
      };

      if(@hf_value.max_forwards=="0"){

            exit;
      }
}

route[Check_Session_Expires]
{
                                     - 62 -

        if (!S_check_session_expires())       {
              S_422_session_expires();
              exit;
        };
}

route[REGISTER]
{
      if (uri=~"sip:(.*)open-ims\.test(.*)"){
            t_newtran();
#           if ( !t_newtran()) {
#                 sl_reply_error();
#                 break;
#           };

             if (!S_is_integrity_protected("open-ims.test")){
                   # Unprotected REGISTER
                   # Variant 1 - accept also non IPSec clients
                   if (!S_is_authorized("open-ims.test")) {
                         S_challenge("open-ims.test");
                         route(Service_Routes);
                         t_reply("401", "Unauthorized - Challenging the
UE");
                        exit;
                  }else{
                        if (S_is_not_registered()){
                              if (S_assign_server("open-ims.test")){
                                    route(Service_Routes);
                                    route(Charging_Function_Addresses);
                                    t_reply("200","OK - SAR succesful and
registrar saved");
                                    ISC_match_filter_reg("0");
                                    exit;
                              }else{
                                    t_reply("500","Server Internal Error -
Server Assignment failed");
                                    exit;
                              }
                        }else{
                              ISC_match_filter_reg("1");
                              if (S_assign_server("open-ims.test")){
                                    if($retcode == 1){
                                          route(Service_Routes);

        route(Charging_Function_Addresses);
                                              t_reply("200","OK - SAR succesful
and registrar saved");
                                          exit;
                                    }else
                                    if ($retcode == 501){
                                          t_reply("501", "Not Implemented -
User cannot deregister an emergency contact");
                                          exit;
                                    }
                              }else{
                                    t_reply("500","Server Internal Error -
Server Assignment failed");
                                    exit;
                              }
                                    - 63 -

                       }
                  }

                  # Variant 2 - accept only IPSec clients
                  #S_challenge("open-ims.test");
                  #route(Service_Routes);
                  #t_reply("401", "Unauthorized - Challenging the UE");

                 break;
           }else{
                 # Protected REGISTER

                  # Variant 1 - Always require reauthentication
                  #if (!S_is_authorized("open-ims.test")) {
                  #     S_challenge("open-ims.test");
                  #     route(Service_Routes);
                  #     t_reply("401", "Unauthorized - Challenging the
UE");
                  #    exit;
                  #}

                  # Variant 2 - trust protected REGISTER
                  if (S_is_not_registered()){
                        if (S_assign_server("open-ims.test")){
                              route(Service_Routes);
                              route(Charging_Function_Addresses);

                               t_reply("200","OK - SAR succesful and
registrar saved");
                               ISC_match_filter_reg("0");

                             exit;
                       }else{
                             t_reply("500","Server Internal Error - Server
Assignment failed");
                              exit;
                        }
                  }else{
                        ISC_match_filter_reg("1");
                        if (S_assign_server("open-ims.test")){
                              if($retcode == 1){
                                    route(Service_Routes);
                                    route(Charging_Function_Addresses);

                                     t_reply("200","OK - SAR succesful and
registrar saved");
                                    exit;
                              }else
                              if ($retcode == 501){
                                    t_reply("501", "Not Implemented - User
cannot deregister an emergency contact");
                                    exit;
                              }
                        }else{
                              t_reply("500","Server Internal Error - Server
Assignment failed");
                              exit;
                        }
                  }
                                   - 64 -

            }
      } else {
            sl_send_reply("403", "Forbidden - Domain not serviced");
      }
}

route[Service_Routes]
{
#     if (!S_check_visited_network_id("open-ims\.test")){
#           S_add_service_route("sip:thig@icscf.open-ims.test");
#     }
      if (S_emergency_flag()){
            S_add_allow("INVITE, ACK, CANCEL, BYE, REFER");
      }else{
            S_add_path_service_routes();
            S_add_allow("INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, INFO");
      }
}

route[Charging_Function_Addresses]
{
      if (S_check_visited_network_id("open-ims\.test")){
            S_add_p_charging_function_addresses();
      }
}

route[SUBSCRIBE]
{
      if ( !t_newtran()) {
            sl_reply_error();
            break;
      }
      if (!S_term_registered()){
            t_reply("404","Not Found - User not registered on this S-
CSCF");
            exit;
      }
      if (S_can_subscribe()){
            if (S_subscribe()){
                  # This is replied from S_subscribe, as that also add
extra headers
                  #t_reply("200","OK - Subscription saved");

                  exit;
            }else{
                  t_reply("500","Server Error saving subscription");
                  exit;
            }
      }else{
            t_reply("403","Forbidden to SUBSCRIBE");
            exit;
      };
}
                                      - 65 -



#                   ORIGINATING




route[Orig]
{
      log(1,">>       Orig\n");
      if (S_originating_barred()){
            sl_send_reply("403","Forbidden - Originating Public Identity
barred");
            exit;
      }
      if (method=="INVITE"||method=="SUBSCRIBE"){
            route(Check_Session_Expires);

             if (!S_is_record_routed("orig"))
                   S_record_route("orig");

            if (!S_save_dialog("orig")){
                  sl_send_reply("514","Originating dialog save failure - S-
CSCF maximum dialog count reached!");
                  exit;
            }
      }

        loose_route();

        S_privacy_hook();

        # check if dialog saved as fwded to AS
        if (ISC_match_filter("orig")){
              t_on_reply("ISC_Orig_reply");
              t_on_failure("ISC_Orig_failure");
              log(1,">>       Orig - msg was fwded to AS\n");
              exit;
        }

        # if THIG_required -> add THIG route

        if (!ISC_from_AS("orig")){
              S_add_p_asserted_identity();
        }



        if (method=="INVITE") {
              route(PSTN_handling);
    }

        t_on_reply("Orig_reply");
        #t_on_failure("Orig_failure");

    # Do not loop through the I-CSCF if the terminating user is here
    # might not work if other routes are present
                                   - 66 -

      if (S_term_registered()){
            t_relay_to_udp("192.168.1.186",6060);
            exit;
      }

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding towards terminating
leg");
            exit;
      };
}

onreply_route[Orig_reply]
{
      log(1,">>       Orig_reply\n");
      if (!S_update_dialog("orig")){
            log(1,">>       Error updating orig dialog - maybe non-dialog
request...\n");
      }
}

failure_route[Orig_failure]
{
      log(1,">>       Orig_failure\n");
}

onreply_route[ISC_Orig_reply]
{
      log(1,">>       ISC_Orig_reply\n");
      if (!S_update_dialog("orig")){
            log(1,">>       Error updating orig dialog - maybe non-dialog
request...\n");
      }
      break;
}

failure_route[ISC_Orig_failure]
{
      log(1,">>       ISC_Orig_failure\n");
#     if (t_check_status("408")) {
#           if (ISC_is_session_continued()){
#                 log(1,">>   ISC continue session not implemented :(\n");
#           break;
#           }else{
#                 t_reply("555","AS failed to respond");
#           }
#     }

      if (t_check_status("(408)|(5..)")){
            t_on_reply("ISC_Orig_reply");
            t_on_failure("ISC_Orig_failure");
            if (ISC_match_filter("orig")){
                  log(1,">>       ISC_Orig_failure - msg was fwded to
AS\n");
                  exit;
            }

            # if THIG_required -> add THIG route
                                   - 67 -

            if (!ISC_from_AS("origfail")){
                  S_add_p_asserted_identity();
            }

            if (method=="INVITE") {
                  route(PSTN_handling);
            }

            t_on_reply("Orig_reply");
            t_on_failure("Orig_failure");

          # Do not loop through the I-CSCF if the terminating user is here
          # might not work if other routes are present
            if (S_term_registered()){
                  append_branch();
                  t_relay_to_udp("192.168.1.186",6060);
                  exit;
            }

            if (!t_relay()) {
                  append_branch();
                  if (!t_relay()) {
                        t_reply("500","Error forwarding towards terminating
leg");
                        exit;
                  }
            };
      }
}


route[Orig_Subsequent]
{
      log(1,">>       Orig_Subsequent\n");


      loose_route();
      if (method=="INVITE"){
            route(Check_Session_Expires);
            S_update_dialog("orig");
      }
      #S_record_route("orig");
      if (method!="ACK"){
            S_privacy_hook();
            t_on_reply("Orig_Subsequent_reply");
            #t_on_failure("Orig_Subsequent_failure");
      }
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding subsequent request
towards terminating leg");
            exit;
      };
}

onreply_route[Orig_Subsequent_reply]
{
      log(1,">>       Orig_Subsequent_reply\n");
#     if (t_check_status("305")){
#           S_proxy_request();
                                      - 68 -

#           break;
#     }
      S_update_dialog("orig");
      break;
}

failure_route[Orig_Subsequent_failure]
{
      log(1,">>       Orig_Subsequent_failure\n");
}




#                       TERMINATING


route[Term]
{
      log(1,">>        Term\n");

      if (S_terminating_barred()){
            sl_send_reply("404","Not Found - Terminating user barred");
            exit;
      }

      if (method=="INVITE"||method=="SUBSCRIBE"){
            route(Check_Session_Expires);
            if (!S_is_record_routed("term"))
                  S_record_route("term");

            if (!S_save_dialog("term")){
                  sl_send_reply("514","Terminating dialog save failure - S-
CSCF maximum dialog count reached!");
                  exit;
            }
      }

      loose_route();

      # check if dialog saved as fwded to AS
      if (ISC_match_filter("term")){
            t_on_reply("ISC_Term_reply");
            t_on_failure("ISC_Term_failure");
            log(1,">>       Term - msg was fwded to AS\n");
            exit;
      }

      if (!S_lookup()){
            if (uri=~"sip:(.*)@open-ims\.test(.*)") {
                  if ( !t_newtran()) {
                        sl_reply_error();
                        exit;
                  };
                  t_reply("404","Not Found - destination user not found on
this S-CSCF");
                  exit;
            }
                                   - 69 -

      }


      t_on_reply("Term_reply");
      #t_on_failure("Term_failure");

      S_apply_privacy();

      if (!t_relay()) {
            sl_send_reply("500","Error forwarding towards terminating
leg");
            exit;
      };
}


onreply_route[Term_reply]
{
      log(1,">>       Term_reply\n");
      if (!S_update_dialog("term")){
            log(1,">>       Error updating term dialog - maybe non-dialog
request...\n");
      }
}

failure_route[Term_failure]
{
      log(1,">>       Term_failure\n");
}

onreply_route[ISC_Term_reply]
{
      log(1,">>       ISC_Term_reply\n");
    if (!S_update_dialog("term")){
            log(1,">>       Error updating term dialog - maybe non-dialog
request...\n");
    }
      break;
}

failure_route[ISC_Term_failure]
{
      log(1,">>       ISC_Term_failure\n");
#     if (t_check_status("408")) {
#           if (ISC_is_session_continued()){
#                 log(1,">>   ISC continue session not implemented :(\n");
#           break;
#           }else{
#                 t_reply("555","AS failed to respond");
#           }
#     }

      if (t_check_status("(408)|(5..)")){
            t_on_reply("ISC_Term_reply");
            t_on_failure("ISC_Term_failure");
            if (ISC_match_filter("term")){
                  log(1,">>       Term - msg was fwded to AS\n");
                  exit;
            }
                                   - 70 -


            if (!S_lookup()){
                  if (uri=~"sip:(.*)@open-ims\.test(.*)") {
                        #if ( !t_newtran()) {
                        #     sl_reply_error();
                        #     exit;
                        #};
                        t_reply("404","Not Found - destination user not
found on this S-CSCF");
                        exit;
                  }
            }

            t_on_reply("Term_reply");
            t_on_failure("Term_failure");

            if (!t_relay()) {
                  append_branch();
                  if (!t_relay()) {
                        t_reply("500","Error forwarding towards terminating
leg");
                        exit;
                  }
            };
      }
}

route[Term_Subsequent]
{
      log(1,">>       Term_Subsequent\n");
      loose_route();
      if (method=="INVITE"){
            route(Check_Session_Expires);
            S_update_dialog("term");
      }

      S_apply_privacy();

      #S_record_route("term");

      if (method!="ACK") {
            t_on_reply("Term_Subsequent_reply");
            #t_on_failure("Term_Subsequent_failure");
      }
      if (!t_relay()) {
            sl_send_reply("500","Error forwarding subsequent request
towards user");
            exit;
      };
}

onreply_route[Term_Subsequent_reply]
{
      log(1,">>       Term_Subsequent_reply\n");
#     if (t_check_status("305")){
#           S_proxy_request();
#           break;
#     }
      S_update_dialog("term");
                                   - 71 -

      break;
}

failure_route[Term_Subsequent_failure]
{
      log(1,">>       Term_Subsequent_failure\n");
}




route[PSTN_handling]
{
      #PSTN gateway handling
      if (uri=~"tel:\+(.*)"){
            if(!enum_query()){
                  route(PSTN);
                  break;
            }
      }

      #if (uri=~"sip:[0-9]+@open-ims\.test(.*)"){
      #   route(PSTN);
      #   break;
      #}

      # a tel URI in non-international format (i.e. the local service
number analysis and handling is either failed in the appropriate AS or the
request has not been forwarded to AS for local service number analysis and
handling at all)
      if (uri=~"tel:[^+]*") {
            route(PSTN);
            break;
      }

      # a SIP URI with the user part starting with a + and user=phone
      if (uri=~"sip:\+[0-9]+@open-ims\.test.*user=phone.*"){
            route(PSTN);
            break;
      }
}

route[PSTN]
{
      t_on_reply("PSTN_reply");
      t_relay_to_udp("192.168.1.186", "9060");
      exit;
}

onreply_route[PSTN_reply]
{
      log(1,">>       PSTN_reply\n");
      if (!S_update_dialog("orig")){
            log(1,">>       Error updating orig dialog - maybe non-dialog
request...\n");
      }
}
                                       - 72 -



scscf.xml

<?xml version="1.0" encoding="UTF-8"?>
<DiameterPeer
      FQDN="scscf.open-ims.test"
      Realm="open-ims.test"
      Vendor_Id="10415"
      Product_Name="CDiameterPeer"
      AcceptUnknownPeers="1"
      DropUnknownOnDisconnect="1"
      Tc="30"
      Workers="4"
      QueueLength="8"
>
      <Peer FQDN="hss.open-ims.test" Realm="open-ims.test" port="3868"/>

       <Acceptor port="3870" bind="192.168.1.186"/>

            <Auth id="16777216" vendor="10415"/><!-- 3GPP Cx -->
            <Auth id="16777216" vendor="4491"/><!-- CableLabs Cx -->
            <Auth id="16777216" vendor="13019"/><!-- ETSI/TISPAN Cx -->

       <DefaultRoute FQDN="hss.open-ims.test" metric="10"/>

<!-- Realm Routing configuration - Uncomment and Edit!

       <Realm name="open-ims.test">
             <Route FQDN="hss1.open-ims.test" metric="10"/>
             <Route FQDN="hss2.open-ims.test" metric="20"/>
       </Realm>
       <Realm name="another.open-ims.test">
             <Route FQDN="hss3.open-ims.test" metric="10"/>
             <Route FQDN="hss2.open-ims.test" metric="20"/>
       </Realm>
       <DefaultRoute FQDN="hss.open-ims.test" metric="10"/>
       <DefaultRoute FQDN="hss4.open-ims.test" metric="20"/>

-->

</DiameterPeer>



Change HSS setting:

DiameterPeerHSS.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- HSS Server config -->
<DiameterPeer
      FQDN="hss.open-ims.test"
      Realm="open-ims.test"
      Vendor_Id="10415"
      Product_Name="JavaDiameterPeer"
      AcceptUnknownPeers="1"
      DropUnknownOnDisconnect="1"
      Tc="30"
                                          - 73 -

       Workers="4"
       QueueLength="32"
>
       <Peer FQDN="icscf.open-ims.test" Realm="open-ims.test" port="3869" />
       <Peer FQDN="scscf.open-ims.test" Realm="open-ims.test" port="3870" />

       <Acceptor port="3868" bind="192.168.1.186" />

       <Auth     id="16777216"   vendor="10415"/><!-- 3GPP Cx -->
       <Auth     id="16777216"   vendor="4491"/><!-- CableLabs Cx -->
       <Auth     id="16777216"   vendor="13019"/><!-- ETSI/TISPAN Cx -->
       <Auth     id="16777217"   vendor="10415"/><!-- 3GPP Sh -->
       <Auth     id="16777221"   vendor="10415"/>

</DiameterPeer>

hss.properties

# FOKUS HSS Properties file
#--------------------------------------------------------------------------
# host & port : specify the IP address and the port where Tomcat is
listening, e.g. host=127.0.0.1; port=8080;

host=192.168.1.186
port=8080

# Authentication properties
#--------------------------------------------------------------------------
# default operator and amf values
#--------------------------------------------------------------------------
# operator_id, as hex bytes, required length 32 byte,
# e.g. 00000000000000000000000000000000
operatorId=00000000000000000000000000000000
# amf_id: Default amf id as hex bytes, required length 4 byte, e.g. 0000
amfId=0000

# configuration parameters relating to Milenage algorithm
#--------------------------------------------------------------------------
# Enable or disable the use of AK in the Milenage algorithm; if this flag
is enabled,
#then is mandatory to be enabled also on the client side
USE_AK=true

# IND_LEN property - contains the number of bits assigned for the Index; it
is used in the generation process of new SQN values
# We are using SQN values which are not time based, as is specified here
C.1.1.2, C.1.2, C.2, C3.2 and C.3.4 of TS 33.102
# (SQN = SEQ || IND)
IND_LEN=5

# delta value, assuring the protection against wrap around counter in the
USIM
delta=268435456

# L - limit on the difference between SEQ_MS (Mobile Station) and SEQ_HE
(HSS)
L=32
                                                - 74 -

   # Sh-Settings
   #--------------------------------------------------------------------------
   # Enable or disable IFC Notification mechanism. If you need this feature
   please enable it. However, be aware that this feature imply
   #important time for processing as more validation is required every time
   after an update (for entities as: IFC, TP, SPT, AS, SP_IFC),
   # and could affect the web console interface response-ness.
   iFC_NOTIF_ENABLED=false
   # interval to check in the db if there are any notifications to push over
   Sh
   SH_NOTIF_CHECK_INTERVAL=10

   # Cx-Settings
   # whether to automatically enable a PPR on each IMPU update. Probably not a
   good idea.
   AUTO_PPR_ENABLED=false
   # interval to check in the db if there are any events to push over Cx
   CX_EVENT_CHECK_INTERVAL=10

   # Expiry Time limit - indicates the subscriptions maximum lifetime allowed
   by the HSS
   expiry_time_lim=3600




4. Configure the Subscribers

           By default, HSS comes provisioned with 2 demo users with one standard service
   profile already in the database. These are:

          Alice:
                   Public identity: sip:alice@open-ims.test
                   Private identity: alice@open-ims.test
                   Secret key: alice


          Bob:
                   Public identity: sip:bob@open-ims.test
                   Private identity: bob@open-ims.test
                   Secret key: bob


           Admin can use the HSS web interface to see the existing users and their settings, to
   add, to modify or to create new users, service profiles, triggering points, and more settings
   (See Appendix B).
                                           - 75 -



                             Appendix B – HSS Web Interface


Access the web interface management console
    If the HSS was deployed only on "localhost" you will find it here:
       http://localhost:8080
    If the HSS was deployed globally you will find it here:
       Ex. http://192.168.1.186, where replace 192.168.1.186 with your Server IP Address.

For the web interface authentication
       Read-only user:
              Username: hss
              Password: hss

       Administrator:
             Username: hssAdmin
             Password: hss

Note: You can change these values by editing the "conf/tomcat-users.xml" file from
deployment folder.


       Creating User Identity
              IMS Subscription
              Private Identity
              Public User Identity
                                       - 76 -


Creating Network Configuration
      Visited Networks
      Charging Sets
      Capability
      Capability Sets
      Preferred S-CSCF Sets




Creating Services Information
      Service Profiles
      Application Servers
      Trigger Points
      Initial Filter Criteria (iFC)
      Shared iFC Sets
      DSAI

				
DOCUMENT INFO
Shared By:
Stats:
views:137
posted:12/27/2011
language:English
pages:83
Description: The multimedia systems nowadays provide convenience for human being. Presently, we gain benefit of the system by using the multimedia service such as; audio call, video call, instant messenger, and file transfer. These services are now very essential to run business efficiently. The question is it is possible to combine all of these services together and adding more services to the same system.