El Monday 23 July 2007 17:50:58 Klaus Darilion escribió:
> if you only want to prevent calls from sip1 to sip2 just compare the
> from domain with the domain in the ruri
>
> if ( $rd != $fd) {
>    sl_send_reply("403","forbidden");
>    exit;
> }


Hi again, let me just improving a little that solution because comparing $rd 
and $fd I had problems with presence.

I think it's better (and it's working perfect for me) to compare $fd and $td.

Note that the parameter:
  modparam("presence","server_address","sip:openser.domain.org")
is the <Contact> header the clients will contact for future subscription, so 
in that cases the $rd will be "openser.domain.org" even if the From: 
is "[EMAIL PROTECTED]" who is subscribing to the presence of a 
To: "[EMAIL PROTECTED]".
In that case $fd = sip1.domain.org and $rd = openser.domain.org, so it will 
fail.
Because of it, IMHO is better to compare $fd with $td.


Just it, regads. :)





-- 
ilimit...


*Iñaki Baz Castillo*
[EMAIL PROTECTED]

ÀREA SISTEMES
0034 937 333 375
VOLTA 1, PIS 5
08224 TERRASSA.BCN

Aquest enviament és confidencial i està destinat únicament a la persona a qui 
s'ha enviat.
Pot contenir informació privada sotmesa al secret professional, la distribució 
de la qual està prohibida per la legislació vigent.

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to