Hello, We would like Asterisk to listen on port 5060 and on an additional port.
Kevin P. Fleming
2011-Jul-19 18:09 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
On 07/19/2011 01:07 PM, Michael wrote:> We would like Asterisk to listen on port 5060 and on an additional port. > From what we read online, it's not really possible, so is it possible to > install a separate instance of Asterisk on the same machine (without > using Vmware or such) and set the 2nd instance to listen on another port?It would be much easier to install a SIP proxy to listen on the second port and forward requests over to Asterisk on the standard port. -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at www.digium.com & www.asterisk.org
Alex Balashov
2011-Jul-19 18:11 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
On 07/19/2011 02:07 PM, Michael wrote:> We would like Asterisk to listen on port 5060 and on an additional > port.Out of sheer curiosity, what is the motive?> From what we read online, it's not really possible, so is it > possible to install a separate instance of Asterisk on the same > machine (without using Vmware or such) and set the 2nd instance to > listen on another port?It is possible, in principle, but definitely not convenient or easy to administer. If you compile from source, you can probably quite far using the '--prefix' option to the autoconf 'configure' script, or various more specific prefix options it may offer, to accomplish this end. You'd have to make sure all the data subdirectories in /var end up going in a different place, etc., and perhaps modify the init scripts to put lock files in different places. It's possible, but it's not easy. Asterisk's internal config file structure, i.e. in the sample configs, definitely assumes a single, global instance. Have you thought about chroot as a possible solution to this? -- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
Jeremy Kister
2011-Jul-19 18:25 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
On 7/19/2011 2:07 PM, Michael wrote:> We would like Asterisk to listen on port 5060 and on an additional port. > From what we read online, it's not really possible, so is it possible toif you're running iptables, you can set up a pretty simple rule to forward your additional port to 5060. http://www.cyberciti.biz/faq/linux-port-redirection-with-iptables/ remember UDP vs TCP. -- Jeremy Kister http://jeremy.kister.net./
Johan Wilfer
2011-Jul-19 21:24 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
On 2011-07-19 20:07, Michael wrote:> Hello, > > We would like Asterisk to listen on port 5060 and on an additional > port. From what we read online, it's not really possible, so is it > possible to install a separate instance of Asterisk on the same > machine (without using Vmware or such) and set the 2nd instance to > listen on another port?I've used openvz for this, it's not realy virtualisation - all the virtual machines (asterisk-boxes) share the same linux kernel. If you want to use dahdi/meetme you will have to let the VE's use the /dev/dahdi devices but thats not very hard. -- Johan Wilfer email: johan at jttech.se JT Tech | Utvecklare webb: http://jttech.se direkt: +46 31 380 91 01 support: +46 31 380 91 00
Thorolf Godawa
2011-Jul-19 21:33 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
Hi,> so is it possible to install a separate instance of Asterisk on the same > machine (without using Vmware or such) and set the 2nd instance to > listen on another port?you might try it with Xen as virtualisation solution, because especially when using it with Linux as paravirtualised guest, it has very little overhead. Depending on the number of accounts and calls you might run into issues with latency and so on, but on a small environement with two Xen guest instances, each with one Asterisk, it runs quite good. KVM also might work, but I have no experience with that. -- Chau y hasta luego, Thorolf
Edwin Lam
2011-Jul-19 23:56 UTC
[asterisk-users] Multiple Asterisk Sessions on same machine
On 7/19/11 11:07 AM, Michael wrote:> > We would like Asterisk to listen on port 5060 and on an additional port. From what > we read online, it's not really possible, so is it possible to install a separate > instance of Asterisk on the same machine (without using Vmware or such) and set > the 2nd instance to listen on another port?all you have to do is setup port forwarding from an alternate port to 5060. we're doing that on our server. works like a charm. e.g. iptables -t nat -I PREROUTING 1 -i <your-interface> -d <your-ip-addr> \ -p udp -m udp --dport 6060 -j DNAT --to-destination <your-ip-addr>:5060 this sets up port 6060 to forward to 5060. -- Edwin Lam <edwin.lam at officegeneral.com> Systems Engineer, OfficeWyze, Inc. Ph: +1 415 439 4988 Fax: +1 415 283 3370 http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20