[asterisk-users] Asterisk 1.4.42 NOTIFY replies ignore NAT setting

James Lamanna jlamanna at gmail.com
Fri Dec 30 04:07:48 CST 2011


Hi,
I've been trying to fix NOTIFY replies (specifically keep-alives) in 1.4.42
(I can't upgrade to 1.8.x at the moment for various reasons).

I've noticed for user agents that have a VIA header with a different
port than the port the NOTIFY was sent from,
the NOTIFY reply will always be sent back to that port, which is incorrect.
(Sonicwalls and other routers love to do this, even with "Symmetric NAT" on).
The reason for this is that the NOTIFY reply does not attempt to
lookup the SIP peer and check
its NAT flags.
I've seen some nasty From: header string parsing code + find_peer()
that does this, but I was wondering
if there's an easier way.

Thanks.

-- James



More information about the asterisk-users mailing list