Hello,<div><br></div><div>I have included this patch in my source code and also included the code for CLI command &quot;core waitfullybooted&quot;, but it does not resolve my problem. I am running a testcase which spawn two instances of asterisk, where</div>
<div>first asterisk is placing a call to second asterisk. Here is the extract of my run-test:</div><div><br></div><div>-----------------------------------------------------------</div><div><div>   def ami_connect(self, ami):</div>
<div>      if <a href="http://ami.id">ami.id</a> == 0:</div><div>         print &quot;Asterisk 1 fully started&quot;</div><div>         self.receiving_asterisk = ami</div><div>         self.receiving_asterisk_booted = 1</div>
<div>         self.receiving_asterisk.registerEvent(&#39;UserEvent&#39;, self.fax_gateway_result)</div><div><br></div><div>      if <a href="http://ami.id">ami.id</a> == 1:</div><div>         print &quot;Asterisk 2 fully started&quot;</div>
<div>         self.calling_asterisk = ami</div><div>         self.calling_asterisk_booted = 1</div><div><br></div><div>      if (self.calling_asterisk_booted == 1 and self.receiving_asterisk_booted == 1):</div><div>         #Both the asterisk have booted, setup the call</div>
<div>         print &quot;Sending a call from ast2 to ast1&quot;</div><div>         self.calling_asterisk.registerEvent(&#39;UserEvent&#39;, self.fax_result)</div><div>         carrier_channel_variables = {&#39;SIPADDHEADER51&#39;:&#39;X-VCC-UUID:XE6RL7GAXFHIBHBECK7G5PZ6AM&#39;, &#39;SIPADDHEADER52&#39;:&#39;X-VCC-Provider:61 127.0.0.2 BEL&#39;,&#39;SIPADDHEADER53&#39;:&#39;X-VCC-CallType:voxfax&#39;}</div>
<div>         df = self.calling_asterisk.originate(channel = &quot;sip/ast1-g711/1234&quot;, context = &quot;sendfax&quot;, exten = &quot;1234&quot;, priority = &quot;1&quot;,variable = carrier_channel_variables)</div><div>
<br></div><div>         def handle_failure(reason):</div><div>            print &quot;Failed to send originate&quot;</div><div>            print reason.getTraceback()</div><div>            self.stop_reactor()</div><div><br>
</div><div>            return reason</div><div><br></div><div>         df.addErrback(handle_failure)</div><div>-------------------------------------------------------------</div><div><br></div><div>Bit when i run my testcase, i see that call is placed before asterisk has loaded its diaplan.</div>
<div><br></div><div>This is what i see in the logs:</div><div><br></div><div>----------------------------------------------------------------------------</div><div><div>[Oct 12 11:47:09] INFO[4489]: asterisk.TestCase:98 __init__: Executing tests/channels/SIP/VoxFax_G711</div>
<div>[Oct 12 11:47:09] INFO[4489]: asterisk.TestCase:143 create_asterisk: Creating Asterisk instance 1</div><div>[Oct 12 11:47:10] INFO[4489]: asterisk.TestCase:143 create_asterisk: Creating Asterisk instance 2</div><div>
[Oct 12 11:47:20] INFO[4489]: asterisk.TestCase:255 __start_asterisk: Starting Asterisk instance 1</div><div>[Oct 12 11:47:20] INFO[4489]: asterisk.TestCase:255 __start_asterisk: Starting Asterisk instance 2</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:123 connectionMade: Asterisk 127.0.0.1 - connection made</div>
<div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:123 connectionMade: Asterisk 127.0.0.2 - connection made</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:600 cli_exec: Executing [&#39;/usr/sbin/asterisk&#39;, &#39;-C&#39;, &#39;/tmp/asterisk-testsuite/channels/SIP/VoxFax_G711/ast1/etc/asterisk/asterisk.conf&#39;, &#39;-rx&#39;, &#39;core waitfullybooted&#39;] ...</div>
<div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:600 cli_exec: Executing [&#39;/usr/sbin/asterisk&#39;, &#39;-C&#39;, &#39;/tmp/asterisk-testsuite/channels/SIP/VoxFax_G711/ast2/etc/asterisk/asterisk.conf&#39;, &#39;-rx&#39;, &#39;core waitfullybooted&#39;] ...</div>
<div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:62 __cli_output_callback: Asterisk CLI 127.0.0.1 exited 1</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:63 __cli_output_callback: Unable to connect to remote asterisk (does /tmp/asterisk-testsuite/channels/SIP/VoxFax_G711/ast1/var/run/asterisk.ctl exist?)</div>
<div><br></div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:263 __wait_fully_booted_error: Asterisk core waitfullybooted failed, attempting again...</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:600 cli_exec: Executing [&#39;/usr/sbin/asterisk&#39;, &#39;-C&#39;, &#39;/tmp/asterisk-testsuite/channels/SIP/VoxFax_G711/ast1/etc/asterisk/asterisk.conf&#39;, &#39;-rx&#39;, &#39;core waitfullybooted&#39;] ...</div>
<div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:62 __cli_output_callback: Asterisk CLI 127.0.0.2 exited 0</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:63 __cli_output_callback:</div><div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:62 __cli_output_callback: Asterisk CLI 127.0.0.1 exited 0</div>
<div>[Oct 12 11:47:21] DEBUG[4489]: asterisk.asterisk:63 __cli_output_callback:</div><div>[Oct 12 11:47:21] INFO[4489]: asterisk.TestCase:167 create_ami_factory: Creating AMIFactory 1</div><div>[Oct 12 11:47:21] INFO[4489]: asterisk.TestCase:167 create_ami_factory: Creating AMIFactory 2</div>
<div>[Oct 12 11:47:21] INFO[4489]: AMI:136 connectionMade: Connection Made</div><div>[Oct 12 11:47:21] INFO[4489]: AMI:136 connectionMade: Connection Made</div></div><div><br></div><div><br></div><div>-----------------------------------------------------------------------------</div>
<div><br></div><div>You will observe in the logs that __cli_output_callback is printing an empty string. To debug it further, i launched asterisk manually and lanuched command &quot;sudo asterisk -rx &quot;core waitfullybooted&quot; from another</div>
<div>terminal, it seems to be working fine for me.</div><div><br></div><div>Any suggestions to debug it further are most welcome.</div><div><br></div><div>Regards,</div><div>Nitesh Bansal</div><br><div class="gmail_quote">
On Fri, Oct 5, 2012 at 5:04 PM, Paul Belanger <span dir="ltr">&lt;<a href="mailto:paul.belanger@polybeacon.com" target="_blank">paul.belanger@polybeacon.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 12-10-05 04:11 AM, nitesh bansal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am using the Asterisk Version 1.4.<br>
<br>
As per the logs, it looks that asterisk has not loaded the dialplan yet,<br>
the problem can be reproduced on Asterisk 1.4 by putting a bogus address in<br>
res_mysql.conf, which will result in asterisk trying to connect to<br>
this bogus address and it will increase the loading time of asterisk.<br>
<br>
Remark;<br>
&quot;I just checked that core waitfully booted&quot; does not exist on 1.4, so<br>
probably i am likely to have this problem on 1.4&quot;<br>
<br>
</blockquote></div>
So you must be using a version of asterisk before 1.4.33, if so you&#39;ll have to manually backport the patch[1].  Basically, the testsuite didn&#39;t exist before that, so there is no guarantee if will work either.<br>

<br>
[1] <a href="http://svnview.digium.com/svn/asterisk?view=revision&amp;revision=265570" target="_blank">http://svnview.digium.com/svn/<u></u>asterisk?view=revision&amp;<u></u>revision=265570</a><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Paul Belanger | PolyBeacon, Inc.<br>
Jabber: <a href="mailto:paul.belanger@polybeacon.com" target="_blank">paul.belanger@polybeacon.com</a> | IRC: pabelanger (Freenode)<br>
Github: <a href="https://github.com/pabelanger" target="_blank">https://github.com/pabelanger</a> | Twitter: <a href="https://twitter.com/pabelanger" target="_blank">https://twitter.com/pabelanger</a><br>
<br>
--<br>
______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
  <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br></div>