[Users] Forward to asterisk problem with nat

Benjamin Lawetz blawetz at teliphone.ca
Mon Apr 24 22:16:27 CEST 2006


Hello,

I finally managed to get openser dispatching the registrations to my
asterisk servers (thanks to all those who helped out). I now tried to get a
natted client to register but with no success. After sniffing the packets
the whole process works fine, except the last leg. Let's see if I can
explain this clearly:

(We will consider 192.168.1.X to be natted and 10.X.X.X to be public (to
protect the innocent)

ATA 192.168.1.100
Router 192.168.1.1 and 10.1.1.45
SER server 10.1.3.6
Asterisk server 10.2.2.2

ATA sends a REGISTER from 192.168.1.100:5060 to the SER server
The router mangles the packet and makes it as from (on the IP side, not the
SIP side) 10.1.1.45:27000
SER received packet adds a received header and send it to the asterisk
server 10.2.2.2
>From an ethereal sniff there's a "Via:SIP/2.0/UDP 10.1.3.6:5060;" and a
"Via: SIP/2.0/UDP 192.168.1.100:5060;received=10.1.1.45" header on the
packet going from the SER server to the asterisk server.
Asterisk answers back to SER, SER strips the "Via:SIP/2.0/UDP
10.1.3.6:5060;" and forwards it to the router at 10.1.1.45 as indicated in
the Via.

And here lies the problem. When the response is sent back to the router, it
is sent back to port 5060 instead of the originating port 27000. So the
packet gets dropped by the router.

If we look at the received header, there is no port indicated. So logically
openser sends it back to the default port. But when the first packet was
received by openser shouldn't it have put the received port on the received
?

Thanks for your time,

Benjamin









More information about the Users mailing list