Forum Discussion
eooyc_209394
Nimbostratus
Jul 02, 2015irule for SIP forward
we have an irule to forward SIP
rule SIP-forward {
when SIP_REQUEST_SEND {
SIP::header insert "Record-Route" ""
}
when SIP_RESPONSE_SEND {
if { [SIP::header "Record-Route"] ne "" }{
SIP::header remov...
VernonWells
Employee
Jul 06, 2015I tested this and it works (the way I expect, at least). Here is an example tmsh command for creating the Data Group:
tmsh create ltm data-group internal dg-route-blocks-to-remove \
type ip records add { 10.10.210.0/24 { } 192.168.5.0/25 { } }
Naturally, you would substitute your own set of netblocks.
Do keep in mind that this mechanism will always move the Route header to the end of the message header set (in 11.6, using the SIP::header replace method avoids this).
As an example, using the Data Group definition above, I sent the following SIP Request through a Virtual Server with the iRule above attached:
REGISTER sips:ss2.biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashd92
From: Bob ;tag=ja743ks76zlflH
To: Bob
Call-ID: [email protected]
CSeq: 2 REGISTER
Route: ,,,
Content-Length: 0
and this is the message that arrives at the Pool Member:
REGISTER sips:ss2.biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashd92
From: Bob ;tag=ja743ks76zlflH
To: Bob
Call-ID: [email protected]
CSeq: 2 REGISTER
Content-Length: 0
Route: ,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects