Forum Discussion
Change IP in a SIP INVITE
I'm managed to change the IP in a SIP INVITE with this iRule :
when SIP_REQUEST {
if {[SIP::method] == "INVITE" && [SIP::uri] contains "10.215.186.38" }{
eval [LB::select]
set ipSelected [string map "10.215.186.38 [LB::server addr]" [SIP::uri]]
set ipSelected2 [string map {"%10" ""} [SIP::uri]]
}
}
But the problem that I have is that my LB::server addr is in a specific route domain and the IP finish with %10 so I have to remove the %10 in the SIP::uri. ex.: sip:94167127070@10.215.184.71%10:5060.
Can someone hep me ?
Thanks
- hooleylistCirrostratusHi Stephane,
- Stephane_DeshaiNimbostratusThank you ! but something doesnt work here the change I made .. :
- hooleylistCirrostratusAlso, is it possible that each time a make a change in an iRule that I have remove the iRule from the VS and put it back ?
No, but the iRule won't take effect for existing connections (by design). You could manually clear the connection for your client using 'tmsh delete sys conn cs-client-addr 1.1.1.1'
If you're trying to replace the IP%RD with the server address in the SIP URI you could try this:when SIP_REQUEST { if {[SIP::method] eq "INVITE" && [SIP::uri] contains "10.215.186.38" }{ Force a pool member selection eval [LB::select] Rewrite the destination to the server IP Ex SIP URI: sip:94167127070@10.215.184.71%10:5060 SIP::uri [string map "10.215.184.71%10 [LB::server addr]" [SIP::uri]] } }
Aaron
Recent Discussions
Related Content
* 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