DB-ONLY mode call between two proxies failed.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

DB-ONLY mode call between two proxies failed.

Jiang Jinke
I'm using the same location table with two/three proxy server, but I
can't make calls between the proxies.
Do I have to do replication in SIP level ? I'd like to do this in a
simple way, but if replication will make the arch more flexible, then
it's acceptable with a more complicate config.

I'm having the following message in my syslog when the other endpoint
is not in the same proxy server which was receiving the call.

syslog content:
WARNING:usrloc:dbrow2info: non-local socket <udp:xx.xx.xx.xx:5060>...ignoring
ERROR:core:get_out_socket: no socket found
ERROR:tm:update_uac_dst: failed to fwd to af 2, proto 1  (no
corresponding listening socket)
ERROR:tm:t_forward_nonack: failure to add branches

Regards,
Jinke Jiang

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

Ross Beer-2
You need to add a path to a sip message and then replicate at sip level. The code I use to do this is:
 
                if (is_method("REGISTER")) {
                        # Uncomment this if you want to use digest authentication
                        if (!www_authorize("", "subscriber"))
                        {
                                www_challenge("", "0");
                                return;
                        };
                        save("location");
                        # REPLICATE TO OTHER SERVER
                        add_path_received();
                        t_replicate("sip:<Other Server>:5060");
                        exit;
                };
 
Then on the other server you will need to catch the registraiton like this:
 
        # RECEIVE REGISTRATIONS FROM OTHER SERVER
        if(src_ip==<IP Address Of Server Sending Registration>)
        {
                xlog("LOG:Registration From Other Server\n");
               if (is_method("REGISTER"))
               {
                       save("location");
                       exit;
               }
        }

Hope this helps,
 
Ross
 
 
2009/11/1 Jiang Jinke <[hidden email]>
I'm using the same location table with two/three proxy server, but I
can't make calls between the proxies.
Do I have to do replication in SIP level ? I'd like to do this in a
simple way, but if replication will make the arch more flexible, then
it's acceptable with a more complicate config.

I'm having the following message in my syslog when the other endpoint
is not in the same proxy server which was receiving the call.

syslog content:
WARNING:usrloc:dbrow2info: non-local socket <udp:xx.xx.xx.xx:5060>...ignoring
ERROR:core:get_out_socket: no socket found
ERROR:tm:update_uac_dst: failed to fwd to af 2, proto 1  (no
corresponding listening socket)
ERROR:tm:t_forward_nonack: failure to add branches

Regards,
Jinke Jiang

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

Bogdan-Andrei Iancu
In reply to this post by Jiang Jinke
Hi Jiang,

the problem is the USRLOC module saves (in the user location record) the
socket the REGISTER was received from (to use it when sending the
traffic to the users). But if you have multiple servers on the same DB,
there will be a kind of conflict between the stored sockets (record was
inserted by R1 with socket S1 and later R2 reads the records, R2 will
try to use S1 which obviously is not local).

I can send you a small patch do get rid of that, but if you are dealing
with NATed clients, it will not works - a natted client can be handled
only by the same server.

Regards,
Bogdan

Jiang Jinke wrote:

> I'm using the same location table with two/three proxy server, but I
> can't make calls between the proxies.
> Do I have to do replication in SIP level ? I'd like to do this in a
> simple way, but if replication will make the arch more flexible, then
> it's acceptable with a more complicate config.
>
> I'm having the following message in my syslog when the other endpoint
> is not in the same proxy server which was receiving the call.
>
> syslog content:
> WARNING:usrloc:dbrow2info: non-local socket <udp:xx.xx.xx.xx:5060>...ignoring
> ERROR:core:get_out_socket: no socket found
> ERROR:tm:update_uac_dst: failed to fwd to af 2, proto 1  (no
> corresponding listening socket)
> ERROR:tm:t_forward_nonack: failure to add branches
>
> Regards,
> Jinke Jiang
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

osiris123d
Bogdan,

Are you saying that its not possible to have two Active/Active SIP Proxies share the same Location table when the clients are NATed?

I currently have two OpenSIPS proxies set up and sharing the same database and if NATed Client A registered with Proxy1 and NATed Client B registered with Proxy2, then when Client A calls Client B the call fails.  Is it because of the two Active/Active Proxies and the NATed clients?

When I ngrep I see that the foreign proxy is sending the sip invite to the correct public IP:rport, but internally behind the firewall no traffic is reaching the client.
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

osiris123d
My question was referencing this email thread


Hi Jiang,

the problem is the USRLOC module saves (in the user location record) the
socket the REGISTER was received from (to use it when sending the
traffic to the users). But if you have multiple servers on the same DB,
there will be a kind of conflict between the stored sockets (record was
inserted by R1 with socket S1 and later R2 reads the records, R2 will
try to use S1 which obviously is not local).

I can send you a small patch do get rid of that, but if you are dealing
with NATed clients, it will not works - a natted client can be handled
only by the same server.

Regards,
Bogdan

Jiang Jinke wrote:

> I'm using the same location table with two/three proxy server, but I
> can't make calls between the proxies.
> Do I have to do replication in SIP level ? I'd like to do this in a
> simple way, but if replication will make the arch more flexible, then
> it's acceptable with a more complicate config.
>
> I'm having the following message in my syslog when the other endpoint
> is not in the same proxy server which was receiving the call.
>
> syslog content:
> WARNING:usrloc:dbrow2info: non-local socket <udp:xx.xx.xx.xx:5060>...ignoring
> ERROR:core:get_out_socket: no socket found
> ERROR:tm:update_uac_dst: failed to fwd to af 2, proto 1  (no
> corresponding listening socket)
> ERROR:tm:t_forward_nonack: failure to add branches
>
> Regards,
> Jinke Jiang
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

Bogdan-Andrei Iancu
In reply to this post by osiris123d

osiris123d wrote:
> Bogdan,
>
> Are you saying that its not possible to have two Active/Active SIP Proxies
> share the same Location table when the clients are NATed?
>  
as the servers have different IPs, yes, it is not possible.
> I currently have two OpenSIPS proxies set up and sharing the same database
> and if NATed Client A registered with Proxy1 and NATed Client B registered
> with Proxy2, then when Client A calls Client B the call fails.  Is it
> because of the two Active/Active Proxies and the NATed clients?
>
> When I ngrep I see that the foreign proxy is sending the sip invite to the
> correct public IP:rport, but internally behind the firewall no traffic is
> reaching the client.
>  
yes, because the nat pinhole is open only towards/from Proxy1 (where the
nated client registered), so proxy2 will not be able to cross that nat.

Regards,
Bogdan


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

osiris123d
Makes sense.  Thanks

On Fri, Mar 26, 2010 at 5:32 AM, Bogdan-Andrei Iancu [via OpenSIPS (Open SIP Server)] <[hidden email]> wrote:

osiris123d wrote:
> Bogdan,
>
> Are you saying that its not possible to have two Active/Active SIP Proxies
> share the same Location table when the clients are NATed?
>  
as the servers have different IPs, yes, it is not possible.
> I currently have two OpenSIPS proxies set up and sharing the same database
> and if NATed Client A registered with Proxy1 and NATed Client B registered
> with Proxy2, then when Client A calls Client B the call fails.  Is it
> because of the two Active/Active Proxies and the NATed clients?
>
> When I ngrep I see that the foreign proxy is sending the sip invite to the
> correct public IP:rport, but internally behind the firewall no traffic is
> reaching the client.
>  
yes, because the nat pinhole is open only towards/from Proxy1 (where the
nated client registered), so proxy2 will not be able to cross that nat.

Regards,
Bogdan


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]

View message @ http://n2.nabble.com/DB-ONLY-mode-call-between-two-proxies-failed-tp3926843p4803058.html
To unsubscribe from Re: DB-ONLY mode call between two proxies failed., click here.




--
--
*--*--*--*--*--*
Duane
*--*--*--*--*--*
--
Reply | Threaded
Open this post in threaded view
|

Re: DB-ONLY mode call between two proxies failed.

Andreas Sikkema
In reply to this post by osiris123d
On Mar 26, 2010, at 3:16 AM, osiris123d wrote:

> I currently have two OpenSIPS proxies set up and sharing the same database
> and if NATed Client A registered with Proxy1 and NATed Client B registered
> with Proxy2, then when Client A calls Client B the call fails.  Is it
> because of the two Active/Active Proxies and the NATed clients?
>
> When I ngrep I see that the foreign proxy is sending the sip invite to the
> correct public IP:rport, but internally behind the firewall no traffic is
> reaching the client.

This is the behaviour that you're supposed to be expecting. Most NAT implementations are based on src_ip:src_port <-> dest_ip:dest_port tuples and will only allow traffic from dest_ip:dest_port to nat_ip:nat_port to be forwarded to src_ip:src_port.

--
Andreas
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users