mszlazak at aol.com Guest
|
Posted: Sat Mar 14, 2009 1:04 pm Post subject: [Freeswitch-users] Problem with detecting session.cause with |
|
|
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@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. A Good Credit Score is 700 or Above. See yours in just 2 easy steps! |
|