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
Hi!
I'm not familiar with your complete scenario. But in most cases it is not wise to have openser relying the REGISTER requests to Asterisk. You should either: - use only Asterisk and let the clients REGISTER directly to Asterisk - use openser for registrations and call routing and use Asterisk only for ISDN gateway and other features like voicemail and conference rooms.
Why do you want to use openser but REGISTER to Asterisk?
relaying REGISTER requires the Path: header extension, which is in openser CVS head, but not in Asterisk AFAIK.
regards klaus
Benjamin Lawetz wrote:
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
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Of course, it's when you post your question that you find the answer yourself :-)
For people searching through the ML in the future, the command I needed to add was: force_rport();
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Benjamin Lawetz Sent: April 24, 2006 4:16 PM To: users@openser.org Subject: [Users] Forward to asterisk problem with nat
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
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users