[Kamailio-Devel] t_relay

Henning Westerholt henning.westerholt at 1und1.de
Mon Sep 15 10:50:56 CEST 2008


On Thursday 11 September 2008, Jason Penton wrote:
> AFAIK t_relay only accepts literals, like,
> t_relay("udp:xxx.xxx.xxx.xxx:5060").
>
> Would it not be better (more flexible) that t_relay could take an AVP for
> the host part so that it can be generically configured from DB, or alike?
>
> I am happy to submit a patch.

Hi Jason,

one reason that t_relay accept only literals is that this parameter can be 
fixed during the server startup to a "proxy" struct from the
"fixup_phostport2proxy" function. This parameter can be evaluated on runtime 
without that much overhead. If you want to replace this with an AVP, it will 
be printed and converted to a proxy for every invocation of t_relay. 

If you want to relay a message to a changing target, normally you just rewrite 
the URI and call t_relay without the destination parameter, as you surely 
know. Do you have another requirement that can't be achived this way?

If you need this functionality, and implement it in a way that don't break the 
existing t_relay, i'd would welcome a patch that change this.

Cheers,

Henning



More information about the Devel mailing list