[asterisk-users] Multiple Asterisk Sessions on same machine
Kevin P. Fleming
kpfleming at digium.com
Tue Jul 19 13:15:47 CDT 2011
On 07/19/2011 01:11 PM, Alex Balashov wrote:
> 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?
Actually, you can do this with one installation of Asterisk, and a
separate set of config files and data directories. When the Asterisk
executable is started, the '-C' option can be used to point to an
asterisk.conf file; that file can then tell it where all the other
config files and the data directories are located.
If you are using one of the init scripts, then yes, that would need to
be duplicated and modified.
--
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
More information about the asterisk-users
mailing list