Hi All. Fist time poster here, long time geek.
I am trying to get Kamilio to work in the following configuration and after days of googling and configuration attempts, I have come here for help.
Two servers, both sharing the same database. Server1, Server2. Both servers are behind a NAT (AWS).
If I set the DNS to return both IP addresses for the domain on the A record, everything works, all is well.
If I set the DNS to return values based on latency and the Calling Client gets Server1's IP Address but the Receiving Client is registered to Server2, the call fails from a timeout. I can see the attempt to go through at the packet level and a 'non-local' socket message as well.
If the DNS returns Server2's IP Address and the Receiving Client is registered to Server2, the call completes.
I have tried numerous variations of the various 'path' and 'registrar' options with any joy. I tried making one of the servers the central registrar as well. I am not entirely sure I ever set everything correctly, but I have tried numerous combinations.
Any thoughts would be appreciated, I only ask this as I think I have exhausted my own list of things to try.
Thanks.
- Coy Cardwell
On Mon, 2013-10-14 at 17:12 -0400, Coy Cardwell wrote:
...Two servers, both sharing the same database. Server1, Server2. Both servers are behind a NAT (AWS).
If I set the DNS to return both IP addresses for the domain on the A record, everything works, all is well.
If I set the DNS to return values based on latency and the Calling Client gets Server1's IP Address but the Receiving Client is registered to Server2, the call fails from a timeout. I can see the attempt to go through at the packet level and a 'non-local' socket message as well.
If the DNS returns Server2's IP Address and the Receiving Client is registered to Server2, the call completes...
Thanks.
- Coy Cardwell
Hi Coy,
Can you explain the scenario a bit in regards to sharing the same database across the two servers? I can be a problem for the local client to try to receive a call from a server that they're not registered to.
--fred Fred Posner, @qxork
Hi!
First, if 2 servers share the same DB, then userloc must be switched to DB-only mode: http://kamailio.org/docs/modules/4.0.x/modules/usrloc.html#idp16939424
But this leads you to another problem. As Fred already mentioned, SIP clients (or the NAT of the user) often refuse messages which are not received from the proxy to which the registration was sent.
The best solution depends on what you exactly want to achieve and how many servers you want to add. But a simple workaround would be: - both proxies use their own DB - if lookup() fails, then - if requests comes from other proxy -> send 404 - if request comes from user -> forward to other proxy
regards Klaus
On 14.10.2013 23:12, Coy Cardwell wrote:
Hi All. Fist time poster here, long time geek.
I am trying to get Kamilio to work in the following configuration and after days of googling and configuration attempts, I have come here for help.
Two servers, both sharing the same database. Server1, Server2. Both servers are behind a NAT (AWS).
If I set the DNS to return both IP addresses for the domain on the A record, everything works, all is well.
If I set the DNS to return values based on latency and the Calling Client gets Server1's IP Address but the Receiving Client is registered to Server2, the call fails from a timeout. I can see the attempt to go through at the packet level and a 'non-local' socket message as well.
If the DNS returns Server2's IP Address and the Receiving Client is registered to Server2, the call completes.
I have tried numerous variations of the various 'path' and 'registrar' options with any joy. I tried making one of the servers the central registrar as well. I am not entirely sure I ever set everything correctly, but I have tried numerous combinations.
Any thoughts would be appreciated, I only ask this as I think I have exhausted my own list of things to try.
Thanks.
- Coy Cardwell
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thanks. I am using DB only mode. There will be a number of servers in the end, so i will have to look further into the issue I guess, since assumptions were made about how Kamailio works.
From what I can tell, I think I will have to implement the outbound module
and a central registrar.
Thanks again for the replies.
- Coy
On Tue, Oct 15, 2013 at 5:46 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
Hi!
First, if 2 servers share the same DB, then userloc must be switched to DB-only mode: http://kamailio.org/docs/**modules/4.0.x/modules/usrloc.**html#idp16939424http://kamailio.org/docs/modules/4.0.x/modules/usrloc.html#idp16939424
But this leads you to another problem. As Fred already mentioned, SIP clients (or the NAT of the user) often refuse messages which are not received from the proxy to which the registration was sent.
The best solution depends on what you exactly want to achieve and how many servers you want to add. But a simple workaround would be:
- both proxies use their own DB
- if lookup() fails, then
- if requests comes from other proxy -> send 404
- if request comes from user -> forward to other proxy
regards Klaus
On 14.10.2013 23:12, Coy Cardwell wrote:
Hi All. Fist time poster here, long time geek.
I am trying to get Kamilio to work in the following configuration and after days of googling and configuration attempts, I have come here for help.
Two servers, both sharing the same database. Server1, Server2. Both servers are behind a NAT (AWS).
If I set the DNS to return both IP addresses for the domain on the A record, everything works, all is well.
If I set the DNS to return values based on latency and the Calling Client gets Server1's IP Address but the Receiving Client is registered to Server2, the call fails from a timeout. I can see the attempt to go through at the packet level and a 'non-local' socket message as well.
If the DNS returns Server2's IP Address and the Receiving Client is registered to Server2, the call completes.
I have tried numerous variations of the various 'path' and 'registrar' options with any joy. I tried making one of the servers the central registrar as well. I am not entirely sure I ever set everything correctly, but I have tried numerous combinations.
Any thoughts would be appreciated, I only ask this as I think I have exhausted my own list of things to try.
Thanks.
- Coy Cardwell
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 15.10.2013 13:21, Coy Cardwell wrote:
Thanks. I am using DB only mode. There will be a number of servers in the end, so i will have to look further into the issue I guess, since assumptions were made about how Kamailio works. From what I can tell, I think I will have to implement the outbound module and a central registrar.
Yes, this is probably the better solution, for a scale able network. You can also have multiple central registrars (e.g. which share the DB) as long as IP connectivity between the outbound proxies and registrars is not filtered.
klaus
Thanks.
By "as long as IP connectivity between the outbound proxies and registrars is not filtered", what exactly must not be filtered? The proxies and their 'local' registrars will be in the same private IP cloud. Are you implying if a proxy tries to reach a nat-ed registrar in another, different, private IP cloud it won't work?
I appreciate the help.
On Wed, Oct 16, 2013 at 5:16 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
On 15.10.2013 13:21, Coy Cardwell wrote:
Thanks. I am using DB only mode. There will be a number of servers in the end, so i will have to look further into the issue I guess, since assumptions were made about how Kamailio works. From what I can tell, I think I will have to implement the outbound module and a central registrar.
Yes, this is probably the better solution, for a scale able network. You can also have multiple central registrars (e.g. which share the DB) as long as IP connectivity between the outbound proxies and registrars is not filtered.
klaus
Hi Coy!
On 16.10.2013 14:29, Coy Cardwell wrote:
Thanks.
By "as long as IP connectivity between the outbound proxies and registrars is not filtered", what exactly must not be filtered? The proxies and their 'local' registrars will be in the same private IP cloud.
Then it should be fine.
Are you implying if a proxy tries to reach a nat-ed registrar in another, different, private IP cloud it won't work?
Probably it depends on the NAT and how the cloud is connected to the Internet and other clouds. But also NATed servers should be fine, if the NAT does not mangle SIP packets and the proxies are configured to announce the public IP address.
Thus, hmm, there may be problems depending on your setup. For example:
Internet (public IP) Cloud 1 1.1.1.2 outboundproxy 1: 10.0.1.2 1.1.1.3 registrar 1: 10.0.1.3
Internet (public IP) Cloud 2 2.2.2.2 outboundproxy 2: 10.0.2.2 2.2.2.3 registrar 2: 10.0.2.3
If the outboundproxy (OBP) 1 talks to registrar 1, does it us the internal IP addresses or the public IP addresses? For later, Kamailio can be simply configured to announce the public IP addresses in all SIP messages. But if internal traffic uses internal IP addresses, then the OBP is "virtual" multihomed, and Kamailio must be correctly configured to announce the private IP address when talking to the registrar, but using the public IP address when talking to customer in the Internet.
Further, if OBP1 talks to registrar2, then such "virtual" mutlihomed setups are also needed on the registrar server.
Conclusion: I guess every private cloud has different network techniques how traffic is routed externally and internally. Thus, the Kamailio configuration heavily depends on the underlying network (as IP addresses are put into the SIP messages). But at least Kamailio is very flexible and up to now I always have solved strange network setups.
regards Klaus
I understand a bit about the IP routing issues, I have already seen some of them with Kamailio being confused about a private vs. a published public address.
Thanks for your help, I have more ideas I am going to try today.
On Wed, Oct 16, 2013 at 8:41 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
Hi Coy!
On 16.10.2013 14:29, Coy Cardwell wrote:
Thanks.
By "as long as IP connectivity between the outbound proxies and registrars is not filtered", what exactly must not be filtered? The proxies and their 'local' registrars will be in the same private IP cloud.
Then it should be fine.
Are you implying if a proxy tries to reach a nat-ed registrar in
another, different, private IP cloud it won't work?
Probably it depends on the NAT and how the cloud is connected to the Internet and other clouds. But also NATed servers should be fine, if the NAT does not mangle SIP packets and the proxies are configured to announce the public IP address.
Thus, hmm, there may be problems depending on your setup. For example:
Internet (public IP) Cloud 1 1.1.1.2 outboundproxy 1: 10.0.1.2 1.1.1.3 registrar 1: 10.0.1.3 Internet (public IP) Cloud 2 2.2.2.2 outboundproxy 2: 10.0.2.2 2.2.2.3 registrar 2: 10.0.2.3
If the outboundproxy (OBP) 1 talks to registrar 1, does it us the internal IP addresses or the public IP addresses? For later, Kamailio can be simply configured to announce the public IP addresses in all SIP messages. But if internal traffic uses internal IP addresses, then the OBP is "virtual" multihomed, and Kamailio must be correctly configured to announce the private IP address when talking to the registrar, but using the public IP address when talking to customer in the Internet.
Further, if OBP1 talks to registrar2, then such "virtual" mutlihomed setups are also needed on the registrar server.
Conclusion: I guess every private cloud has different network techniques how traffic is routed externally and internally. Thus, the Kamailio configuration heavily depends on the underlying network (as IP addresses are put into the SIP messages). But at least Kamailio is very flexible and up to now I always have solved strange network setups.
regards Klaus