[OpenSER-Users] loose_route() and t_relay(proto:host:port, [flags])

Anatoly Pidruchny apidruchny at newxt.com
Mon Jun 9 19:19:21 CEST 2008


Hi All,

I have something like this in my script:

  ...
  if (loose_route())
  {
    ...
    t_relay("udp:mydomain2.com");
    ...
  }
  ...

The idea is that the initial INVITE message can be relayed to one 
destination (mydomain1.com). But later, for the BYE message, if that 
destination becomes unavailable and we know about that, then we send the 
message to mydomain2.com. The problem is that it does not work that way. 
Even if mydomain2.com is passed to t_relay, the message is still sent to 
mydomain1.com. It looks like the parameter is ignored when loose routing 
is done. Is it a bug or a feature? If it is a feature, then the 
documentation for the t_relay function should mention that the parameter 
is ignored when loose routing is done.

Another question is, how to make it send the message to mydomain2.com? 
Do I have to modify the message (like, modify the Route header)?

Thanks,

--------
Anatoly.





More information about the Users mailing list