[Freeswitch-users] Problem with detecting session.cause with Linksys adaptor

mszlazak at aol.com mszlazak at aol.com
Sat Mar 14 10:50:57 PDT 2009


Hello,



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 might be "hanging up"
the PSTN side of the adaptor from FS side. 



Anyway here's the problem. If I then try originating an outbound call from FS through the pstn
side of the adaptor and if a caller on the analogue line has not
hung 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 line is busy for
some reason with the following code.


var s;

while (tryCalling()) {}
s.hangup();
exit();

function tryCalling() {
??? s = new Session("sofia/gateway/spa3102/14082031170 at 10.0.0.5:5061");
??? s.waitForAnswer(30000);
??? 
??? if (s.cause == "USER_BUSY") { 
??? ??? return true;
??? }

??? if (s.ready()) {
??? ??? s.sleep(1000);
??? ??? s.speak("cepstral","Callie","Hello from Gino Mick Gelato");
??? }
??? return false;
}

I've also tried the above with ignore_early_media=true but no luck.


Thanks.



Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090314/0c3aabb9/attachment-0002.html 


More information about the FreeSWITCH-users mailing list