<br>I&#39;ve written a program that tests ISDN dial backup at 1,000 locations. I&#39;ve broken up the logic into server functions within a threading class (i.e. logon, get interfaces, get dial string, etc.). At 999 locations, the following code extract the first of three dial strings:
<br><br>&nbsp;&nbsp;&nbsp; def GetDialString(self):<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;&quot;&quot; This function extracts the dial string.&quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.tn.write(&quot;term len 0\n&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.tn.expect([self.host.upper() + &quot;#&quot;], 7)
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.tn.write(&quot;sh dialer | i Default\n&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self.data = self.tn.read_until(self.host.upper() + &quot;#&quot;, 7)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print self.data<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; match = re.search(&quot;\d\d\d\d\d\d\d\d\d\d\d+&quot;, 
self.data)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if match is not None:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rc = match.group()<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rc = &quot;missing&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return rc<br><br>One location doesn&#39;t return it&#39;s dial string. In Idle, the output is:
<br><br><span style="color: rgb(51, 102, 255);">&gt;&gt;&gt; print data</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">sh dialer | i Default</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">17002111000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; 8w2d&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; successful&nbsp;&nbsp; Default</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">17002111002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; never&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp; Default
</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">17002111001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; never&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp; Default</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">
J07MR3640#</span><br><br>The &quot;print data&quot; statement yields:<br><br><span style="color: rgb(51, 102, 255);">term len 0</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">J07MR3640#
</span><br><br>I&#39;ve run a packet capture and I see the data coming back every time. I don&#39;t understand why it works fine for 999 out of 1,000 locations. Any suggestions?<br>