style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

Editing SIP headers

No replies
memed09
Offline
Joined: 02/15/2016

Hi,

I am using jnetpcap to change headers of SIP messages like;

sip=packet.getHeader(sip);
if(sip.fieldValue(Sip.Request.RequestUrl)!=null) {
ReqURL= sip.fieldValue(Sip.Request.RequestUrl);
sip.addField(Sip.Request.RequestUrl, ReqURL.split("@")[0]+"@"+destnIP, 1);
}

If I print the sip headers I can see my changes but when I print the packet it has still the old headers.
I cannot find any way how to add these changes to packet.
I can change the other protocols like UDP port, MAC address, destination IP etc.

Can you please help me?

thx