[OpenSIPS-Users] xmlrpc call to standby Opensips

bluerain frank21118 at yahoo.com
Thu Mar 12 02:02:03 CET 2015


I have 2 opensips setup as HA.  The opensips have 2 interface, one public and
one private.  The public is the "floating IP" between the 2 HA pair opensip.

I've learn to use the following python call to enable or disable a node on
load balancer remotely:

opensips = xmlrpclib.ServerProxy('http://192.168.1.1:8000/RPC2')
print opensips.lb_status(21,0);

The issue with the above is that I have to use the "live" opensips.  If the
swap happens, the above line is useless.  But then if I put both IP in the
script:

opensips = xmlrpclib.ServerProxy('http://192.168.1.1:8000/RPC2')
print opensips.lb_status(21,0);
opensips = xmlrpclib.ServerProxy('http://192.168.1.2:8000/RPC2')
print opensips.lb_status(21,0);

When I execute the script, it seems it just "hang" there because it try to
setup a connection to the "stand by" opensips where it is not running.

But when I try to do the public IP

opensips = xmlrpclib.ServerProxy('http://99.66.66.66:8000/RPC2')
print opensips.lb_status(21,0);

It seems not working because I guess it is only listening on the private
side?  

Thus:

1. Is there a time-out thing I can set so that I can point the both private
IP of the opensips and that if it send the xmlrpc call to the "standby"
opensips, it will just timeout in 1 second.

2. If the above is no way, then is there way I can make oepnsip listen on
public side for xmlrpc call?  Although I don't like it, even though I have
firewall in front which only allow 5060.

Thank you!




--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/xmlrpc-call-to-standby-Opensips-tp7595798.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list