[Users] How to use script variables in switch-cases?

Peter Lemenkov lemenkov at gmail.com
Fri May 11 15:38:41 CEST 2007


Hello All!
I want to do something like this (using svn checkout of OpenSER):

switch ($src_ip)
{
  case $var(ip1):
      # do smth
      break;
  case $var(ip2):
      # do smth
      break;
  default:
      # do smth
}

I've got an error message (syntax error).
Is it possible to use variables in such manner at all?
-- 
With best regards!




More information about the Users mailing list