Thank you @miconda , unfortunately there is bug that I couldnt catch.
6 days ago I have implemented same way in my repository:
https://github.com/adubovikov/kamailio/commit/ae15a717e9a5849b4ac295c5864cd6...
but your and my patches makes same results:
/usr/sbin/kamailio[1260]: ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (6/SL) this is after execution of event route. I have tested/removed some code and found that this happens once you call " fmsg = faked_msg_next();"
also in your patch:
https://github.com/kamailio/kamailio/commit/f7d1d234a42198fc10e40c33e92cff5e...
should be: if(_th_eventrt_outgoing<0 **&&** keng==NULL) {
any suggestions got to avoid this SL error ?
Wbr, Alexandr