[OpenSER-Users] Why $rP is not writeable?

Iñaki Baz Castillo ibc at in.ilimit.es
Fri Feb 29 18:18:47 CET 2008


Hi, sometimes I need to forward a message to a SIP UAS that just speaks UDP 
(for example a PSTN gateway), so if I recevie an INVITE from a TCP client I 
must use:

   t_relay("udp:gateway:5060")

since the following would fail:

  $rd = "gateway";
  t_relay();

The problem is that this second approach is more flexible and it can be used 
in block routes, being them independent fo the final destination (set 
prevously with asignements like "$rd = gateway").


A solution for this could be allow $rP:

  $rP - reference to transport protocol of R-URI

so I could do:

  $rP = "UDP";
  $rd = "gateway";
  t_relay();

But unfortunatelly $rP is no writeable:
  http://www.openser.org/dokuwiki/doku.php/core-cookbook:1.3.x#assignment


Another solution could be if "force_send_socket" function would allow setting 
**just** the protocol type, but it doesn't allow it.


So there is no solution excepting making dirty the script and setting all the 
destination (protocol:ip:port) using "t_relay(protocol:ip:port)".


Why $rP is no writeable?

Thanks.


-- 
Iñaki Baz Castillo
ibc at in.ilimit.es




More information about the Users mailing list