[Kamailio-Users] $rr and $rr are null

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 20 11:54:19 CEST 2008



On 10/20/08 12:39, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>  > is this in a failure_route? If yes, there is processed the initial 
>  > request, so the script variable work on it, not on the reply.
>
> yes, the test was in failure route.  i don't quite understand, why there
> is script variables that refer to reply items if they are processed on
> request and not on reply.  how could they ever work?
>   
they return null as there is no status or reason in a request. It is 
same from 2003 IIRC when xlog() was introduced and used these variables.

Probably tm module can be enhanced to get these details in the script. 
t_check_status() has the functionality of checking the reply status code 
for that transaction, more or less same mechanism can be used to make 
the status available in a pseudo-variable. Or maybe moving $rr and $rs 
in tm is an option, but makes them unavailable for stateless processing 
and onreply_route[0], so might not be a good approach.

Cheers,
Daniel


-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list