I got your point, we saved after t-relay to send the message faster as db save can cause delay.
We will make the changes as per your suggestion . Thanks
Jijo
On Feb 18, 2011, at 4:11 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,
is any particular reason to do the processing after t_relay() ? You
can do the save before, since it is the same register message.
Also, are you getting this in a testing environment while using
tools like sipp to simulate traffic?
Starting with 3.0, the AVPs (which are associated with the message
and transaction in this case) become available in onreply_route[3]
(in 1.x that was a config option for tm module), so if it is fast
reply, it my happen that the avps are no longer available in the
script after t_relay().
As a recommended rule, it is better to avoid using avps after
t_relay() - this function creates the transaction and forwards the
message. From there on, the avps are in the hands of tm module,
which moves them to onreply_route or failure_route, depending on
your config file.
Cheers,
Daniel
On 2/16/11 4:28 PM, Jijo wrote:
Hi
Daniel,
Please find the code and corresponding error trace.
This happens only for 1 subscriber randomly out of
2000 subscribers. This can be reproduced consistently
also.
if(!is_avp_set("$avp(reg_contact)"))
xlog("L_ERR", "R1 - not set the reg_contact3
F=$fu T=$tu Ct=$ct IP=$si CI=$ci
var_contact:$var(reg_contact)\n");
# relay
if(!t_relay_to("0x3"))
{
xlog("L_ERR", "R1/R10 - Registration failed -
M=$rm F=$fu T=$tu CT=$ct IP=$si CI=$ci\n");
append_to_reply("Warning: 399 $Ri - R1 -
Registration failed: fail in relay in R10.\r\n");
sl_reply_error();
exit;
}
if(!is_avp_set("$avp(reg_contact)"))
xlog("L_ERR", "R1 - not set the
reg_contact4 F=$fu T=$tu Ct=$ct IP=$si CI=$ci
var_contact:$var(reg_contact)\n");
xlog("L_ERR", "R1 - Saving
Registration-2 save to location F=$fu T=$tu Ct=$ct IP=$si
CI=$ci reg_ct:$avp(reg_contact)\n");
if(!isflagset(28)
&& is_avp_set("$avp(reg_contact)")) # Check if we
need to save it in location table
{
if(!save("location","0x02"))
{
xlog("L_ERR", "R1 - Location save for
Registration failed - M=$rm F=$fu T=$tu IP=$si CT=$ct\n");
}
}
On Wed, Feb 16, 2011 at 5:02 AM,
Daniel-Constantin Mierla <miconda@gmail.com>
wrote:
Hello,
it is not clear for me what you tried to do. Can you paste
here the parts of the config file that are relevant for the
case? Do you relay the REGISTER?
Cheers,
Daniel
On 2/16/11 1:17 AM, Jijo wrote:
Hi All,
On register we store the contact in an avp variable
and do a t_relay(). After t_relay() the $avp variable
becomes null.
I printed the value before after t_relay() to
determine this behavior.
This happens only on registration load test around
2000 subcribers with ( 4 REGISTER/sec). This happens
only for one subscriber out of 2000 subscribers.
I did the similar test with $var and its working fine.
Anybody observed similar behavior with avp? This was
working in kamailio 1.4 version. We did the upgrade
recently to 3.1.0 and started observing this issue.