Hello,<br>

<br>

I have an analogue line connected to SPA3102 which then sends calls to
my FreeSwitch (FS) application. I can originate a call from FS and dial
out the analogue line almost fine. However, an issue seems to be
detecting if the PSTN line is busy. Another issue <font face="Arial, Helvetica, sans-serif">might be </font>"hang<font face="Arial, Helvetica, sans-serif">ing </font>up"
the PSTN side of the adaptor from FS<font face="Arial, Helvetica, sans-serif"> side</font>. <br>

<br>

Anyway here's the problem. <font face="Arial, Helvetica, sans-serif">I</font>f I then try originating a<font face="Arial, Helvetica, sans-serif">n outbound</font> call from FS through the pstn
side of the adaptor<font face="Arial, Helvetica, sans-serif"> and</font> if a caller <font face="Arial, Helvetica, sans-serif">on </font>the analogue line has not
hung<font face="Arial, Helvetica, sans-serif"> </font>up then they hear FS dialing and any automated message that FS then
sends. I can not seem to detect from FS if the PSTN <font face="Arial, Helvetica, sans-serif">line</font> is busy for
some reason<font face="Arial, Helvetica, sans-serif"> with the following code.</font><br>

<font face="Arial, Helvetica, sans-serif"><br>
var s;<br>
<br>
while (tryCalling()) {}<br>
s.hangup();<br>
exit();<br>
<br>
function tryCalling() {<br>
&nbsp;&nbsp;&nbsp; s = new Session("sofia/gateway/spa3102/14082031170@10.0.0.5:5061");<br>
&nbsp;&nbsp;&nbsp; s.waitForAnswer(30000);<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; if (s.cause == "USER_BUSY") { <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp; if (s.ready()) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; s.sleep(1000);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; s.speak("cepstral","Callie","Hello from Gino Mick Gelato");<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; return false;<br>
}<br>
<br>
I've also tried the above with ignore_early_media=true but no luck.<br>
<br>
</font>
Thanks.<br>

<br>

Mark.<div id='MAILCIADA034-5c4749bbee813e0' class='aol_ad_footer'><br/><font style="color:black;font:normal 10pt arial,san-serif;"> <hr style="margin-top:10px"/><b>A Good Credit Score is 700 or Above. <a href="http://pr.atwola.com/promoclk/100126575x1220439616x1201372437/aol?redir=http:%2F%2Fwww.freecreditreport.com%2Fpm%2Fdefault.aspx%3Fsc%3D668072%26hmpgID%3D62%26bcd%3DfebemailfooterNO62"> See yours in just 2 easy steps!</a></b></font> </div>