Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Section
Column
width40%
Panel

In this section:

titleTable of Contents
Table of Contents

column

maxLevel

info

3

titleAbout this Page
A sneak peek into the SBC 1000/2000's new SIP Header Manipulation Feature. This new feature permits any SIP header to

SMM Overview

Guidelines for SMM are as follows:

  • SIP Headers can be added, deleted, or modified.
  • This SIP Header Manipulation example uses the Literal manipulation option and shows how perform Header Manipulation only when certain criteria are met.
  • This document uses the Conditional Rules feature to limit Message Manipulation to very specific instances.
  • Manipulation can be completed for every SIP message, or separately for SIP Requests or SIP Responses.
  • Manipulations can set to occur based upon user specified matching criteria.
  • Manipulations can be executed at the ingress or egress SG.
    • At the ingress, inbound SIP messages are modified to permit proper handling by the SBC's routing function.
    • At the egress, SIP messages (already processed by the SBC) are modified to meet the SIP requirements of the upstream device.

The SMM feature is enabled on a Signaling Group and is used to change an incoming or outgoing SIP Message.

 

PAI Static Modification

This section details PAI configuration at the egress Signaling Group for a PSTN > SBC > Lync call. This is an example of a static replacement--a replacement that will take place on every SIP packet that leaves the SBC bound for Lync.

Configure the SBC1000/2000

Info

For configuration details, refer to SIP Message Manipulation Overview.

 

  1. Select the new Message Manipulation entry in the navigation tree (Setting >Message Manipulation).

  2. Configure how the rule will be applied (i.e., All SIP Messages, only Requests, only Responses, or Selected Messages).

  3. Add an entry to the new table.

  4. Set the Header Action to Modify and the Header Name to P-Asserted-Identity.

  5. To set the new PAI value, click Add/Edit.

  6. In the Edit Message text box, enter a value in the Value field.

  7. Click OK.

  8. In the Signaling Group, enable Message Manipulation.

  9. Add the new Message Manipulation to the Outbound Message Manipulation Table.

Debugging Output

In the debugging output below, you can see the PAI change from +15103644064 to 555

Code Block
langnone
   
Tip
titleRelated Articles

Prerequisites

Tip

Requires

Spacevars
0company
SBC2000/1000 Version 2.2

Summary

Because you can never tell just what the other side might send or need, the SBC1000/2000 version 2.2 will include a feature to manipulate any SIP header.

  • SIP Headers can be added, deleted, or modified.
  • Manipulation can be done for every SIP message, or separately for SIP Requests or SIP Responses.
  • Manipulations can set to occur based upon user specified matching criteria.
  • Manipulations can be executed at the ingress or egress SG. At the ingress, inbound SIP messages are modified to permit proper handling by the SBC's routing function. At the egress, SIP messages already processed by the SBC are modified to meet the SIP requirements of the upstream device.

PAI Static Modification

In today's sneak peek, we modifiy the PAI at the egress SG for a PSTN > SBC > Lync call. This is an example of a static replacement--a replacement that will take place on every SIP packet that leaves the SBC bound for Lync.

Near the end of the document, we'll add a configuration that will make the PAI modification conditional, only changing the PAI when certain criteria is met.

Configure the SBC1000/2000

  1. Select the new Message Manipulation entry in the navigation tree

    Panel
    borderStylenone

    Caption
    0Figure
    1Select Message Manipulation

    Image Removed 

  2. Add a SIP Message Rule Table

    Panel
    borderStylenone

    Caption
    0Figure
    1Add SIP Message Rule Table

    Image Removed

  3. Set how the rule will be applied. It can be applied to All SIP Messages, only Requests, only Responses, or Selected Messages.

    Panel
    borderStylenone

    Caption
    0Figure
    1Applicable Messages

    Image Removed 

  4. Add an entry to the new table.

    Panel
    borderStylenone

    Caption
    0Figure
    1Add Entry

    Image Removed

  5. Set the Header Action to Modify and the Header Name to P-Asserted-Identity. As you can see, any SIP Header can be manipulated.

    Panel
    borderStylenone

    Caption
    0Figure
    1Set Header Action and Name

    Image Removed

  6. To set the new PAI value, click Add/Edit...

    Panel
    borderStylenone

    Caption
    0Figure
    1Set PAI Value

    Image Removed

  7. ... and add the new value in the Edit Message Field

    Panel
    borderStylenone

    Caption
    0Figure
    1Edit Message Field

    Image Removed

  8. Click OK to complete adding the entry to the table.

    Panel
    borderStylenone

    Caption
    0Figure
    1Click OK

    Image Removed 

  9. In the SG, Enable the Message Manipulation

    Panel
    borderStylenone

    Caption
    0Figure
    1Enable Message Manipulation

    Image Removed

  10. Add the new Message Manipulation to the Outbound Message Manipulation Table

    Panel
    borderStylenone

    Caption
    0Figure
    1Add Message Table

    Image Removed

Debugging Output

In the debugging output below, you can see the PAI change from +15103644064 to 555

Code Block
langnone
                                                                           [2012-10-03 18:20:32,198] 5392 0001 com.net.ux.sip DEBUG (Transaction.cpp:685) - egressProtocolRepair: Transaction Protocol Repair (Transaction),calling Egress executive(1 item(s) on list)
[2012-10-03 18:20:32,198] 5393 0001 com.net.ux.sip DEBUG (Executive.cpp:52) - Run: Protocol Engine::Executive running 1 rules
[2012-10-03 18:20:32,198] 5394 0001 com.net.ux.sip TRACE (Executive.cpp:58) - Run: Protocol Engine::getting ruleid (1)
[2012-10-03 18:20:32,198] 5395 0001 com.net.ux.sip TRACE (Executive.cpp:75) - Run: Processing Message Rule (PAI fix)
[2012-10-03 18:20:32,198] 5396 0001 com.net.ux.sip TRACE (Executive.cpp:127) - processMessageRule: Processing Message Rule (1)
[2012-10-03 18:20:32,198] 5397 0001 com.net.ux.sip TRACE (Executive.cpp:1252) - MatchSipMessageRule: StartLine from configuration (*)From Msg (INVITE sip:+14083483531@sba1.vx.net:5067;user=phone SIP/2.0
)
[2012-10-03 18:20:32,198] 5398 0001 com.net.ux.sip DEBUG (HeaderRule.h:231) - debugInfo: HeaderRuleModify
[2012-10-03 18:20:32,198] 5399 0001 com.net.ux.sip DEBUG (HeaderRule.h:176) - debugInfo: HeaderRulePayload:: FieldList
[2012-10-03 18:20:32,198] 5400 0001 com.net.ux.sip DEBUG (ProtocolField.h:93) - debugInfo: FieldElement:: FieldType(1) Source(<sip:555@10.1.1.74:5067;user=phone>)
[2012-10-03 18:20:32,199] 5401 0001 com.net.ux.sip DEBUG (ProtocolField.h:211) - debugInfo: FieldElementLiteral:: stringLiteral(<sip:555@10.1.1.74:5067;user=phone>)
[2012-10-03 18:20:32,199] 5402 0001 com.net.ux.sip DEBUG (HeaderRule.h:115) - debugInfo: HeaderRule:: HeaderRuleType(1)
[2012-10-03 18:20:32,199] 5403 0001 com.net.ux.sip DEBUG (RuleBase.h:123) - debugInfo: RuleBase:: RuleBaseType(1)  Result(0) Description(test pai) valid(true), Condition Expression(${1})
[2012-10-03 18:20:32,199] 5404 0001 com.net.ux.sip TRACE (Executive.cpp:211) - processMessageRule: Processing Header rule
[2012-10-03 18:20:32,199] 5405 0001 com.net.ux.sip DEBUG (Executive.cpp:316) - processHeaderRule: Processing header Rule (test pai)
[2012-10-03 18:20:32,199] 5406 0001 com.net.ux.sip TRACE (Executive.cpp:328) - processHeaderRule: Processing header Conditions Count=1
[2012-10-03 18:20:32,199] 5407 0001 com.net.ux.sip TRACE (Executive.cpp:640) - processConditionRules: Condition Rule value=1
[2012-10-03 18:20:32,199] 5408 0001 com.net.ux.sip TRACE (Executive.cpp:652) - evaluateConditionRuleTruth: CREId=1
[2012-10-03 18:20:32,199] 5409 0001 com.net.ux.sip DEBUG (ConditionRule.h:121) - debugInfo: ConditionRule:: Description: test rule AdminState(0) Result(0) Operand(1) valid(true)
[2012-10-03 18:20:32,199] 5410 0001 com.net.ux.sip DEBUG (ProtocolField.h:93) - debugInfo: FieldElement:: FieldType(0) Source(header["from",1].uri[1].userinfo.user)
[2012-10-03 18:20:32,200] 5411 0001 com.net.ux.sip DEBUG (ProtocolField.h:272) - debugInfo: FieldElementObject:: Valid Object Tokens
[2012-10-03 18:20:32,200] 5412 0001 com.net.ux.sip DEBUG (ProtocolField.h:93) - debugInfo: FieldElement:: FieldType(1) Source(+15103644064)
[2012-10-03 18:20:32,200] 5413 0001 com.net.ux.sip DEBUG (ProtocolField.h:211) - debugInfo: FieldElementLiteral:: stringLiteral(+15103644064)
[2012-10-03 18:20:32,200] 5414 0001 com.net.ux.sip TRACE (Executive.cpp:727) - buildField: Building fields with element count=1
[2012-10-03 18:20:32,200] 5415 0001 com.net.ux.sip TRACE (Executive.cpp:755) - buildField: Building field literal
[2012-10-03 18:20:32,200] 5416 0001 com.net.ux.sip TRACE (SipMessage.cpp:1311) - getObjectValue: name:(3:Header) value:
[2012-10-03 18:20:32,200] 5417 0001 com.net.ux.sip TRACE (Executive.cpp:706) - evaluateConditionRuleTruth: Full CR match=1. oObj=+15103644064, oMatch=+15103644064, oObjLen=12, oMatchLen=12
[2012-10-03 18:20:32,200] 5418 0001 com.net.ux.sip TRACE (Executive.cpp:336) - processHeaderRule: Condition matched
[2012-10-03 18:20:32,200] 5419 0001 com.net.ux.sip TRACE (Executive.cpp:374) - processHeaderRule: Processing Rule Modify
[2012-10-03 18:20:32,200] 5420 0001 com.net.ux.sip TRACE (Executive.cpp:727) - buildField: Building fields with element count=1
[2012-10-03 18:20:32,200] 5421 0001 com.net.ux.sip TRACE (Executive.cpp:755) - buildField: Building field literal
[2012-10-03 18:20:32,201] 5422 0001 com.net.ux.sip TRACE (Executive.cpp:963) - headerModify: Executing header modify
[2012-10-03 18:20:32,201] 5423 0001 com.net.ux.sip TRACE (Executive.cpp:1297) - checkOrdinalAll: ObjectToken:: StringIndex(p-asserted-identity) Ordinal(1)
[2012-10-03 18:20:32,201] 5424 0001 com.net.ux.sip TRACE (Executive.cpp:967) - headerModify: Header modify single ordinal
[2012-10-03 18:20:32,201] 5425 0001 com.net.ux.sip TRACE (SipMessage.cpp:1311) - getObjectValue: name:(3:Header) value:
[2012-10-03 18:20:32,201] 5426 0001 com.net.ux.sip TRACE (SipMessage.cpp:1391) - setObjectValue: name:(3:Header) value:<sip:555@10.1.1.74:5067;user=phone>
[2012-10-03 18:20:32,201] 5427 0001 com.net.ux.sip TRACE (Executive.cpp:218) - processMessageRule: HeaderRule executed
[2012-10-03 18:20:32,201] 5428 0001 com.net.ux.sip TRACE (Executive.cpp:81) - Run: Message Rule (1) matched at least one message rule
[2012-10-03 18:20:32,201] 5429 0001 com.net.ux.sip DEBUG (Transaction.cpp:687) - egressProtocolRepair: Transaction Protocol Repair, out of Egress executive
[2012-10-03 18:20:32,202] 5430 0001 com.net.ux.sip DEBUG (TransportLayer.cpp:1316) - startTransaction: Sending data if=0.
[2012-10-03 18:20:32,203] 5431 0001 com.net.ux.sip.libctl TRACE (TransportTlsSocket.cpp:2278) - TX application data size: 990 for conn_id: 427 on handle: 0x2200b8, retry: 0, retry attempts: 0
[2012-10-03 18:20:32,204] 5432 0001 com.net.ux.sip DEBUG (TransportLayer.cpp:538) - 0x293a30 sending from [10.1.1.74]:25174 to [10.1.1.73]:5067 990 bytes over 00TLS722-25174 attempt(1) (If:0) ln(1320):
[2012-10-03 18:20:32,204] 5433 0001

INVITE sip:+14083483531@sba1.vx.net:5067;user=phone SIP/2.0
Allow: INVITE, ACK, CANCEL, BYE, UPDATE, NOTIFY, OPTIONS, REFER, REGISTER
Call-ID: call-4CE51900-0000-0010-0C13-B
Contact: <sip:+15103644064@ux.vx.net:5067;transport=TLS>
Content-Length: 353
Content-Type: application/sdp
CSeq: 1 INVITE
From:  <sip:+15103644064@10.1.1.74:5067;user=phone>;tag=a01014a-85
Max-Forwards: 70
P-Asserted-Identity:  <sip:555@10.1.1.74:5067;user=phone>
Supported: replaces,update,100rel
To:  <sip:+14083483531@sba1.vx.net:5067;user=phone>
User-Agent: NET UX 2.2.0v177 UX
Via: SIP/2.0/TLS 10.1.1.74:5067;branch=z9hG4bK-UX-0a01-014a-02fa

v=0
o=UX 1007 1007 IN IP4 10.1.1.74
s=VoipCall
c=IN IP4 10.1.1.74
t=0 0
m=audio 16432 RTP/SAVP 8 0 101 13
c=IN IP4 10.1.1.74
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000
a=rtpmap:13 CN/8000
a=ptime:20
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:oovkXPxgygyKXpZrX9W4gx9s6z1KQnRnIrk/mNcT|2^31|1:1
a=[2012-10-03 18:20:32,204] 5434 0001
sendrecv

Conditional PAI Modification

By adding a Conditional Rule to the Message Rule, you can perform the manipulation only when it matches a particular condition. In the example below, the PAI would only be modified if the call is from +15103644064.

  1. Add a Conditional Rule Table entry

    Panel
    borderStylenone

    Caption
    0Figure
    1Add Conditional Rule Table Entry

    Image Removed 

  2. Add the Description and set the Match Type from the pulldown. In this case, we're looking to match the calling number, which is represented by the from.uri.userinfo.user token.

    Panel
    borderStylenone

    Caption
    0Figure
    1Add Description and Match Type

    Image Removed

  3. Set the Operation to Equals. Set the Match Value Type to Literal and put the number to be matched into the Match Value.

    Panel
    borderStylenone

    Caption
    0Figure
    1Set Operation

    Image Removed

  4. With the Match information configured, it's time to modify the Message Rule so that it only runs when the Condition is met. In the Message Rule, click the Condition Expression Add/Edit button.

    Panel
    borderStylenone

    Caption
    0Figure
    1Set Static PAI

    Image Removed

  5. Set it for Match All Conditions and select the Conditional Rule you just finished programming in the previous steps. Click Apply.

    Panel
    borderStylenone

    Caption
    0Figure
    1Message Rule Condition

    Image Removed

  6. Click Apply to complete the update to the Message Rule.

    Panel
    borderStylenone

    Caption
    0Figure
    1Update Message Rule

    Image Removed

...

SAVP 8 0 101 13
c=IN IP4 10.1.1.74
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000
a=rtpmap:13 CN/8000
a=ptime:20
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:oovkXPxgygyKXpZrX9W4gx9s6z1KQnRnIrk/mNcT|2^31|1:1
a=[2012-10-03 18:20:32,204] 5434 0001
sendrecv

Conditional PAI Modification

By adding a Conditional Rule to the Message Rule, the manipulation is performed only when it matches a particular condition. In the example below, the PAI would only be modified if the call is from +15103644064.

  1. Add a Conditional Rule Table entry.

  2. Add the Description (i.e., If FROM is =15103644064) and set the Match Type as from.userinfo.user. In this case, we're looking to match the calling number, which is represented by the from.uri.userinfo.user token.

  3. Configure Operation to Equals.

  4. Configure Match Type to Literal and put the number to be matched into the Match Value.

  5. Modify the Message Rule so that it only runs when the Condition is met. In the Message Rule, click the Condition Expression Add/Edit button.

  6. Configure the Message Rule Condition as Match All Conditions and select the newly created Conditional Rule and click Apply.

  7. Apply the changes.



Info

The SIP Header feature cannot generate a new SIP packet. Only arriving or leaving SIP packets changed via the SIP Header function.