[Serusers] routing rtpstream through nat within vpn

Martin Drasar drasar at optimsys.cz
Mon Jul 2 14:35:08 CEST 2007


Hello everyone,
I have following scenario:

+----------+
| VPN      |
|+--------+|
|| MRCP   ||
|+--------+|
|    ||    |
|+--------+|  +---------+
|| Proxy  ====| Solaris |
|+--------+|  +---------+
+----------+

I want both sip messages and rtp stream to go through proxy between mrcp 
servers and solaris box.

Currently I am transferring sip messages using call forwarding (avpops 
module) and trying to use rtpproxy for rtp stream forwarding. For 
rtpproxy to work I have set up NAT on proxy, but still have issues.

This is the invite packet sent from proxy to MRCP server:

INVITE sip:UAS at 10.1.1.100:5060 SIP/2.0
Record-Route: <sip:10.0.0.1;ftag=3d423348;lr=on>          <=##
Via: SIP/2.0/UDP 10.0.0.1;branch=z9hG4bKe359.5e010b95.0   <=##
Via: SIP/2.0/UDP 
10.0.0.6:5070;branch=z9hG4bK-d8754z-5212be016a2d3c2a-1---d8754z-;rport=5070
Max-Forwards: 16
Contact: <sip:sender at 10.0.0.6:5070>
To: <sip:synthesizer at 10.0.0.1:5060;transport=UDP>         <=##
From: <sip:sender at 10.0.0.6:5070>;tag=3d423348
Call-ID: MTZkYWE2MGYxNTgyNmY0YTRmNzkwNjAyNmU5OGQ0ZGU.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, NOTIFY
Content-Type: application/sdp
Content-Length: 282

v=0
o=- 1183369050 1183369050 IN IP4 10.0.0.6
s=-
t=0 0
m=application 35050 TCP/MRCPv2                            <=##
c=IN IP4 10.0.0.1                                         <=##
a=connection:new
a=setup:active
a=cmid:1
a=resource:speechsynth
m=audio 53384 RTP/AVP 0
c=IN IP4 10.0.0.1                                         <=##
a=mid:1
a=recvonly
a=direction:active
a=nortpproxy:yes

Lines with "<=##" are the lines with which I think I have problem. 
Because mrcp servers receive 'To' and 'Via' with address that is outside 
vpn, they cannot reply. As a result I send x times invite and end with 
408 timeout.
Also there is problem with line "m=application 35050 TCP/MRCPv2". 
rtpproxy changes that port, but according to mrcp specification I need 
it to be exactly 9. Even when changing PORT_MIN and PORT_MAX both to 9, 
I sometimes get port 10.

Could you please advice me what to do? Am I trying in right direction? 
Will I have to alter the sources to make it work like I need to?

Thanks for your answers
Martin



More information about the sr-users mailing list