One more reason for string after t_relay is, If t_relay failed then we don't
need to save in the location table.
Thanks
Jijo
On Sun, Feb 20, 2011 at 12:53 PM, Jijo <realjijo(a)gmail.com> wrote:
Yes this happens in a testing environment..
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(a)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.
route(1)
{
:
:
:
# -----------------------------------------------------------------
# Registration handling dynamic endpoints
# -----------------------------------------------------------------
$avp(reg_contact)= $ct;
$var(reg_contact)= $ct;
t_on_reply("3");
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");
}
}
LOGS for the error condtion.
2011-02-15T12:19:30-05:00 [err] sipserver: ERROR: <script>: R1 - not set
the reg_contact4 F=sip:5614510478@10.235.86.54:5060;transport=UDP T=
sip:5614510478@10.235.86.54:5060;transport=UDP Ct=<
sip:5614510478@10.235.204.5:5060> IP=10.235.204.5
CI=119ac328-4cceb0a-13c4-7fa55-76a2903a-7fa55 var_contact:<
sip:5614510478@10.235.204.5:5060>
2011-02-15T12:19:30-05:00 [err] sipserver: ERROR: <script>: R1 - Saving
Registration-2 save to location F=
sip:5614510478@10.235.86.54:5060;transport=UDP T=
sip:5614510478@10.235.86.54:5060;transport=UDP Ct=<
sip:5614510478@10.235.204.5:5060> IP=10.235.204.5
CI=119ac328-4cceb0a-13c4-7fa55-76a2903a-7fa55 reg_ct:<null>
On Wed, Feb 16, 2011 at 5:02 AM, Daniel-Constantin Mierla <<miconda(a)gmail.com>
miconda(a)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.
How do we debug this issue.?
Thanks
Jijo
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<sr-users@lists.sip-router.org>sr-users@lists.sip-router.org
<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla <http://www.asipto.com>http://www.asipto.com
--
Daniel-Constantin Mierla <http://www.asipto.com>http://www.asipto.com