Forum Discussion

Ken_Wong_48678's avatar
Ken_Wong_48678
Historic F5 Account
Sep 04, 2008

SIP via header modification

Hi,

 

 

my customers have a requirement to modify SIP via header, they want to insert the SIP client ip and port into the via header.

 

 

when CLIENT_ACCEPTED {

 

set ::clientip [IP::client_addr]

 

set ::clientport [UDP::remote_port]

 

}

 

 

when SIP_REQUEST_SEND {

 

SIP::header insert "Via" "[lindex [split [SIP::via 1] ";"] 0];received=$::clientip;rport=$::clientport;[lindex [split [SIP::via 1] ";"] 2]" 1

 

SIP::header remove "Via" 2

 

}

 

 

The above irule seems work but finally I find out the variable cannot be updated even another client ip connect to the virtual. I think it may be related to the variable but it cannot be retrieved in SIP_REQUEST_SEND event if I don't use global variable.

 

 

Is there any idea that I can get the client ip and port but don’t need to use global variable? Thanks!

 

 

Regards,

 

Ken

18 Replies