Hello,
cannot test it for now personally, but what you get if you do:
route(TEST_ROUTE_MINUS_ONE);
$var(r) = $rc;
xlog("returned code by route minus one is: $var(r)\n");
Maybe this will give some leads I can follow in the code...
Cheers,
Daniel
On 12/10/11 3:16 PM, Juha Heinanen wrote:
i have defined two routes:
route [TEST_ROUTE_MINUS_ONE] {
return (-1);
}
route [TEST_ROUTE_PLUS_ONE] {
return (1);
}
and then test them with these statements:
if (route(TEST_ROUTE_MINUS_ONE) == -1) {
xlog("L_INFO", "TEST_ROUTE returned -1\n");
}
if (!route(TEST_ROUTE_MINUS_ONE)) {
xlog("L_INFO", "TEST_ROUTE returned failure\n");
}
if (route(TEST_ROUTE_PLUS_ONE) == 1) {
xlog("L_INFO", "TEST_ROUTE returned 1\n");
}
if (route(TEST_ROUTE_PLUS_ONE)) {
xlog("L_INFO", "TEST_ROUTE returned success\n");
}
can someone explain, why i get only three lines to syslog?
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_MINUS_ONE returned
failure
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_PLUS_ONE returned 1
Dec 10 16:14:56 sip /usr/sbin/sip-proxy[16099]: INFO: TEST_ROUTE_PLUS_ONE returned
success
-- juha
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
http://www.asipto.com
http://linkedin.com/in/miconda --
http://twitter.com/miconda