Thanks for the suggestions. I'll be soon migrating to 1.11 and what i understand is that in 1.11, it won't be a problem, so that solves my problem;<br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 2:13 PM, Matthew Jordan <span dir="ltr"><<a href="mailto:mjordan@digium.com" target="_blank">mjordan@digium.com</a>></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 10/05/2012 03:11 AM, nitesh bansal wrote:<br>
><br>
> 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<br>
> in 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>
> "I just checked that core waitfully booted" does not exist on 1.4, so<br>
> probably i am likely to have this problem on 1.4"<br>
><br>
<br>
</div>Yikes. While the Asterisk Test Suite has been run against 1.4, it has<br>
been quite awhile since that occurred, and a lot has changed in it since<br>
that was anything close to a regular occurrence. There are certainly<br>
mechanisms in Asterisk 1.8+ that the Test Suite uses to orchestrate<br>
tests that won't be available to you.<br>
<br>
Is there a reason why you need res_mysql or res_mysql.conf?<br>
<br>
If you do, you may still be able to do this by writing your own test<br>
derived from Test Case. You could make a 'dummy' extension in your<br>
dialplan that simply answers a call. You can test for whether or not<br>
the dialplan is loaded by originating a local call into that extension<br>
and - if it succeeds - start your actual test. This is a bit hackish,<br>
and there are other ways you may approach doing this (such as adding an<br>
AMI event when the dialplan is fully loaded), but most other ways I can<br>
think of require modifying Asterisk itself.<br>
<br>
Something like this:<br>
<br>
extensions.conf:<br>
<br>
[default]<br>
<br>
exten => dummy,1,NoOp()<br>
same => n,Answer()<br>
same => n,Hangup()<br>
<br>
run-test.py:<br>
<br>
def ami_connect(self, ami):<br>
super(TestName, self).ami_connect(ami)<br>
<br>
<br>
self.__check_connected(ami)<br>
<br>
<br>
def self.__check_connected(self):<br>
<br>
def __originate_callback(self, result):<br>
''' Originate occurred successfully, call the actual test '''<br>
<br>
self.__start_sipp_test()<br>
return result<br>
<br>
def __originate_errback(self, result):<br>
''' Originate failed, call again in 2 seconds (or some other<br>
backoff time '''<br>
# The reactor timeout will eventually kill this and prevent<br>
# it from looping endlessly, but you may want a more elegant<br>
# way of eventually deciding that you aren't going to connect<br>
reactor.callLater(2, self.__check_connected)<br>
<br>
# If you have multiple Asterisk instances this will only test<br>
# against the first. You could do something here<br>
df = self.ami[0].originate(channel='Local/dummy@default',<br>
application='Echo')<br>
<br>
df.addCallbacks(self.__originate_callback, self.__originate_errback)<br>
<br>
<br>
def self.__start_sipp_test(self):<br>
<br>
# Start your SIPp test here using SIPpScenario<br>
<div class="im HOEnZb"><br>
<br>
<br>
--<br>
Matthew Jordan<br>
Digium, Inc. | Engineering Manager<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br>
<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
_____________________________________________________________________<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/mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br>