Greetings. Sorry for previous false letter.
I want to check if user is registered before reply is routed to its target user agent.
Imho it should be like this:
onreply_route[MANAGE_REPLY] { if ($rm=="INVITE") { if (registered("location", $ru)) { # Do job - pause for 15 seconds and give chance to reregister } } }
But kamailio complains on registered function 0(6274) ERROR: <core> [cfg.y:3295]: yyparse(): misused command registered 0(6274) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 1121, column 35: Command cannot be used in the block
Documentation confirms - registered() function can be used in REQUEST_ROUTE and FAILURE_ROUTE only.
Is it possible to check if user is registered when reply is processed in scripts?
Thank you!