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
languagetext
[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
Tip
titleRelated Articles

Prerequisites

Tip

Requires Sonus 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] 53925400 0001 com.net.ux.sip DEBUG (TransactionProtocolField.cpph:68593) - egressProtocolRepairdebugInfo: Transaction Protocol Repair (Transaction),calling Egress executive(1 item(s) on list)FieldElement:: FieldType(1) Source(<sip:555@10.1.1.74:5067;user=phone>)
[2012-10-03 18:20:32,198199] 53935401 0001 com.net.ux.sip DEBUG (ExecutiveProtocolField.cpph:52211) - RundebugInfo: Protocol EngineFieldElementLiteral::Executive running 1 rules stringLiteral(<sip:555@10.1.1.74:5067;user=phone>)
[2012-10-03 18:20:32,198199] 53945402 0001 com.net.ux.sip TRACEDEBUG (ExecutiveHeaderRule.cpph:58115) - RundebugInfo: Protocol EngineHeaderRule::getting ruleid HeaderRuleType(1)
[2012-10-03 18:20:32,198199] 53955403 0001 com.net.ux.sip TRACEDEBUG (ExecutiveRuleBase.cpph:75123) - RundebugInfo: Processing Message Rule (PAI fixRuleBase:: RuleBaseType(1)  Result(0) Description(test pai) valid(true), Condition Expression(${1})
[2012-10-03 18:20:32,198199] 53965404 0001 com.net.ux.sip TRACE (Executive.cpp:127211) - processMessageRule: Processing Message Rule (1)Header rule
[2012-10-03 18:20:32,198199] 53975405 0001 com.net.ux.sip TRACEDEBUG (Executive.cpp:1252316) - MatchSipMessageRuleprocessHeaderRule: StartLineProcessing fromheader configurationRule (*)From Msg (INVITE sip:+14083483531@sba1.vx.net:5067;user=phone SIP/2.0
test pai)
[2012-10-03 18:20:32,198199] 53985406 0001 com.net.ux.sip DEBUGTRACE (HeaderRuleExecutive.hcpp:231328) - debugInfo: HeaderRuleModifyprocessHeaderRule: Processing header Conditions Count=1
[2012-10-03 18:20:32,198199] 53995407 0001 com.net.ux.sip DEBUGTRACE (HeaderRuleExecutive.hcpp:176640) - debugInfoprocessConditionRules: Condition HeaderRulePayload:: FieldListRule value=1
[2012-10-03 18:20:32,198199] 54005408 0001 com.net.ux.sip DEBUGTRACE (ProtocolFieldExecutive.hcpp:93652) - debugInfoevaluateConditionRuleTruth: FieldElement:: FieldType(1) Source(<sip:555@10.1.1.74:5067;user=phone>)CREId=1
[2012-10-03 18:20:32,199] 54015409 0001 com.net.ux.sip DEBUG (ProtocolFieldConditionRule.h:211121) - debugInfo: FieldElementLiteralConditionRule:: Description: stringLiteral(<sip:555@10.1.1.74:5067;user=phone> test rule AdminState(0) Result(0) Operand(1) valid(true)
[2012-10-03 18:20:32,199] 54025410 0001 com.net.ux.sip DEBUG (HeaderRuleProtocolField.h:11593) - debugInfo: HeaderRuleFieldElement:: HeaderRuleTypeFieldType(1)
[0) Source(header["from",1].uri[1].userinfo.user)
[2012-10-03 18:20:32,199200] 54035411 0001 com.net.ux.sip DEBUG (RuleBaseProtocolField.h:123272) - debugInfo: RuleBaseFieldElementObject:: RuleBaseType(1)Valid  Result(0) Description(test pai) valid(true), Condition Expression(${1})Object Tokens
[2012-10-03 18:20:32,199200] 54045412 0001 com.net.ux.sip TRACEDEBUG (ExecutiveProtocolField.cpph:21193) - processMessageRuledebugInfo: Processing Header ruleFieldElement:: FieldType(1) Source(+15103644064)
[2012-10-03 18:20:32,199200] 54055413 0001 com.net.ux.sip DEBUG (ExecutiveProtocolField.cpph:316211) - processHeaderRuledebugInfo: Processing header Rule (test paiFieldElementLiteral:: stringLiteral(+15103644064)
[2012-10-03 18:20:32,199200] 54065414 0001 com.net.ux.sip TRACE (Executive.cpp:328727) - processHeaderRulebuildField: Building Processingfields headerwith Conditionselement Countcount=1
[2012-10-03 18:20:32,199200] 54075415 0001 com.net.ux.sip TRACE (Executive.cpp:640755) - processConditionRulesbuildField: ConditionBuilding Rulefield value=1literal
[2012-10-03 18:20:32,199200] 54085416 0001 com.net.ux.sip TRACE (ExecutiveSipMessage.cpp:6521311) - evaluateConditionRuleTruth: CREId=1 getObjectValue: name:(3:Header) value:
[2012-10-03 18:20:32,199200] 54095417 0001 com.net.ux.sip DEBUGTRACE (ConditionRuleExecutive.hcpp:121706) - debugInfoevaluateConditionRuleTruth: ConditionRule:: Description: test rule AdminState(0) Result(0) Operand(1) valid(true)
Full CR match=1. oObj=+15103644064, oMatch=+15103644064, oObjLen=12, oMatchLen=12
Code Block
languagetext
[2012-10-03 18:20:32,199200] 54105418 0001 com.net.ux.sip DEBUGTRACE (ProtocolFieldExecutive.hcpp:93336) - debugInfoprocessHeaderRule: FieldElement:: FieldType(0) Source(header["from",1].uri[1].userinfo.user)Condition matched
[2012-10-03 18:20:32,200] 54115419 0001 com.net.ux.sip DEBUGTRACE (ProtocolFieldExecutive.hcpp:272374) - debugInfoprocessHeaderRule: FieldElementObject::Processing ValidRule Object TokensModify
[2012-10-03 18:20:32,200] 54125420 0001 com.net.ux.sip DEBUGTRACE (ProtocolFieldExecutive.hcpp:93727) - debugInfobuildField: FieldElement:: FieldType(1) Source(+15103644064)Building fields with element count=1
[2012-10-03 18:20:32,200] 54135421 0001 com.net.ux.sip DEBUGTRACE (ProtocolFieldExecutive.hcpp:211755) - debugInfobuildField: Building FieldElementLiteral:: stringLiteral(+15103644064)field literal
[2012-10-03 18:20:32,200201] 54145422 0001 com.net.ux.sip TRACE (Executive.cpp:727963) - buildFieldheaderModify: BuildingExecuting fields with element count=1header modify
[2012-10-03 18:20:32,200201] 54155423 0001 com.net.ux.sip TRACE (Executive.cpp:7551297) - buildFieldcheckOrdinalAll: Building field literalObjectToken:: StringIndex(p-asserted-identity) Ordinal(1)
[2012-10-03 18:20:32,200201] 54165424 0001 com.net.ux.sip TRACE (SipMessageExecutive.cpp:1311967) - getObjectValueheaderModify: name:(3:Header) value: modify single ordinal
[2012-10-03 18:20:32,200201] 54175425 0001 com.net.ux.sip TRACE (ExecutiveSipMessage.cpp:7061311) - evaluateConditionRuleTruthgetObjectValue: Full CR match=1. oObj=+15103644064, oMatch=+15103644064, oObjLen=12, oMatchLen=12name:(3:Header) value:
[2012-10-03 18:20:32,200201] 54185426 0001 com.net.ux.sip TRACE (ExecutiveSipMessage.cpp:3361391) - processHeaderRulesetObjectValue: Condition matchedname:(3:Header) value:<sip:555@10.1.1.74:5067;user=phone>
[2012-10-03 18:20:32,200201] 54195427 0001 com.net.ux.sip TRACE (Executive.cpp:374218) - processHeaderRuleprocessMessageRule: ProcessingHeaderRule Rule Modifyexecuted
[2012-10-03 18:20:32,200201] 54205428 0001 com.net.ux.sip TRACE (Executive.cpp:72781) - buildFieldRun: BuildingMessage fieldsRule with(1) element count=1matched at least one message rule
[2012-10-03 18:20:32,200201] 54215429 0001 com.net.ux.sip TRACEDEBUG (ExecutiveTransaction.cpp:755687) - buildFieldegressProtocolRepair: Building field literalTransaction Protocol Repair, out of Egress executive
[2012-10-03 18:20:32,201202] 54225430 0001 com.net.ux.sip TRACEDEBUG (ExecutiveTransportLayer.cpp:9631316) - headerModifystartTransaction: ExecutingSending header modifydata if=0.
[2012-10-03 18:20:32,201203] 54235431 0001 com.net.ux.sip.libctl TRACE (ExecutiveTransportTlsSocket.cpp:12972278) - checkOrdinalAll: ObjectToken:: StringIndex(p-asserted-identity) Ordinal(1) TX application data size: 990 for conn_id: 427 on handle: 0x2200b8, retry: 0, retry attempts: 0
[2012-10-03 18:20:32,201204] 54245432 0001 com.net.ux.sip TRACEDEBUG (ExecutiveTransportLayer.cpp:967538) - headerModify:0x293a30 Headersending modify singlefrom ordinal
[2012-10-03 18:20:32,201] 5425 0001 com.net.ux.sip TRACE (SipMessage.cpp:1311) - getObjectValue: name:(3:Header) value:
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,201204] 54265433 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

Important Notes


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>
Code Block
languagetext
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 

Pagebreak

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.

Pagebreak