Hi Friends,

I am developing a project to encrypt/decrypt SIP Packet. for this project i made tow service one in client and other at server side.

All going well, now my problem is that SIP Server send media packet to the local IP of SIP Client. Is there anyway to modify the SIP packet which came from client and change the media IP so SIP server should use that IP for media?

in the below packet 89.45.22.xx is the sip server ip.
in the below packet 10.0.0.27 is the nat ip for client but the WAN ip is : 79.662.40.91
===============================================
INVITE sip:800800@89.45.22.xx:5060SIP/2.0
Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bK-b4ab0c9a;rport
From: 20012 <sip:20012@89.45.22.xx:5060>;tag=524054e9b5484c2o0
To: <sip:800800@89.45.22.xx:5060>
Call-ID: 3c7ca935-2b155ce6@10.0.0.27
CSeq: 101 INVITE
Max-Forwards: 70
Contact: 20012 <sip:20012@10.0.0.27>
Expires: 240
User-Agent: Linksys/PAP2-3.1.22(LS)
Content-Length: 247
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp

v=0
o=- 412184 412184 IN IP4 10.0.0.27
s=-
c=IN IP4 10.0.0.27
t=0 0
m=audio 16410 RTP/AVP 4 100 101
a=rtpmap:4 G723/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

In this above packet, which value should i change, before sending to the SIP server so SIP server can send media direct to the client without passing to our service?
 

I will appreciate for your kind of guides and help.

BR,