0

I'm using Kamailio as a SIP server, and I want to forward the SIP message to a C++ application. I've been looking at SIP modules to do this but the documentation is not completely clear and there aren't many examples online.

If anyone could point me in the right direction in terms of modules to use or how to go about this problem, I'd be grateful. Thank you.

1 Answers1

0

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.

miconda
  • 1,754
  • 11
  • 14