all
how to record a media of rtp session into a file? and I search a function-rtpproxy_start_recording() in the rtpproxy module,but how to use it.
all
how to record a media of rtp session into a file? and I search a function-rtpproxy_start_recording() in the rtpproxy module,but how to use it.
To start recording you should just call rtpproxy_start_recording
function in your config file as described in RTPproxy module opensips documentation. But you should take in mind that this func could be called only when when new request/reply received:
This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE.
For instance:
route {
# just forward all in-dialog requests
if (has_totag()) {
t_relay();
exit;
}
if (is_method("INVITE")) {
t_on_reply("MANAGE_INVITE_REPLY");
}
t_relay();
}
onreply_route[MANAGE_INVITE_REPLY] {
if (status=="200") {
rtpproxy_start_recording();
}
}
That's just sketch,rtpproxy managing is omitted for simplification.