<br>I am using the Asterisk Version 1.4.<div><br></div><div>As per the logs, it looks that asterisk has not loaded the dialplan yet, the problem can be reproduced on Asterisk 1.4 by putting a bogus address in res_mysql.conf, which will result in asterisk trying to connect to</div>
<div>this bogus address and it will increase the loading time of asterisk.</div><div><br></div><div>Remark;</div><div>"I just checked that core waitfully booted" does not exist on 1.4, so probably i am likely to have this problem on 1.4"</div>
<div><br></div><div>Rgds,</div><div>Nitesh Bansal<br><br><div class="gmail_quote">On Thu, Oct 4, 2012 at 10:58 PM, Paul Belanger <span dir="ltr"><<a href="mailto:paul.belanger@polybeacon.com" target="_blank">paul.belanger@polybeacon.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="HOEnZb"><div class="h5">On 12-10-04 11:21 AM, nitesh bansal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Matthew,<br>
<br>
I am not sure if you understoood my problem. I would like to explain it<br>
again and hopefully it will clear up any confusion if there is any;<br>
<br>
"This is a kind of race condition. I understand that SIPPTest launches the<br>
SIPP scenarios as soon as it detects that Asterisk has started. But after<br>
asterisk is started, it takes some time to load all the<br>
modules. I believe that SIPPTest should wait for asterisk to fully load all<br>
the modules before it spawns the SIPP scenarios, because i don't see any<br>
point in initiating a call with asterisk if asterisk has not<br>
yet loaded the dialplan. "<br>
<br>
Awaiting your feedback.<br>
<br>
Regards,<br>
Nitesh Bansal<br>
<br>
<br>
<br>
On Thu, Oct 4, 2012 at 3:33 PM, Matthew Jordan <<a href="mailto:mjordan@digium.com" target="_blank">mjordan@digium.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10/04/2012 04:37 AM, nitesh bansal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello All,<br>
<br>
I am using SIPPTest class to write my own test cases in the asterisk<br>
testsuite. In most of the cases, run-test looks as follows<br>
<br>
<<<<<<<br>
<br>
SIPP_SCENARIOS = [<br>
{'scenario' : 'uas.xml',},<br>
{'scenario' : 'uac.xml',},<br>
<br>
]<br>
<br>
<br>
def main():<br>
test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)<br>
reactor.run()<br>
if not test.passed:<br>
return 1<br>
<br>
return 0<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>
<br>
All of my cases need Asterisk to go to the diaplan, but i have observed<br>
that somtimes, my SIPP test cases start running before asterisk has even<br>
loaded the dialplan, which causes testcas to fail.<br>
<br>
Is there any work around for this situation.<br>
</blockquote>
<br>
The SIPpTest class automatically starts the SIPp scenarios when it<br>
detects Asterisk has started. This works well when you have SIPp<br>
scenarios acting as a UAC that do not need to wait on a condition in<br>
Asterisk to start. Many SIP scenarios fall into that category. The<br>
SIPpTest class was written to accommodate those scenarios specifically.<br>
<br>
If, however, you have a scenario where you need to initiate something in<br>
Asterisk prior to starting the SIPp scenario, then the SIPpTest class is<br>
probably not appropriate. In that case, you may want to write a test<br>
that utilizes a SIPp scenario in the framework of a "regular" TestCase<br>
derived test. You can use one of the following:<br>
<br>
* SIPpScenario - manages a single SIPp instance. This class provides<br>
methods to control the SIPp instance, and to report on the<br>
success/failure of the scenario.<br>
<br>
* SIPpScenarioSequence - manage a sequential sequence of SIPpScenario<br>
executions. This is useful when you have multiple SIPp scenarios that<br>
have slight differences in behavior.<br>
<br>
There are a number of tests in the Test Suite that make use of these<br>
classes - you may want to look at any of the following tests for examples:<br>
* info_dtmf<br>
* SDP_attribute_passthrough<br>
* sip_hold<br>
* Any of the sip_custom_presence tests<br>
<br>
As an aside, if you ever do find yourself only needing the functionality<br>
exposed by SIPpTest, the capability to define the test completely in<br>
YAML was added to the Test Suite relatively recently. The<br>
channels/SIP/subscribe test demonstrates how to write such a test.<br>
<br>
</blockquote></blockquote>
<br></div></div>
What version of asterisk? Launch asterisk then enter to following on another console:<br>
<br>
$ asterisk -rx "core waitfullybooted"<br>
<br>
You should see: Asterisk has fully booted.<br>
<br>
That's how we tell if asterisk is ready to accept testing.<span class="HOEnZb"><font color="#888888"><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></font></span><div class="HOEnZb">
<div class="h5"><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>