hello Sir,
I have not overcome the following problem yet.I want to use "count "
variable to allocate first call to 172.29.9.131:5060
and next to 172.29.9.136:5060 <http://172.29.9.131:5060/> . But all call
are getting forwarded to 172.29.9.131:5060 .Only "else" part of the code
is getting executed.
I used statistic module according to
"http://www.opensips.org/html/docs/modules/devel/statistics".
Code is as follow::
if (is_method("INVITET"))
{
$var(reg_counter) = "count";
#if($stat(count)==1)
if(!$var(reg_counter))
{
forward("172.29.9.131:5060");
update_stat("count", "1");
exit();
}
else
{
forward("172.29.9.136:5060");
#update_stat("count", "1");
reset_stat("count");
exit;
}
if($stat(count))
{
forward("172.29.9.131:5060");
$stat(count) = 0;
exit();
}
else
{
forward("172.29.9.136:5060");
#stat(count) = 1;
exit;
}
}
I am doing it stateless mode and to use global variable to keep track of
number of calls.
Please help me to rectify above code.
Please help me to overcome this problem.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users