Friday, May 2, 2008

Replicating MySQL over the WAN

I am researching how practical it is to do real-time replication of a MySQL database over a WAN SSH tunnel. What are the constraints caused by bandwidth, MySQL *blocking* bugs (apparently there are a few out there in older versions of MySQL such as 4.x) and how real-time is the real-time replication. How well does a Master/Slave or a Master/Master MySQL system work in this case?

Saturday, February 23, 2008

Getting Asterisk to work behind a firewall

One of the main things you will need to get to work is Asterisk behind a firewall for the LOTS architecture. Asterisk doesn't support STUN and instead relies on pinholes and firewall policies to be tweaked. Here is what you need to do:

1) Set the externip in sip.conf to the firewall's extenal IP address. This address is used by Asterisk in all its signaling messages which are directed outside the firewall. E.g externip=123.123.123.123

2) Set the localnet variable to indicate. This is perhaps the most important thing to do since it indicates to Asterisk what is private - which means it knows what is public from a NAT perspective. If you don't specify this, Asterisk will not apply the externip and will assume every address is private. Things may not work as you expect. E.g localnet=192.168.0.0/255.255.255.0

3) In the firewall, open pinholes which redirect all traffic on the firewall IP address for the rtpstart and rtpend ports defined in rtp.conf to Asterisk.

For more general info, you can look at this link but it may have more than what you are looking for, so stay focused :).

Tuesday, January 29, 2008

How to use a third party SIP softphone with your Vonage Account

This is real easy. The Vonage server uses SIP in a very standards compliant way and makes use of SIP forking etc which allows multiple phones to register as well.

Here are some pointers to help:

1) The vonage SIP Proxy is basically 216.115.20.41 or sphone.vopr.vonage.net
2) You will need to get a userid and password for your softphone account from Vonage.

That's pretty much it. After that you can register any standards compliant SIP Softphone like SJPhone or a more sophisticated solution like WebAstra to work with your Vonage account!

Turning on Signaling NAT Traversal in OpenSER

loadmodule "nathelper.so"
modparam("nathelper", "rtpproxy_disable", 1)

if (uri==myself) {
force_rport();

if (method=="INVITE") {

if (nat_uac_test("7")) {
fix_nated_contact();
};
}

route(1);
};
route[1] {

t_on_reply("1");

# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}

onreply_route[1] {

if (nat_uac_test("1")) {
fix_nated_contact();
};
}

Friday, January 25, 2008

STUN Servers

Does anyone know of a stable STUN server which can handle lots of load (ie., STUN transactions per second)? We have tried the Vovida STUN Server, but it gets hosed up intermittently. Not sure what is the problem behind that yet. We are looking into it though. If anyone has similar problems, please ping me...

There is another STUN server which is in Alpha state. We tested this server and preliminary testing seems to yield good results.

From a service standpoint, the XTEN STUN Server (stun.xten.com) seems pretty stable. I am not sure what they are using though. Is that a commercial or open source server?