Since updating to 5.6, Kamailio segfaults when calling `get_redirects("1")`.
``` #0 0x000055d12c93c527 in get_str_fparam (dst=dst@entry=0x7ffd246edfe0, msg=msg@entry=0x7f83973b6a80, param=0x0) at core/sr_module.c:1646 val = {n = 1, s = {s = 0x1 <error: Cannot access memory at address 0x1>, len = 749136082}, re = 0x1} ret = <optimized out> avp = <optimized out> pv_val = {rs = {s = 0x1 <error: Cannot access memory at address 0x1>, len = 749136082}, ri = 1, flags = 0} __func__ = "get_str_fparam" #1 0x00007f838d2f0a17 in w_get_redirect2 (msg=0x7f83973b6a80, max_c=0x0, reason=<optimized out>) at uac_redirect.c:337 n = <optimized out> max = <optimized out> sreason = {s = 0x1a <error: Cannot access memory at address 0x1a>, len = -828131391} __func__ = "w_get_redirect2" #2 0x000055d12c975624 in do_action (h=h@entry=0x7ffd246ee820, a=a@entry=0x7f83cedd3670, msg=msg@entry=0x7f83973b6a80) at core/action.c:1085 ret = <optimized out> v = <optimized out> ... ```
Reverting a0ef1ccd1736 fixes the issue completely.
I am still getting the same error in the latest version. @gaaf did the commit solve your problem?
@gaaf Thanks. It seems that a0ef1ccd1 needs some more fixes. Its "only" a refactoring, but the previous way how the module work was using a non-standard way. The module should keep working, of course.
I pushed a commit for it, referenced above. It will be backported. If still an issue with it, reopen.
Closed #3197 as completed.