Hi Vikram
Yes, SIP messages are being proxied, otherwise the call wouldn't be possible.
Here are the SIP messages that are being proxied in case this helps to debug my problem
interface: eth1 (192.168.34.1/255.255.255.240)
filter: (ip or ip6) and ( port 5060 )
U 192.168.34.1:5060 -> 192.168.128.61:5060
INVITE sip:0315080190@192.168.128.61 SIP/2.0.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
Via: SIP/2.0/UDP 192.168.34.1;branch=z9hG4bK2838.f3a91403.0.
Via: SIP/2.0/UDP 195.176.213.123:5060;rport=5060;branch=z9hG4bK-a6818ce1.
From: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
To: <sip:0315080190@192.168.35.36>.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 101 INVITE.
Max-Forwards: 69.
Contact: "0315080180" <sip:0315080180@195.176.213.123:5060>.
Expires: 240.
User-Agent: Sipura/SPA921-4.1.10(b).
Content-Length: 403.
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER.
Content-Type: application/sdp.
.
v=0.
o=- 1956263 1956263 IN IP4 195.176.213.123.
s=-.
c=IN IP4 195.176.213.123.
t=0 0.
m=audio 16386 RTP/AVP 0 2 4 8 18 96 97 98 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:2 G726-32/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729a/8000.
a=rtpmap:96 G726-40/8000.
a=rtpmap:97 G726-24/8000.
a=rtpmap:98 G726-16/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:30.
a=sendrecv.
U 192.168.128.61:5060 -> 192.168.34.1:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.34.1;branch=z9hG4bK2838.f3a91403.0;received=192.168.34.1.
Via: SIP/2.0/UDP 195.176.213.123:5060;rport=5060;branch=z9hG4bK-a6818ce1.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
From: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
To: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 101 INVITE.
User-Agent: Netstream VoIP Gateway.
Contact: <sip:gw01@192.168.128.61:5060>.
.
U 192.168.128.61:5060 -> 192.168.34.1:5060
SIP/2.0 183 Session Progress.
Via: SIP/2.0/UDP 192.168.34.1;branch=z9hG4bK2838.f3a91403.0;received=192.168.34.1.
Via: SIP/2.0/UDP 195.176.213.123:5060;rport=5060;branch=z9hG4bK-a6818ce1.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
From: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
To: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 101 INVITE.
User-Agent: Netstream VoIP Gateway.
Contact: <sip:gw01@192.168.128.61:5060>.
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,INFO,REFER,SUBSCRIBE.
Content-Type: application/sdp.
Content-Length: 186.
.
v=0.
o=- 227934408367722 1 IN IP4 192.168.128.61.
s=-.
c=IN IP4 192.168.128.61.
t=0 0.
m=audio 23984 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
U 192.168.128.61:5060 -> 192.168.34.1:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.34.1;branch=z9hG4bK2838.f3a91403.0;received=192.168.34.1.
Via: SIP/2.0/UDP 195.176.213.123:5060;rport=5060;branch=z9hG4bK-a6818ce1.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
From: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
To: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 101 INVITE.
User-Agent: Netstream VoIP Gateway.
Contact: <sip:gw01@192.168.128.61:5060>.
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,INFO,REFER,SUBSCRIBE.
Content-Type: application/sdp.
Content-Length: 186.
.
v=0.
o=- 227934408367722 1 IN IP4 192.168.128.61.
s=-.
c=IN IP4 192.168.128.61.
t=0 0.
m=audio 23984 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
U 192.168.34.1:5060 -> 192.168.128.61:5060
ACK sip:gw01@192.168.128.61:5060 SIP/2.0.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
Via: SIP/2.0/UDP 192.168.34.1;branch=z9hG4bK2838.f3a91403.2.
Via: SIP/2.0/UDP 195.176.213.123:5060;rport=5060;branch=z9hG4bK-c7ff7fbe.
From: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
To: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 101 ACK.
Max-Forwards: 69.
Contact: "0315080180" <sip:0315080180@195.176.213.123:5060>.
User-Agent: Sipura/SPA921-4.1.10(b).
Content-Length: 0.
.
U 192.168.128.61:5060 -> 192.168.34.1:5060
BYE sip:0315080180@195.176.213.123:5060 SIP/2.0.
Route: <sip:192.168.34.1;r2=on;lr=on>.
Route: <sip:192.168.35.36;r2=on;lr=on>.
Via: SIP/2.0/UDP 192.168.128.61:5060;branch=z9hG4bKf9950ba86fb23261fde8afbb.
Max-Forwards: 70.
From: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
To: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 1 BYE.
User-Agent: Netstream VoIP Gateway.
.
U 192.168.34.1:5060 -> 192.168.128.61:5060
SIP/2.0 200 OK.
To: "0315080180" <sip:0315080180@192.168.35.36>;tag=58e4d381b7c3e699o0.
From: <sip:0315080190@192.168.35.36>;tag=f9950ba86292ab03fde8af7b.
Call-ID: b80ee3a1-19414f9(a)192.168.0.2.
CSeq: 1 BYE.
Via: SIP/2.0/UDP 192.168.128.61:5060;rport=5060;branch=z9hG4bKf9950ba86fb23261fde8afbb.
Record-Route: <sip:192.168.35.36;r2=on;lr=on>.
Record-Route: <sip:192.168.34.1;r2=on;lr=on>.
Server: Sipura/SPA921-4.1.10(b).
Content-Length: 0.
.
Cheers
Héctor
-----Original Message-----
From: Vikram Ragukumar [mailto:vragukumar@signalogic.com]
Sent: Freitag, 19. März 2010 16:48
To: Ortiz Héctor, SCS-SIS-ICC-SPC-SBU
Cc: users(a)lists.kamailio.org
Subject: Re: [Kamailio-Users] Recording RTP session
Hector,
Hi everybody
I've configured a SIP server (OpenSER 1.3.2) to work with rtpproxy and
so far everything is fine, but now I want to be able to record the audio
from a conversation. I've read that this is possible by using the
function start_recording from the module NATHelper but I'm not able to
get it working
I'm no expert when it comes to rtpproxy or Kamailio , but i've
encountered a similar problem in the past. I took a quick look at your
logfile and i noticed that there aren't any SIP messages in the log (eg.
REGISTER, INVITE...). Are you sure that SIP messages are being proxied ?
if not recording would not be possible.
Regards,
Vikram.
RTPproxy 1.2.1 is running with the following options:
root@openser:/opt/rtpproxy-1.2.1/bin# ps uax | grep rtpproxy
rtpproxy 30827 0.0 0.0 26968 964 ? Ssl 14:49 0:00
/opt/rtpproxy-1.2.1/bin/rtpproxy -u rtpproxy rtpproxy -p
/var/run/rtpproxy/rtpproxy.pid -l 192.168.34.1 -s udp:127.0.0.1 7890 -r
/etc/openser/stored_conversations -S /tmp -a -d DBUG -P
root 31547 0.0 0.0 7524 892 pts/1 R+ 15:59 0:00 grep
rtpproxy
Output from netstat
root@openser:/opt/rtpproxy-1.2.1/bin# netstat -tupna | grep rtpproxy
udp 0 0 127.0.0.1:7890
0.0.0.0:* 30827/rtpproxy
Relevant parts of the configuration file
...
# ------ nathelper params -----
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", 7)
modparam("nathelper", "sipping_from",
"sip:pinger@openser.org")
modparam("nathelper", "rtpproxy_sock",
"udp:127.0.0.1:7890")
modparam("nathelper", "force_socket",
"udp:localhost:7890")
...
route[6] {
xlog("L_INFO", "ROUTE 6");
# NAT handling
# Set reply routing block, to which control is passed after a
transaction
# completed with a negative result but before sending a final reply
t_on_failure("1");
# Check if we're NATed
if (isflagset(5) || isbflagset(6)) {
# Use rtpproxy
force_rtp_proxy();
if ( start_recording() ) {
xlog("L_INFO", "RECORDING...");
};
}
# Set reply routing block, to which control is passed each time
a reply
# (provisional or final) for the transaction is received
t_on_reply("1");
}
...
onreply_route[1] {
xlog("L_INFO", "ONREPLY_ROUTE");
if ((isflagset(5) || isbflagset(6)) &&
status=~"(180)|(183)|(2[0-9][0-9])") {
xlog("L_INFO", "NAT'd TRANSACTION");
fix_nated_contact();
force_rtp_proxy();
if ( start_recording() ) {
xlog("L_INFO", "RECORDING...");
};
}
else if (nat_uac_test("1")) {
fix_nated_contact();
}
exit;
}
When I start OpenSER I see the following in syslog
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: NOTICE:core:main:
version: openser 1.3.2-notls (x86_64/linux)
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:core:main: using
256 Mb shared memory
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:core:main: using
1 Mb private memory per process
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:sl:mod_init:
Initializing StateLess engine
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:tm:mod_init: TM -
initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:maxfwd:mod_init:
initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
INFO:usrloc:ul_init_locks: locks array size 512
Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
INFO:registrar:mod_init: initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:textops:mod_init:
initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:xlog:mod_init:
initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
INFO:avpops:avpops_init: initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:acc:mod_init:
initializing...
Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:dialog:mod_init:
Dialog module - initializing
Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31632_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31632_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31632_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31632_1 1 "
Mar 19 16:08:45 openser /usr/sbin/openser[31632]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31631_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31631_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31633_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31633_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31634_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31634_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31635_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31635_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31636_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31636_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31637_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31637_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31638_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31638_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31637_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31637_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31631_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31631_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31634_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31634_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31636_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31636_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31633_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31633_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31635_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31635_1 1 "
Mar 19 16:08:45 openser /usr/sbin/openser[31631]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31634]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31637]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31633]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31636]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31635]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31638]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31639_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31639_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31638_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31638_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31640_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31640_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31642_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31642_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31643_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31643_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31644_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31644_0 20040107 "
Mar 19 16:08:45 openser /usr/sbin/openser[31642]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31643]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31645_0 V"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31645_0 20040107 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31639_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31639_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31642_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31642_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31644_1 VF 20050322"
Mar 19 16:08:45 openser /usr/sbin/openser[31644]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31644_1 1 "
Mar 19 16:08:45 openser /usr/sbin/openser[31640]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser /usr/sbin/openser[31639]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31640_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31640_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31643_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31643_1 1 "
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
command "31645_1 VF 20050322"
Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
"31645_1 1 "
Mar 19 16:08:45 openser /usr/sbin/openser[31645]:
INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
for it enabled
But when I place the call no debug info from rtpproxy is being generated
nor the RTP session is being saved to file.
Any idea what the problem can be?
Thanks in advance
Héctor
------------------------------------------------------------------------
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users