RecordFile returns prematurely
Hi guys, I'm having a slight issue with session.recordFile in javascript and session:recordFile in lua (i have tried both just to rule out the vm implementation). Basically every now and then (say 500 or 1000 calls) record.session ends prematurely, there are no errors in the logs, it just returns and because this is the last line in my script (lua or javascript) the call ends and I see: 2010-08-31 12:52:08.469761 [NOTICE] switch_core_state_machine.c:185 sofia/external/nobody@192.168.21.5 has executed the last dialplan instruction, hanging up. 2010-08-31 12:52:08.469761 [DEBUG] switch_channel.c:2309 (sofia/external/nobody@192.168.21.5) Callstate Change ACTIVE -> HANGUP 2010-08-31 12:52:08.469761 [NOTICE] switch_core_state_machine.c:187 Hangup sofia/external/nobody@192.168.21.5 [CS_EXECUTE] [NORMAL_CLEARING] 2010-08-31 12:52:08.473766 [DEBUG] switch_channel.c:2325 Send signal sofia/external/nobody@192.168.21.5 [KILL] 2010-08-31 12:52:08.473766 [DEBUG] switch_core_session.c:1039 Send signal sofia/external/nobody@192.168.21.5 [BREAK] 2010-08-31 12:52:08.473766 [DEBUG] switch_core_state_machine.c:348 (sofia/external/nobody@192.168.21.5) State EXECUTE going to sleep 2010-08-31 12:52:08.473766 [DEBUG] switch_core_state_machine.c:314 (sofia/external/nobody@192.168.21.5) Running State Change CS_HANGUP 2010-08-31 12:52:08.473766 [DEBUG] switch_core_state_machine.c:535 (sofia/external/nobody@192.168.21.5) State HANGUP 2010-08-31 12:52:08.473766 [DEBUG] mod_sofia.c:453 Channel sofia/external/nobody@192.168.21.5 hanging up, cause: NORMAL_CLEARING 2010-08-31 12:52:08.473766 [DEBUG] mod_sofia.c:496 Sending BYE to sofia/external/nobody@192.168.21.5 I am only passing one argument, the wav file, so it should record forever or until the call is hung up externally (I believe those are the defaults from looking at source). I'm on FreeSWITCH Version 1.0.head (git-a7c80ae 2010-08-02 16-06-46 -0500), I wish I had more logging or some indication of why the record function is ending prematurely. Is there any anything that others might know why this would return. As a quick fix, is there a way I could check to see if the call is still going and call session:recordFile again and append to the existing UL file?
Right, session.recordFile returns, its the last line in my lua|javascript script, and the dial plan has nothing left to execute so it hangs up. The question is why is session.recordFile returning when it should be blocking until the call is hung up (remotely). There is no bye or media disconnect from the far end, the record call is just returning and freeswitch is then hanging the call up and sending a bye to the far end client as there's nothing left to do. ----- Original Message ----- From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, September 1, 2010 4:32:48 PM Subject: Re: [Freeswitch-users] RecordFile returns prematurely Read this line. /b On Sep 1, 2010, at 5:12 PM, Dan wrote:
has executed the last dialplan instruction, hanging up.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
because your script exited and you didn't set the autoHangup to false. See mod_lua wiki page. /b On Sep 1, 2010, at 6:53 PM, Dan wrote:
Right, session.recordFile returns, its the last line in my lua|javascript script, and the dial plan has nothing left to execute so it hangs up. The question is why is session.recordFile returning when it should be blocking until the call is hung up (remotely). There is no bye or media disconnect from the far end, the record call is just returning and freeswitch is then hanging the call up and sending a bye to the far end client as there's nothing left to do. ----- Original Message ----- From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, September 1, 2010 4:32:48 PM Subject: Re: [Freeswitch-users] RecordFile returns prematurely
Read this line.
/b
participants (2)
-
Brian West
-
Dan