[Serusers] uri==myself check and record_route()

Jan Janak jan at iptel.org
Wed Oct 22 21:11:47 CEST 2003


On 22-10 21:50, Maxim Sobolev wrote:
> Folks,
> 
> I am correct that it is impossible to use uri==myself check along with 
> record_route()? That is, consider the following situation:
> 
> UA1->SER (with record_route())->UA2
> 
> UA1 sends INVITE to SER:
> 
> INVITE sip:ua2 at ser.ip
> Contact: <sip:ua1 at ua1.ip>
> 
> After processing SER resends it to UA2:
> 
> INVITE sip:ua2 at ua2.ip
> Record-Route: <sip:ua2 at ser.ip;lr>
> Contact: <sip:ua1 at ua1.ip>
> 
> Then, if UA2 wishes to terminate session it sends the following BYE to 
> the SER:
> 
> BYE sip:ua1 at ua1.ip
> Route: <sip:ua2 at ser.ip;lr>
> Contact: <sip:ua2 at ua2.ip>
> 
> Therefore if there any
> 
> if (!(uri==myself)) {
>   sl_send_reply("500", "example serves only my domain");
>   break;
> };
> 
> checks in the SER, it will reply with 500 to UA2, not allowing 
> transaction to go through.

  That is correct. Mid-dialog requests (like BYE) must not be processed
  in the if (uri==myself) section, you just need to relay them.

  The problem in your config file is that you reject anything that
  doesn't match (uri==myself), you should just t_relay such messages
  (yes I know it creates open relay).

  Determining what should be relayed and what not in this case is
  another story (since you probably doesn't want to be open relay).
  (Digest authentication doesn't help here much).
  
    Jan.




More information about the sr-users mailing list