Stephane_Deshai
Sep 11, 2012Nimbostratus
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