Hi, I want to modify the following sip packet, I want to change the SDP IP address by $di, which rule could filter this packet? Something like: [ if method("OK") and $di is RFC1918 ] ??? And with which function could I change the Ip address in the SDP content? In this case I would like to change 172.16.99.2 by 190.244.125.41.
Thanks in advance,
Lucas
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 172.16.99.2;branch=z9hG4bK7c5.bfc43456.0;i=1;received=172.16.99.2;rport=5060.
Via: SIP/2.0/TCP 192.168.15.231:1952;received=190.244.125.41;branch=z9hG4bK-d8754z-be53247ec649be5b-1---d8754z-;rport=9055.
Record-Route: <sip:172.16.99.2;r2=on;lr=on;ftag=b11c6a4e>.
Record-Route: <sip:172.16.99.2;transport=tcp;r2=on;lr=on;ftag=b11c6a4e>.
From: "Lucas"<sip:1104@67.152.18.231>;tag=b11c6a4e.
To: <sip:1101@67.152.18.231>;tag=as5356a251.
Call-ID: NzcwZWIxNGE1MDg5ZjVhZWRhYWNlM2RiNmMwM2M4MWM..
CSeq: 2 INVITE.
Server: Asterisk PBX 1.8.4.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.
Supported: replaces, timer.
Contact: <sip:1101@172.16.99.2:5080>.
Remote-Party-ID: "Gus Office One" <sip:1101@67.152.18.231>;party=called;privacy=off;screen=no.
Content-Type: application/sdp.
Content-Length: 305.
.
v=0.
o=root 1124623741 1124623741 IN IP4 172.16.99.2.
s=Asterisk PBX 1.8.4.1.
c=IN IP4 172.16.99.2.
t=0 0.
m=audio 13640 RTP/AVP 0 8 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.