Skip Headers
Oracle® Communications Service Broker Modules Configuration Guide
Release 6.1

Part Number E29454-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
PDF · Mobi · ePub

36 Setting Up SM-PME

This chapter describes the role of the SM-PME and explains how to configure an SM-PME supplementary module.

About the SM-PME

Applications might impose requirements on the structure of the headers and body in SIP messages that these applications receive from Oracle Communications Service Broker. For example, an application might require that the Subject header contains a particular value.

You can add the SM-PME to your orchestration chain. In this case, the SM-PME modifies the structure and contents of SIP message's headers and body before the OE routes the message to a next application in the orchestration chain.

You define how the SM-PME modifies the headers and body in a file, known as mapping file. A mapping file is an XML file. It contains an XSL transform that the SM-PME applies to the SIP headers and body. Because an XSL transform can be applied to XML only, the SM-PME first converts the headers and body to an XML. Then the SM-PME modifies headers and body by applying the mapping file to the XML. After the headers and body are modified, the SM-PME converts the headers and body back to their original format.

About the Mapping File

The mapping file consists of the following sections:

  • Header manipulation: This section is wrapped in the <header> element. A mapping file can contain only one <header> element.

  • Body manipulation: This section is wrapped in the <body> element. A mapping file can contain multiple <body> elements. Each <body> element contains the <Content-Type> element that specifies the protocol of the body, such as SDP or CAP.

Both the header manipulation section and each body manipulation section contain an XSL transform. Example 36-1 shows how a typical mapping file is structured.

Example 36-1 Mapping File Structure

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
   <header>
      <xsl><![CDATA[
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <!-- XSL transform for headers -->
         </xsl:stylesheet>
      ]]></xsl>
   </header>

   <body>
      <Content-Type>application/sdp</Content-Type>
      <xsl><![CDATA[
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <!-- XSL transform for the SDP body -->
         </xsl:stylesheet>
      ]]></xsl>
   </body>

   <body>
      <Content-Type>application/cap-phase4+xml</Content-Type>
      <xsl><![CDATA[
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
               <!-- XSL transform for the CAP4 body -->
         </xsl:stylesheet>
      ]]></xsl>
   </body>
</mapping>

When configuring the SM-PME, you specify the path of the mapping file. If you do not specify the mapping file, the SM-PME does not modify the message.

About Manipulating SIP Headers

The SM-PME can modify headers of SIP requests only. Before the SM-PME applies a mapping file to headers of a SIP request, the SM-PME converts the headers of the request to an XML representation. Example 36-2 shows the original format of SIP message headers.

Example 36-2 Original Format of SIP Message Headers

INVITE sip:bob@biloxi.com SIP/2.0
Via: SIP/2.0/UDP 
bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1
Via: SIP/2.0/UDP tzach.com
Max-Forwards: 69
To: Bob <sip:bob@biloxi.com>
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:alice@pc33.atlanta.com>
Content-Type: application/sdp

Example 36-3 shows the XML representation to which the SM-PME converted the headers.

Example 36-3 XML Representation of SIP Message Headers

<?xml version="1.0" encoding="UTF-8"?>
<SALMsgHeader>
   <Request-Line>INVITE sip:bob@biloxi.com SIP/2.0</Request-Line>
   <SALHeader>
      <Header>From</Header>
    <Content>"Alice&lt;sip:alice @ atlanta.com&gt;;tag=1928301774"</Content>
   </SALHeader>

   <SALHeader>
      <Header>To</Header>
      <Content>"Bob&lt;sip:bob @ biloxi.com&gt;"
   </SALHeader>

   <SALHeader>
      <Header>Via</Header>
      <Content>"SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1"</Content>
   </SALHeader>

   <SALHeader>
      <Header>Via</Header>
      <Content>"SIP/2.0/UDP Tzach.com"</Content>
   </SALHeader>

   <SALHeader>
      <Header>Max-Forwards</Header>
      <Content>"69"</Content>
   </SALHeader>

   <SALHeader>
      <Header>Call-ID</Header>
      <Content>a84b4c76e66710</Content>
   </SALHeader>

   <SALHeader>
      <Header>CSeq</Header>
      <Content>314159 INVITE</Content>
   </SALHeader>

   <SALHeader>
      <Header>Contact</Header>
      <Content>"&lt;sip:alice @ pc33.atlanta.com&lt;"</Content>
   </SALHeader>

</SALMsgHeader>

Example 36-4 shows how you can code an XSL transform that changes the value of the Subject header. The transform copies the rest of the headers without any modification. See http://www.w3.org/TR/xslt for more information about XSLT. The code related to the headers manipulation is emphasized with bold.

Example 36-4 SIP Headers Manipulation

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
   <header>
      <xsl><![CDATA[
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/SALMsgHeader">
               <SALMsgHeader>
                  <xsl:copy-of select="node()[(name()='Request-Line')]"/>
                  <xsl:copy-of select="node()[(name()='Status-Line')]"/>
                  <xsl:for-each select="SALHeader">
                        <SALHeader>
                           <xsl:choose>
                              <xsl:when test="Header='Subject'">
                                 <xsl:copy-of select="Header"/>
                                 <Content>This is a new subject</Content>
                             </xsl:when>
                             <xsl:otherwise>
                                <xsl:copy-of select="Header"/>
                                <xsl:copy-of select="Content"/>
                             </xsl:otherwise>
                           </xsl:choose>
                        </SALHeader>
                     </xsl:for-each>
                  </SALMsgHeader>
               </xsl:template>
            </xsl:stylesheet>
        ]]></xsl>
   </header>

   <body>
      <!-- XSL transform for the SDP body -->
   </body>
</mapping>

About Manipulating the SDP Body

The SM-PME can modify the body of both SIP requests and responses. Before the SM-PME applies a mapping file to the body of a SIP message, the SM-PME converts the body of the message to an XML representation. The SM-PME supports message bodies encoded in either SDP or SS7-based protocols, such as CAP or MAP. Example 36-5 shows the original format of the SDP body.

Example 36-5 Original SDP Body

v=0
o=user1 53655765 2353687777 IN IP4 10.162.34.115
c=IN IP4 10.162.34.115
t=0 0
m=audio 6001 RTP/AVP 0
a=rtpmap:0 PCMU/8000 

Example 36-6 shows the XML representation to which the SM-PME converts the SDP body.

Example 36-6 XML Representation of the SDP Body

<?xml version="1.0" ?>
<SDPSessionDescription>
   <Field>
      <Type>v</Type>
      <Value>0</Value>
   </Field>

   <Field>
      <Type>o</Type>
      <Value>user1 53655765 2353687777 IN IP4 10.162.34.115</Value> 
   </Field>

   <Field>
      <Type>c</Type>
      <Value>IN IP4 10.162.34.115</Value> 
   </Field>

   <Field>
      <Type>t</Type>
      <Value>0 0</Value>
   </Field>

   <Field>
      <Type>m</Type>
      <Value>audio 6001 RTP/AVP 0</Value>
   </Field>

   <Field>
      <Type>a</Type>
      <Value>rtpmap:0 PCMU/8000</Value> 
   </Field>
</SDPSessionDescription>

Example 36-7 shows how you can create an XSL transform that sets the value of the <Type> element to 1 0. See http://www.w3.org/TR/xslt for more information about XSLT. The code related to the SDP body manipulation is emphasized with bold. The <Content-Type> element specifies that the transform is designed for SDP messages.

Example 36-7 Manipulating the SDP Body

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
   <header>
      <xsl><![CDATA[
         <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <!-- XSL transform for headers -->
         </xsl:stylesheet>
      ]]></xsl>
   </header>

   <body>
      <Content-Type>application/sdp</Content-Type>
      <xsl><![CDATA[         <xsl:stylesheet version="1.0"   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/SDPSessionDescription">
               <SDPSessionDescription>
                  <xsl:for-each select="Field">
                     <Field>
                        <xsl:choose>
                           <xsl:when test="Type='t'">
                              <xsl:copy-of select="Type"/>
                              <Value>1 0</Value>
                           </xsl:when>
                           <xsl:otherwise>
                              <xsl:copy-of select="Type"/>
                              <xsl:copy-of select="Value"/>
                           </xsl:otherwise>
                        </xsl:choose>
                     </Field>
                  </xsl:for-each>
               </SDPSessionDescription>
            </xsl:template>
         </xsl:stylesheet>
      ]]></xsl>
   </body>
</mapping>

The SM-PME converts the body to the XML representation only if there is at least one non-empty <body> element.

About Changing a Content Type

You can change the content type of a body in the transformation result using the <Content-Type-Result> element. If you do not specify this element, then the content type of the body in the transformation result is the same as in the original message.

Example 36-8 shows how you can create an XSL transform that changes the content body from application/cap-phase4+xml (see the value of the <Content-Type> element) to application/cap-phase3+xml (see the value of the <Content-Type-Result> element).

Example 36-8 Changing the Content Type

<?xml version="1.0" encoding="UTF-8"?>
<mapping>
   <header>
      <!-- XSL transform for the SDP body -->.
</header>

<body>
   <Content-Type>application/cap-phase4+xml</Content-Type>
   <Content-Type-Result>application/cap-phase3+xml</Content-Type-Result>
   <xsl><![CDATA[
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="text()" />
            <xsl:template match="Cap4">
               <xsl:apply-templates />
            </xsl:template>
            <xsl:template match="initialDP">
               <Cap3>
                  <initialDP>
                     <xsl:copy-of select="serviceKey"/>
                     <xsl:copy-of select="bearerCapability"/>
                     <xsl:copy-of select="timeAndTimezone"/>
                  </initialDP>
               </Cap3>
            </xsl:template>
      </xsl:stylesheet>
   ]]></xsl>
</body> 
</mapping>

Adding an SM-PME to the Service Broker Deployment

To add an SM-PME:

  1. In the domain navigation pane, expand the OCSB node.

  2. Expand the Processing Tier node.

  3. Expand the Supplementary Modules node.

  4. Select SM Management.

  5. On the bottom of the SM Management pane, click New.

  6. In the New window, fill out the fields as follows:

    • In the Type list, select SM-PME.

    • In the Version list, select the required version.

    • In the Name field, enter a name for this module as it should appear in the list of modules. In this field, you can only use lower case letters (a-z), upper case letters (A-Z), numbers (0-9), and underscores (_). If you attempt to use a character which is not allowed, Service Broker displays the error message and prompts you to enter a different name.

  7. Click OK.

  8. In the notification window that reminds you to commit the changes, click OK.

  9. To add the new SM-PME to your deployment, in the Change Center pane, click Commit.

    A new module of type SM-PME is now added to your Service Broker deployment. The new module is displayed in the domain navigation pane under the Supplementary Modules node.

Configuring an SM-PME

To configure an SM-PME:

  1. In the Change Center, click Lock & Edit.

  2. In the domain navigation pane, under the Supplementary Modules node, select the newly added SM-PME.

    The SM-PME configuration pane contains the subtabs described in Table 36-1.

    Table 36-1 SM-PME Parameters

    Name Type Description

    Mapping File Name

    STRING

    Specifies the path of the parameter mapping file.

    See "About the SM-PME" for more information on the format of an SM-PME mapping file.

    Default Handling on Mapping Error

    STRING

    Specifies whether SM-PME releases or continues a session when the mapping engine fails.

    Possible values:

    • Continue Session

    • Release Session

    Default value: Continue Session

    Mapping Error Response

    INT

    Specifies the SAL response error code that SM-PME returns when the mapping engine fails.

    The response error code is used only when the SM-PME releases a session after mapping failure. That is, the Default Handling on Mapping Error parameter is set to 1.

    Default value: 487