Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Help with a bug


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
venefax at gmail.com
Guest





PostPosted: Wed Apr 23, 2014 1:23 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

Dear friends
I filed a bug
https://issues.asterisk.org/jira/browse/ASTERISK-23656
but I am wondering if somebody can figure a workaround. I am stuck
trying to deliver an application.
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.
It does not help if after the Record application I do SHELL(sync).
Asterisk has not flushed the file out to the OS and it already
returned. Maybe the application record should have a parameter about
this behavior. For some application is fine, for some others is not.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
joshdmetzger at gmail.com
Guest





PostPosted: Wed Apr 23, 2014 1:29 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

How many seconds later does the file show up?  Can you just throw in a Wait() (maybe 1 or 2 seconds) and then do the Playback, or would even a second or two of delay be an issue (or does it still not work)?


-Josh




On Wed, Apr 23, 2014 at 2:23 PM, CDR <venefax@gmail.com (venefax@gmail.com)> wrote:
Quote:
Dear friends
I filed a bug
https://issues.asterisk.org/jira/browse/ASTERISK-23656
but I am wondering if somebody can figure a workaround. I am stuck
trying to deliver an application.
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.
It does not help if after the Record application I do SHELL(sync).
Asterisk has not flushed the file out to the OS and it already
returned. Maybe the application record should have a parameter about
this behavior. For some application is fine, for some others is not.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
joshdmetzger at gmail.com
Guest





PostPosted: Wed Apr 23, 2014 1:35 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

As a second possible solution, instead of "Record", could you use MixMonitor, then run "StopMixMonitor" and THEN do your Playback?  That should definitely make sure the recording file is closed and the file handle released.


-Josh



On Wed, Apr 23, 2014 at 2:29 PM, Josh Metzger <joshdmetzger@gmail.com (joshdmetzger@gmail.com)> wrote:
Quote:
How many seconds later does the file show up?  Can you just throw in a Wait() (maybe 1 or 2 seconds) and then do the Playback, or would even a second or two of delay be an issue (or does it still not work)?


-Josh




On Wed, Apr 23, 2014 at 2:23 PM, CDR <venefax@gmail.com (venefax@gmail.com)> wrote:
Quote:
Dear friends
I filed a bug
https://issues.asterisk.org/jira/browse/ASTERISK-23656
but I am wondering if somebody can figure a workaround. I am stuck
trying to deliver an application.
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.
It does not help if after the Record application I do SHELL(sync).
Asterisk has not flushed the file out to the OS and it already
returned. Maybe the application record should have a parameter about
this behavior. For some application is fine, for some others is not.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





Back to top
EWieling at nyigc.com
Guest





PostPosted: Wed Apr 23, 2014 1:40 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

Doesn't MixMonitor use sox to combine the incoming and outgoing recordings? If so, I'd expect MixMonitor to add MORE delay, not less.

-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Josh Metzger
Sent: Wednesday, April 23, 2014 2:35 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Help with a bug

As a second possible solution, instead of "Record", could you use MixMonitor, then run "StopMixMonitor" and THEN do your Playback? That should definitely make sure the recording file is closed and the file handle released.


-Josh



On Wed, Apr 23, 2014 at 2:29 PM, Josh Metzger <joshdmetzger@gmail.com> wrote:


How many seconds later does the file show up? Can you just throw in a Wait() (maybe 1 or 2 seconds) and then do the Playback, or would even a second or two of delay be an issue (or does it still not work)?


-Josh




On Wed, Apr 23, 2014 at 2:23 PM, CDR <venefax@gmail.com> wrote:


Dear friends
I filed a bug
https://issues.asterisk.org/jira/browse/ASTERISK-23656
but I am wondering if somebody can figure a workaround. I am stuck
trying to deliver an application.
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.
It does not help if after the Record application I do SHELL(sync).
Asterisk has not flushed the file out to the OS and it already
returned. Maybe the application record should have a parameter about
this behavior. For some application is fine, for some others is not.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
joshdmetzger at gmail.com
Guest





PostPosted: Wed Apr 23, 2014 1:52 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

That's the case with "Monitor" (apparently), but "MixMonitor" grabs both ends of the call.  On a system I ran with lots of MixMonitor recording, Asterisk renamed / moved the recording file when a call completed, and that happened without any delay at all.  Only one file was created for the entire call.


On Wed, Apr 23, 2014 at 2:39 PM, Eric Wieling <EWieling@nyigc.com (EWieling@nyigc.com)> wrote:
Quote:
Doesn't MixMonitor use sox to combine the incoming and outgoing recordings?   If so, I'd expect MixMonitor to add MORE delay, not less.

-----Original Message-----
From: asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com) [mailto:asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com)] On Behalf Of Josh Metzger
Sent: Wednesday, April 23, 2014 2:35 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Help with a bug

As a second possible solution, instead of "Record", could you use MixMonitor, then run "StopMixMonitor" and THEN do your Playback?  That should definitely make sure the recording file is closed and the file handle released.


-Josh



On Wed, Apr 23, 2014 at 2:29 PM, Josh Metzger <joshdmetzger@gmail.com (joshdmetzger@gmail.com)> wrote:


        How many seconds later does the file show up?  Can you just throw in a Wait() (maybe 1 or 2 seconds) and then do the Playback, or would even a second or two of delay be an issue (or does it still not work)?


        -Josh




        On Wed, Apr 23, 2014 at 2:23 PM, CDR <venefax@gmail.com (venefax@gmail.com)> wrote:


                Dear friends
                I filed a bug
                https://issues.asterisk.org/jira/browse/ASTERISK-23656
                but I am wondering if somebody can figure a workaround. I am stuck
                trying to deliver an application.
                The case is this: A Record is executed and an immediate Playback
                follows. Asterisk returns an error, saying that the file does not
                exist, but a few seconds later, it does.
                It does not help if after the Record application I do SHELL(sync).
                Asterisk has not flushed the file out to the OS and it already
                returned. Maybe the application record should have a parameter about
                this behavior. For some application is fine, for some others is not.

                --
                _____________________________________________________________________
                -- Bandwidth and Colocation Provided by http://www.api-digital.com --
                New to Asterisk? Join us for a live introductory webinar every Thurs:
                               http://www.asterisk.org/hello

                asterisk-users mailing list
                To UNSUBSCRIBE or update options visit:
                   http://lists.digium.com/mailman/listinfo/asterisk-users




--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Back to top
asterisk.org at sedwar...
Guest





PostPosted: Wed Apr 23, 2014 2:05 pm    Post subject: [asterisk-users] Help with a bug Reply with quote

On Wed, 23 Apr 2014, CDR wrote:

Quote:
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.

A simple test:

exten = *,n,record(foo.wav)
exten = *,n,playback(foo)

works as expected for me with Asterisk 11.8.1.

I notice in the console log you uploaded, you have a file name of
'18000000000-industry:sln'

The syntax for record says 'filename.format' not 'filename:format'

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
asterisk_list at earth...
Guest





PostPosted: Thu Apr 24, 2014 4:21 am    Post subject: [asterisk-users] Help with a bug Reply with quote

On Wednesday 23 Apr 2014, CDR wrote:
Quote:
Dear friends
I filed a bug
https://issues.asterisk.org/jira/browse/ASTERISK-23656
but I am wondering if somebody can figure a workaround. I am stuck
trying to deliver an application.
The case is this: A Record is executed and an immediate Playback
follows. Asterisk returns an error, saying that the file does not
exist, but a few seconds later, it does.
It does not help if after the Record application I do SHELL(sync).
Asterisk has not flushed the file out to the OS and it already
returned. Maybe the application record should have a parameter about
this behavior. For some application is fine, for some others is not.

You have run up against a race condition. Not unusual in asynchronous
environments.

As a workaround, I would advise handing over starting the recording to an AGI
script. But don't do the usual
fork && exit
Instead, start the recording; and then just loop, until *either* a "-e" test
shows that the recording file definitely exists within the file system, or you
have waited far too long.

--
AJS

Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services