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

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 29 18:54:20 CET 2008


The protocol was not writable by itself alone, the option is to 
add/change the transport parameter to uri -- using subst_uri() or config 
operations, e.g.,

$ru = $ru+";transport=tcp";

Cheers,
Daniel




On 02/29/08 19:18, Iñaki Baz Castillo wrote:
> 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.
>
>
>   




More information about the Users mailing list