In this section:
Guidelines for SMM are as follows:
The SMM feature is enabled on a Signaling Group and is used to change an incoming or outgoing SIP Message.
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.
For configuration details, refer to SIP Message Manipulation Overview.
Select the new Message Manipulation entry in the navigation tree (Setting >Message Manipulation).
Add a SIP Message Rule Table.
Configure how the rule will be applied (i.e., All SIP Messages, only Requests, only Responses, or Selected Messages).
Add an entry to the new table.
Set the Header Action to Modify and the Header Name to P-Asserted-Identity.
To set the new PAI value, click Add/Edit.
In the Edit Message text box, enter a value in the Value field.
Click OK.
In the Signaling Group, enable Message Manipulation.
Add the new Message Manipulation to the Outbound Message Manipulation Table.
In the debugging output below, you can see the PAI change from +15103644064 to 555
[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
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.
Add a Conditional Rule Table entry.
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.
Configure Operation to Equals.
Configure Match Type to Literal and put the number to be matched into the Match Value.
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.
Configure the Message Rule Condition as Match All Conditions and select the newly created Conditional Rule and click Apply.
Apply the changes.
The SIP Header feature cannot generate a new SIP packet. Only arriving or leaving SIP packets changed via the SIP Header function.