Indeed, that condition should be with &&.
Is the next fake msg null, or what is failing there? Can you see what is the return code for t_relay? I guess the slow error is because of sl_send_error () in kamaulio.cfg. I am traveling, no much testing that I can do.