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:
Set the externip in sip.conf to the firewall's external 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
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
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 :).
About Tukeys
Tukeys provides consulting and software services to companies in healthcare and communications that are dealing with technical or scaling challenges. Please reach out to me on LinkedIn.
An interesting quote from John Tukey, who was an American mathematician (1915-2000) -
An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem.
Today maths and statistics form the basis of how software is developed and used around us.
About Me
Medhavi
I have over 20 years of experience in healthcare, communications and AI.
I have a passion for defining innovative applications, creating product/technology strategy and solving challenging problems. My product mindset is helpful to any company to find patterns, reduce costs, and gain efficiencies.
I was the VP of Engineering at Vibrent Health, where I led the web, mobile, API and data products that supported one of the largest NIH programs - All of Us Research Program. Our system enrolled almost a million users and collected data from EHRs, surveys and wearables. Before that, I worked at hCentive, a pioneer in health exchanges.
As the CTO of 3CLogic, I helped create the first PC and web-only contact center solution that implemented PBX and CRM functionality as an affordable SaaS solution. As the Chief Architect of NexTone, I was instrumental in the development of SIP and SIP-based products. SIP and associated protocols form the basis of modern WebRTC APIs.
If you are a growth company or invest in growing companies that are facing technical or scaling challenges, I can be a tremendous help. Contact me on LinkedIn.
Featured Post
Random Forest Analysis of U.S. National Epidemiological Survey on Alcohol and Related Conditions (NESARC) data
In 2001/2002, the National Institute on Alcohol Abuse and Alcoholism (NIAAA) conducted the National Epidemiologic Survey on Alcohol and Re...