[OpenSIPS-Users] Python functions
Hi lads and ladies, I'm working on a python script called via python_exec, but I can't see any function to do debug logs, except LM_ERR. I tried msg.call_function('log', str("test")) or msg.call_function('xlog', str("test")) but I always get this error: ERROR:python:opensips_LM_ERR: 37, SystemError, returned a result with an error set How should this be done? Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] registration status using mid_registrar
Perfect Thank you Andrei On Mon, Mar 21, 2022 at 8:43 PM Alexey Kazantsev via Users < users@lists.opensips.org> wrote: > Hi, > > what if to try to use some custom t_on_reply route ? > Something like this: > > > if (is__method("REGISTER")) { > xlog("L_INFO", "forwarding REGISTER to main registrar...\n"); > $ru = "sip:10.0.0.3:5070"; > t_on_reply("main_reg_replies"); > > if (!t_relay()) { > send_reply(500, "Server Internal Error 1"); > } > > … > } > > … > > onreply_route[main_reg_replies] { > xlog("reply status: $rs\n"); > } > > --- > BR, Alexey > https://alexeyka.zantsev.com/ > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] registration status using mid_registrar
Hi, what if to try to use some custom t_on_reply route ? Something like this: if (is__method("REGISTER")) { xlog("L_INFO", "forwarding REGISTER to main registrar...\n"); $ru = "sip: 10.0.0.3:5070 "; t_on_reply("main_reg_replies"); if (!t_relay()) { send_reply(500, "Server Internal Error 1"); } … } … onreply_route[main_reg_replies] { xlog("reply status: $rs\n"); } --- BR, Alexey https://alexeyka.zantsev.com/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] registration status using mid_registrar
Hi, I'm trying to implement Opensips with mid_registrar module in front of Asterisk from manual: if (is_method("REGISTER")) { mid_registrar_save("location"); switch ($retcode) { case 1: xlog("L_INFO", "forwarding REGISTER to main registrar...\n"); $ru = "sip:10.0.0.3:5070"; if (!t_relay()) { send_reply(500, "Server Internal Error 1"); } break; case 2: xlog("L_INFO", "REGISTER has been absorbed!\n"); break; default: xlog("L_ERR", "mid-registrar error!\n"); send_reply(500, "Server Internal Error 2"); } exit; } Is there any way to check the status for REGISTER messages from main registrar? thank you Andrei ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] SQL Cacher full caching auto reload specific key
Hi I use SQL Cacher in full caching mode. when the database changes I want to automatically reload that specific key. What is your suggestions for this? With Mariadb trigger I cannot use system commands to reload that specific key. Only way is using pooling method of changed records and use sql_cacher_reload ? Regards Shirazi ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users