In this section:

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.

Setting the number listed in the Request URI (RURI) from the number in the TO header.

This document details how to change the incoming RURI number using the TO header number. This solution was originally generated to eliminate a problem from an incoming INVITE.

RURI

You can see that the number on the RURI is not a number at all, but an IP address.

Below is the process for changing the user (e.g. number) portion of the RURI.

Configure the SBC1000/2000 for Header Manipulation

For detailed instructions on adding a Message Manipulation entry or Signaling Group, refer to SIP Message Manipulation Overview and Creating and Modifying SIP Signaling Groups.

  1. Select Message Manipulation > Message Rule Tables in the navigation tree.

    SIP Message Rule Table

  2. Add a SIP Message Rule Table (i.e., Set RURI from TO Header).

    Create Message Rule Table

  3. Access the "Set RURI from TO Header" message table. Configure how the rule will be applied (apply to All SIP Messages, only Requests, only Responses, or Selected Messages). Since the Request URI only appears in a SIP Request, select Create Rule > Request Line Rule for Header Manipulation.

    Add Request

  4. Add an entry to the new table (i.e., Set RURI number from TO number). Configure the lower levels of header matching. Enter the following Request Line Values:

    1. Method URI: Ignore

    2. URI Scheme: Ignore

    3. URI Host: Ignore
    4. URI Port: Ignore

    Create SIP Request Line Rule

  5. Set URI User Info to Modify and click the Add/Edit button.

    Set URI User

  6. Set the Type of Value to Token and the Value to to.uri.userinfo.user (selected from the pop-up box generated by clicking the arrow to the right of the field). Configure the Request URI from the number listed in the TO header (userinfo.user=number).

    Edit Message Field

  7. Click OK.

  8. Add the new rule to the incoming Signaling Group.

    Add new Rule

Debugging Output

In the debugging output below, the RURI Header Manipulation rule was modified to take the number from the FROM header, not the TO header so that it would be easier to follow the header manipulation function in the debug.

 INVITE sip:14083489775@10.1.1.74 SIP/2.0
 Via: SIP/2.0/UDP 10.1.1.90:53770;branch=z9hG4bK-d87543-a30cd0225701a76e-1--d87543-;rport
 Max-Forwards: 70
 Contact: <sip:444@10.1.1.90:53770>
 To: "14083489775"<sip:14083489775@10.1.1.74>
 From: "test"<sip:444@10.1.1.74>;tag=f80e8e32
 Call-ID: YmM2NWZkNTA5ZTcwYWE5NzQyYTZiMDE4NTk1NmU5NWI.
 CSeq: 1 INVITE
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
 Content-Type: application/sdp
 User-Agent: eyeBeam release 1011w stamp 41324
 Content-Length: 511
...
 [2012-10-30 10:56:47,158] 4563 000d com.net.ux.sip DEBUG (Executive.cpp:52) - Run: Protocol Engine::Executive running 1 rules
 [2012-10-30 10:56:47,158] 4564 000c com.net.ux.sip TRACE (Executive.cpp:58) - Run: Protocol Engine::getting ruleid (1)
 [2012-10-30 10:56:47,158] 4565 000b com.net.ux.sip TRACE (Executive.cpp:75) - Run: Processing Message Rule (test1)
 [2012-10-30 10:56:47,158] 4566 000a com.net.ux.sip TRACE (Executive.cpp:127) - processMessageRule: Processing Message Rule (1)
 [2012-10-30 10:56:47,158] 4567 0009 com.net.ux.sip TRACE (Executive.cpp:1252) - MatchSipMessageRule: StartLine from configuration (*)From Msg (INVITE sip:14083489775@10.1.1.74 SIP/2.0)
 [2012-10-30 10:56:47,158] 4568 0008 com.net.ux.sip DEBUG (HeaderRule.h:912) - debugInfo: HeaderRuleFieldModify
 [2012-10-30 10:56:47,158] 4569 0007 com.net.ux.sip DEBUG (HeaderRule.h:798) - debugInfo: HeaderRuleFieldChange mReplacement
 [2012-10-30 10:56:47,158] 4570 0006 com.net.ux.sip DEBUG (ProtocolField.h:93) - debugInfo: FieldElement:: FieldType(0) Source(header["from",1].uri[1].userinfo.user)
 [2012-10-30 10:56:47,158] 4571 0005 com.net.ux.sip DEBUG (ProtocolField.h:272) - debugInfo: FieldElementObject:: Valid Object Tokens
 [2012-10-30 10:56:47,158] 4572 0004 com.net.ux.sip DEBUG (HeaderRule.h:679) - debugInfo: HeaderRuleField:: Element
 [2012-10-30 10:56:47,158] 4573 0003 com.net.ux.sip DEBUG (ProtocolField.h:93) - debugInfo: FieldElement:: FieldType(0) Source(requestline.uri.userinfo.user)
 [2012-10-30 10:56:47,159] 4574 0002 com.net.ux.sip DEBUG (ProtocolField.h:272) - debugInfo: FieldElementObject:: Valid Object Tokens
 [2012-10-30 10:56:47,159] 4575 0001 com.net.ux.sip DEBUG (HeaderRule.h:115) - debugInfo: HeaderRule:: HeaderRuleType(1)
 [2012-10-30 10:56:47,160] 4576 0001 com.net.ux.sip DEBUG (RuleBase.h:123) - debugInfo: RuleBase:: RuleBaseType(1) Result(1) Description(testruri) valid(true), Condition Expression(No conditions for this header rule) 
 [2012-10-30 10:56:47,160] 4577 0001 com.net.ux.sip TRACE (Executive.cpp:211) - processMessageRule: Processing Header rule
 [2012-10-30 10:56:47,160] 4578 0001 com.net.ux.sip DEBUG (Executive.cpp:316) - processHeaderRule: Processing header Rule (testruri)
 [2012-10-30 10:56:47,160] 4579 0001 com.net.ux.sip TRACE (Executive.cpp:489) - processHeaderRule: Processing Rule Field Modify
 [2012-10-30 10:56:47,160] 4580 0001 com.net.ux.sip TRACE (Executive.cpp:727) - buildField: Building fields with element count=1
 [2012-10-30 10:56:47,160] 4581 0001 com.net.ux.sip TRACE (Executive.cpp:736) - buildField: Building field object
 [2012-10-30 10:56:47,160] 4582 0001 com.net.ux.sip TRACE (SipMessage.cpp:1311) - getObjectValue: name:(3:Header) value:
 [2012-10-30 10:56:47,161] 4583 0001 com.net.ux.sip TRACE (Executive.cpp:1161) - headerFieldModify: Executing header field modify, replacement=444
 [2012-10-30 10:56:47,161] 4584 0001 com.net.ux.sip TRACE (Executive.cpp:1165) - headerFieldModify: Header field modify single ordinal
 [2012-10-30 10:56:47,161] 4585 0001 com.net.ux.sip TRACE (SipMessage.cpp:1311) - getObjectValue: name:(1:RequestLine) value:
 [2012-10-30 10:56:47,161] 4586 0001 com.net.ux.sip TRACE (SipMessage.cpp:1391) - setObjectValue: name:(1:RequestLine) value:444
 [2012-10-30 10:56:47,161] 4587 0001 com.net.ux.sip TRACE (Executive.cpp:218) - processMessageRule: HeaderRule executed
 [2012-10-30 10:56:47,161] 4588 0001 com.net.ux.sip TRACE (Executive.cpp:81) - Run: Message Rule (1) matched at least one message rule
 [2012-10-30 10:56:47,161] 4589 0001 com.net.ux.sip DEBUG (sipSignalingGroup.cpp:794) - {SG(3) 0x2476b8} ProcessTransportMessage: Protocol Repair, out of Ingress executive
...
[2012-10-30 10:56:47,237] 4966 000d com.net.ux.route INFO (callrouter.cpp:2280) - Using table sba: SIP to ISDN (3) to route call.
 [2012-10-30 10:56:47,237] 4967 000c com.net.ux.route INFO (callrouter.cpp:2458) - Rule sba: To Internal Ext. (3.1(2)) skipped due to route disabled.
 [2012-10-30 10:56:47,237] 4968 000b com.net.ux.route DEBUG (translation.cpp:1295) - Performing OPTIONAL transformation using entry Subscriber Access # from PSTN (5.1(1)).
 [2012-10-30 10:56:47,237] 4969 000a com.net.ux.route DEBUG (translation.cpp:634) - Failed regex match of "tfCalledNumber" field for "(+14083483539)" (updated "(+14083483539)") with input of "444"
 [2012-10-30 10:56:47,237] 4970 0009 com.net.ux.route DEBUG (translation.cpp:1295) - Performing OPTIONAL transformation using entry EUM SA 302 route (5.2(2)).
 [2012-10-30 10:56:47,237] 4971 0008 com.net.ux.route DEBUG (translation.cpp:634) - Failed regex match of "tfCalledNumber" field for "3539" (updated "3539") with input of "444"
 [2012-10-30 10:56:47,238] 4972 0007 com.net.ux.route INFO (callrouter.cpp:2458) - Rule Static Routing (3.3(12)) skipped due to route disabled.
 [2012-10-30 10:56:47,238] 4973 0006 com.net.ux.route DEBUG (translation.cpp:1295) - Performing MANDATORY transformation using entry sba: Full Num. to Ext. (Called) (23.1(1)).
 [2012-10-30 10:56:47,238] 4974 0005 com.net.ux.route DEBUG (translation.cpp:634) - Failed regex match of "tfCalledNumber" field for "+.(\d{4})" (updated "+.(\d{4})") with input of "444"

Important Notes

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

Care must be exercised when modifying incoming SIP packets, especially with respects to the TO, FROM and RURI headers. Modifying tags, IDs or any other items that define the dialogue or transactions, will likely cause calls to not complete.

  • No labels