irontec / sngrep

Ncurses SIP Messages flow viewer
GNU General Public License v3.0
1.03k stars 187 forks source link

don'nt show rtp flow arrow when one leg with DMZ and sdp address with DMZ public address #115

Open michael2009 opened 8 years ago

michael2009 commented 8 years ago

test with DMZ , sngrep run at IPPBX server

UAC1 -> NAT DMZ firewall -> LAN - IPPBX -> UAC2

1.1.1.1 -> 1.1.1.2 / 192.168.1.1 -> 192.168.1.200 -> 192.168.1.222

IPPBX give Answer SDP address same NAT public address to UAC1

then sngrep don'nt show any A-LEG rtp flow .

Kaian commented 8 years ago

Hi!!

If I understand this properly, the 200 OK to the UAC1 has 1.1.1.2 as SDP audio address, but the received RTP packets have Destination IP as 192.168.1.200?

So, the only machine that knows that dialog has that RTP flow is the NAT Firewall, correct?

michael2009 commented 8 years ago

yes . only IPPBX server know that dialog has that RTP flow is the NAT Firewall, correct.

then need add fuction for support dmz mode , sngrep run with dmz param !!!

michael2009 commented 8 years ago

example ./sngrep --dmz 1.1.1.2

then sngrep learn SDP address alias . 1.1.1.2 alias to 192.168.1.200

Kaian commented 8 years ago

I could give it a try, but I think it would be more a setting in sngreprc file (like the existing alias directive) that a command line option.

dmz 1.1.1.2 192.168.1.200

When parsing a SDP with the first address, additional RTP streams will be configured with the second address in the same destination port.

Anyway I dont have a testing environment for this scenario so any test pcap will be appreciated. Also, we're right now with other projects so I'm not sure when I could implement this feature :)

michael2009 commented 8 years ago

I had sent 3 pcap file to you , can check again later.