[asterisk-dev] Muti Asterisk
Russell Bryant
russell at digium.com
Mon Jun 21 06:50:49 CDT 2010
----- Original Message -----
> On Sat, Jun 19, 2010 at 05:32:58AM -0400, CDR wrote:
> > Could you send me details of your installation?
>
> What you need is:
>
> 1. Start asterisk with a custom asterisk.conf
> 2. Fix pathes in asterisk.conf
> 3. Fix other common resources, such as port numbers
>
> (3) is rather obvious: you can't have two Asterisk instances listening
> on UDP port 5060. Either fix the port number, or maybe you want only
> one
> of them to listen on SIP? Alternatively, keep multiple IP addresses,
> and
> assign one per instance.
>
> As for (2), look into contrib/scripts/live_ast[1]
>
> (1) takes a really simple tweak into any Asterisk startup script.
> Expecially if you already have a wrapper such as the one generated by
> live_ast. Stopping / Restarting it in a reliable way may be slightly
> more tricky, though. Specifically the test for "is the asterisk
> executable running" is not reliable enough, and you should probably
> rely
> solely on PID files, or on a babysitting parent process.
>
> [1] http://svn.digium.com/svn/asterisk/trunk/contrib/scripts/live_ast
You can find more examples of running multiple concurrent Asterisk instances in the test suite [2]. In many of the test cases, multiple instances of Asterisk are started up to be able to send calls between them. Both asttest for lua and lib/python/asterisk/ in the testsuite implement an Asterisk class that handles all of the details of creating another instance.
The classes automated Tzafrir's step 1 and 2. They leave step 3 up to the test developer by allowing a way to specify custom pre-made configuration files for each instance.
[2] $ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk
--
Russell Bryant
Digium, Inc. | Engineering Manager, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
jabber: rbryant at digium.com -=- skype: russell-bryant
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org
More information about the asterisk-dev
mailing list