Hello guys,
Is is possible to log the current (function) route? Something like route[WHATEVER]{ xlog("$curroute: Hello World\n"); }
and it would print: WHATEVER: Hello World
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 ᐧ
Hello,
no variable to return route block name, afaik. You can get the cfg line, if that helps in any way for the moment:
- https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#cfg_key_-_conf...
Perhaps it can be added another one to return route name. For now you can set a variable at the beginning of route block and then use that variable in the log messages.
Cheers, Daniel
On 21.06.17 19:00, David Villasmil wrote:
Hello guys,
Is is possible to log the current (function) route? Something like route[WHATEVER]{ xlog("$curroute: Hello World\n"); }
and it would print: WHATEVER: Hello World
Regards,
David Villasmil email: david.villasmil.work@gmail.com mailto:david.villasmil.work@gmail.com phone: +34669448337 ᐧ
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
For the records, I added a new variable in cfg class to return route name for current action whenever it is possible: $cfg(route).
Cheers, Daniel
On 22.06.17 09:15, Daniel-Constantin Mierla wrote:
Hello,
no variable to return route block name, afaik. You can get the cfg line, if that helps in any way for the moment:
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#cfg_key_-_conf...
Perhaps it can be added another one to return route name. For now you can set a variable at the beginning of route block and then use that variable in the log messages.
Cheers, Daniel
On 21.06.17 19:00, David Villasmil wrote:
Hello guys,
Is is possible to log the current (function) route? Something like route[WHATEVER]{ xlog("$curroute: Hello World\n"); }
and it would print: WHATEVER: Hello World
Regards,
David Villasmil email: david.villasmil.work@gmail.com mailto:david.villasmil.work@gmail.com phone: +34669448337 ᐧ
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - www.asipto.com Kamailio World Conference - www.kamailioworld.com
This will make life easier for all! Youre the best, thanks! On Mon, Jun 26, 2017 at 8:39 AM Daniel-Constantin Mierla miconda@gmail.com wrote:
For the records, I added a new variable in cfg class to return route name for current action whenever it is possible: $cfg(route).
Cheers, Daniel
On 22.06.17 09:15, Daniel-Constantin Mierla wrote:
Hello,
no variable to return route block name, afaik. You can get the cfg line, if that helps in any way for the moment:
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#cfg_key_-_conf...
Perhaps it can be added another one to return route name. For now you can set a variable at the beginning of route block and then use that variable in the log messages.
Cheers, Daniel
On 21.06.17 19:00, David Villasmil wrote:
Hello guys,
Is is possible to log the current (function) route? Something like route[WHATEVER]{ xlog("$curroute: Hello World\n"); }
and it would print: WHATEVER: Hello World
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 ᐧ
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - www.asipto.com Kamailio World Conference - www.kamailioworld.com
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - www.asipto.com Kamailio World Conference - www.kamailioworld.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users