Hello,
I think you can call the start recording function just after
rtpproxy_manage().
If you don't use the start recording function, is the audio going both
ways without problems?
Cheers,
Daniel
On 12/03/2017 15:04, Marko Tirs wrote:
Hello experts,
I'm newbie in Kamailio and have a problem with my 1st installation.
I just want to control the calls between SIP clients registered by Kamailio
and record the conversations.
I installed rtpproxy and started with
rtpproxy -F -s udp:127.0.0.1:7722 -l 192.168.0.13 -r /home/user1/rtpproxy
-d DBUG:LOG_LOCAL0
After start_recording() in the function onreply_route[MANAGE_REPLY]
rtpproxy creates the files <call-id>.rtp and <call-id>.rtcp but they
remain at zero length.
2nd problem is that the media stream is broken in one direction
after start_recording() has been executed, the callee doesn't hear
the caller.
How is the right Kamailio configuration for recording conversations?
Thank you
Regards
Marko
Modified kamailio-basic.cfg partly:
#!KAMAILIO
#!define WITH_NAT
#!ifdef WITH_NAT
loadmodule "nathelper.so"
loadmodule "rtpproxy.so"
#!endif
#!ifdef WITH_NAT
# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock",
"udp:127.0.0.1:7722")
# ----- nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_from",
"sip:pinger@kamailio.org")
# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp",
"$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)
#!endif
####### Routing Logic ########
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
}
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
}
if (is_method("INVITE")) {
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
}
if (!t_relay()) {
sl_reply_error();
}
exit;
}
# RTPProxy control
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
rtpproxy_manage("co");
if (is_request()) {
if (!has_totag()) {
if(t_is_branch_route()) {
add_rr_param(";nat=yes");
}
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
set_contact_alias();
}
}
#!endif
return;
}
# Manage incoming replies
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if (is_method("INVITE") and (status=="200")) {
xlog("START_RECORDING #1\n");
start_recording();
xlog("START_RECORDING #2\n");
}
else if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) -
www.asipto.com
Kamailio World Conference - May 8-10, 2017 -
www.kamailioworld.com