This was a little bit tricky, but thanks to the power of the freely available (though hard to find sometimes) knowledge on the Internet, and Google’s searches, I just finished this task and thought to write a blog about it. Though the following is for advance users only.
On a server running Proxmox VE with a few instances of CentOS 5.2, each with asterisk and other related stuff, and network interface 192.168.91.1/24, a colleague of mine wanted to hook up two extensions. The problem was that he was at 10.18.0.10/16, though on the same switch as the Proxmox server. There were no routers involved.
Those of you who know Proxmox, know that its network interface is a bridged interface and ifconfig shows it as vmbr0. The Asterisk server instance itself was at 192.168.91.13.
So what I did was as follows:
Assigned a new virtual IP address to vmbr0 to match my colleague’s network:
ifconfig vmbr0:0 10.1.18.1 netmask 255.255.0.0 up
Next, created the following iptables rule, to direct all the traffic on this new interface, coming from 10.1 network to the asterisk server at 192.168.91.13
iptables -A PREROUTING -t nat -i vmbr0 --source 10.1.0.0/16 \
-j DNAT --to-destination 192.168.91.13
And that was it. Now he could point his extensions to 10.1.18.1 to get to the asterisk server. SIP registrations and media all worked well with these settings. At this time I also learned something new, that in Windows XP Pro, you could have multiple IP addresses assigned to the same NIC. So I assigned my workstation a 10.1 address, and was able to reach the same asterisk server using both the IP addresses, without a need to disconnect any of my ssh sessions, and praise the age of amazing technologies we live in.
Other posts related to this topic
- Setup SNMP on an Asterisk server
SNMP - Simple Network Monitoring Protocol, as it name suggests, is a protocol used to monitor various properties of network equipment. These properties are identified by something called OIDs (Object Identifiers) which are long numeric strings and id... - Phone Reminders – Make your life easier
A phone reminder is a reminder which is sent to you over the phone. It amazingly makes various things in your life more manageable which otherwise would stay mismanaged because you simply forget about them. Life is busy for everyone in this age, an... - Getting started with AEL
AEL stands for Asterisk Extensions Language. It is intended to make writing dialplans easier than the standard syntax used in extensions.conf. The standard syntax is not very user friendly, makes it difficult to write complex dialplans, and makes it ... - Keep track of number of active calls in Asterisk
How to keep track of the total number of calls in Asterisk? There is no predefined variable yet which keeps track of this very important piece of information, which is sometimes very critical to make certain decisions in a dialplan.
There are vari... - Scaling an Asterisk installation
Scaling basically means that if the hardware in your system can't handle any more load, then the system should be able to take additional hardware and share extra load with it. In case of VoIP calls, if you server is capable of handling, lets say 300... - What to do when your asterisk is hacked
There are various types of malicious hacks on Linux systems. When dealing with Asterisk server, most common one is that of registering a SIP extension from a hacker's machine and use it to make expensive international calls. This is financi... - Securing Asterisk – Fail2Ban
Fail2Ban from www.fail2ban.org is a great tool to block unwanted IP addresses from accessing your server. It works along with iptables, and checks the log files for predefined patterns, and on finding a matching pattern blocks the IP address ... - SIP on Android / VoIP Client
One of the first apps which I installed on my Milestone/Droid was sipdroid. This app is a softphone and very easy and straight forward to use. To my surprise the voice quality on it was just fine, though it uses ulaw, which consumes the most bandwidt... - Monitoring Asterisk using AstAssisstant
By the time of this posting (June 2010 ) there is still a great need for a good open source monitoring solution for Asterisk. Somebody had written Flash OP many years ago but it never evolved beyong a certain point, leaving it very ugly looking and v... - How to setup a VoIP Server
I got introduced with VoIP in late 2004. It was one of my very good friends, who ran a successful telecom company called Telcan (www.telcan.net), now called Callture (www.callture.com) who told me that there was a software called Asterisk w...
Recent Comments