[OpenSER-Users] How to compare $si with $dr
    Richard Bennett 
    richard.bennett at skynet.be
       
    Tue Oct 30 15:45:51 CET 2007
    
    
  
Hi,
I am trying to compare the values of 'IP source address' ($si) and   
'Domain in SIP Request's URI' ($rd) to see if they match in Openser 1.1.
Probably I have missed the relevant documentation, I checked  
http://www.openser.org/dokuwiki/doku.php/pseudovariables:1.1.x and  
http://www.openser.org/dokuwiki/doku.php/core-cookbook:1.1.x .
Basically I'd like to do this:
if($si == $rd){
	#do something
}
but that gives a syntax error.
I also tried this:
if(src_ip==$rd){
}
but it seems the pseudo variable isn't being expanded before the  
evaluation, as I don't get a match even though debugging shows $si and $rd  
to be the same.
Also, is there anyway to pass a pseudo variable to rewritehost() or an  
equivalent function?
Thanks for any pointers,
Richard
    
    
More information about the Users
mailing list