The tm modules offers the functions to forward a SIP request in stateful mode, taking cares of retransmissions if the forwarding is done over UDP. The destination address can be set in request URI (via $ru variable) or destination URI (aka outbound proxy address, via $du variable) and then you can just use t_relay(), for example:
$du = "sip:127.0.0.1:5080";
t_relay();
There are couple of alternative functions in tm module for sending out, their name is prefixed with t_relay_. See more about tm module at:
If you want to send out in stateless mode (without taking care of retransmissions and no option to re-route in case of failure), use forward() instead of t_relay() -- this function is exported by the core of Kamailio.