Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] recording in mp3


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
andrew at vsave.co.za
Guest





PostPosted: Mon Jun 30, 2014 3:11 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance.
--
Regards
Sameer Rathod8109413462


















--
Regards
Sameer Rathod8109413462
Back to top
sgriepentrog at digium...
Guest





PostPosted: Mon Jun 30, 2014 3:30 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech.  One of the better space savings options for recordings or voicemail is gsm.  Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:

Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes  will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance. 
--
Regards
Sameer Rathod8109413462 


















--
Regards
Sameer Rathod8109413462 






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org
Back to top
sameer at hostnsoft.com
Guest





PostPosted: Tue Jul 01, 2014 2:43 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

please help in packet2 packet bridging concept

I want peer2peer call and replay all the audio traffic via rtp directly to destination on public network behind the nat



On Tue, Jul 1, 2014 at 1:41 AM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:

Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes  will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance. 
--
Regards
Sameer Rathod8109413462 


















--
Regards
Sameer Rathod8109413462 






--
_____________________________________________________________________
-- 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



--
Regards
Sameer Rathod 8109413462 
Back to top
dreamer.binary at gmai...
Guest





PostPosted: Tue Jul 01, 2014 11:09 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



On 30/6/2014 23:30, Scott Griepentrog wrote:

Quote:
​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech. One of the better space savings options for recordings or voicemail is gsm. Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:
Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance.
--
Regards
Sameer Rathod 8109413462


















--
Regards
Sameer Rathod 8109413462






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org





Back to top
andrew at vsave.co.za
Guest





PostPosted: Tue Jul 01, 2014 11:13 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings




Sent from Samsung Mobile




-------- Original message --------
From: binary
Date:01/07/2014 6:09 PM (GMT+02:00)
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] recording in mp3


i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



On 30/6/2014 23:30, Scott Griepentrog wrote:

Quote:
​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech. One of the better space savings options for recordings or voicemail is gsm. Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:
Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance.
--
Regards
Sameer Rathod 8109413462


















--
Regards
Sameer Rathod 8109413462






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org





Back to top
mitul at enterux.in
Guest





PostPosted: Tue Jul 01, 2014 11:16 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

Move the .wav to diff server which has the processor to keep converting files in runtime.
Asterisk would never have direct file save to mp3 due to patent restrictions.
And pls Dont hijack the thread of packet filter. Open new email thread !!! On 01-Jul-2014 9:43 PM, "andrew Colin" <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:

Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings




Sent from Samsung Mobile




-------- Original message --------
From: binary
Date:01/07/2014 6:09 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: Re: [asterisk-users] recording in mp3


i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



On 30/6/2014 23:30, Scott Griepentrog wrote:

Quote:
​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech.  One of the better space savings options for recordings or voicemail is gsm.  Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:
Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes  will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance. 
--
Regards
Sameer Rathod [url=tel:8109413462]8109413462[/url] 


















--
Regards
Sameer Rathod [url=tel:8109413462]8109413462[/url] 






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: [url=tel:%2B1%20256%20428%206239]+1 256 428 6239[/url] · mobile: [url=tel:%2B1%20317%20507%204029]+1 317 507 4029[/url]
Check us out at: http://digium.com · http://asterisk.org








--
_____________________________________________________________________
-- 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
dreamer.binary at gmai...
Guest





PostPosted: Tue Jul 01, 2014 11:33 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

what is your interface?



On 1/7/2014 19:13, andrew Colin wrote:

Quote:
Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings




Sent from Samsung Mobile




-------- Original message --------
From: binary
Date:01/07/2014 6:09 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: Re: [asterisk-users] recording in mp3


i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



On 30/6/2014 23:30, Scott Griepentrog wrote:

Quote:
​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech. One of the better space savings options for recordings or voicemail is gsm. Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:
Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance.
--
Regards
Sameer Rathod 8109413462


















--
Regards
Sameer Rathod 8109413462






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org








Back to top
andrew at vsave.co.za
Guest





PostPosted: Tue Jul 01, 2014 1:12 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

Currently using tikal crystal call recording


Do you guys know of any better ones?






Sent from Samsung Mobile




-------- Original message --------
From: binary
Date:01/07/2014 6:33 PM (GMT+02:00)
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] recording in mp3


what is your interface?



On 1/7/2014 19:13, andrew Colin wrote:

Quote:
Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings




Sent from Samsung Mobile




-------- Original message --------
From: binary
Date:01/07/2014 6:09 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: Re: [asterisk-users] recording in mp3


i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



On 30/6/2014 23:30, Scott Griepentrog wrote:

Quote:
​You will not be able to able to save much space if any by using MP3 instead of ulaw or wav -- at least not without expending a lot of CPU time to encode the file at a very low bitrate which sounds pretty bad even with just speech. One of the better space savings options for recordings or voicemail is gsm. Of course, using an MP3 format just because you ​prefer that is understandable.


Additionally, I'm nearly 100% certain that Asterisk does not support encoding and directly writing MP3 files.





On Mon, Jun 30, 2014 at 3:11 PM, andrew Colin <andrew@vsave.co.za (andrew@vsave.co.za)> wrote:
Quote:
Hey guys


Is it possible to record with mixmonitor straight into mp3.


I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.








Sent from Samsung Mobile




-------- Original message --------
From: Sameer Rathod
Date:30/06/2014 9:23 PM (GMT+02:00)
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
Subject: [asterisk-users] Fwd: Regarding packet2packet bridging



Dear concern,



I want to configure packet2packet bridging in asterisk.

How could I do this any of the tutorial or instructions will help ?


I found the setting the canreinvite=yes will do the stuff but it is not working


I am using asterisk 12.3 version


I am very new to asterisk please help me in doing the same.


Thanks in advance.
--
Regards
Sameer Rathod 8109413462


















--
Regards
Sameer Rathod 8109413462






--
_____________________________________________________________________
-- 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




--
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org








Back to top
dplatt at radagast.org
Guest





PostPosted: Wed Jul 02, 2014 12:54 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

Quote:
Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings

If you're up to writing a bit of shell script, and are running
on Linux, you could automate the conversion process so that it
happens as soon as the recording is completed.

Look at the "inotify" system service (man section 7) and the
"inotifywatch" program. You can tell inotifywatch to monitor
files being written into a specific directory (or set of
directories) and output a series of events when files in this
directory are open or closed.

What you'd probably want to do, is catch the "close_write"
events (a file has been closed, and it had been opened in
a mode which allows it to be written). When you see a
close_write event for a recording file of the sort that
Asterisk writes, you'd check to see if it's been converted
to your desired format yet. If not, fire off a separate
task (e.g. via "batch") to convert it.

Here's a very simple script I did to do something like this...
run a periodic-processing script a few seconds after files
with a specific name pattern have been touched in any way.
It's not sophisticated enough to look only for close or
close_wait events, but it should give you the idea.

#!/bin/bash

function processevents () {
action=0
while true ; do
if [ $action == 0 ] ; then
timeout=300
else
timeout=5
fi
read -t $timeout event
if [ $? != 0 ] ; then
action=0
/data/soundchaser/periodic
else
if [[ $event =~ ".wav" || $event =~ ".gotit" ]] ; then
action=1
fi
fi
done
}

cd /data/soundchaser

inotifywait -m /data/soundchaser/public_html/done | processevents


--
_____________________________________________________________________
-- 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
tiago.geada at gmail.com
Guest





PostPosted: Thu Jul 03, 2014 2:04 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

no need.


mixmonitor has a argument that is a script ran just as the recording is finished.

we use this to move the file from ramfs to final destination.

you can use it to use sox and convert it...




On 2 July 2014 18:54, Dave Platt <dplatt@radagast.org (dplatt@radagast.org)> wrote:
Quote:

Quote:
Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings


If you're up to writing a bit of shell script, and are running
on Linux, you could automate the conversion process so that it
happens as soon as the recording is completed.

Look at the "inotify" system service (man section 7) and the
"inotifywatch" program.  You can tell inotifywatch to monitor
files being written into a specific directory (or set of
directories) and output a series of events when files in this
directory are open or closed.

What you'd probably want to do, is catch the "close_write"
events (a file has been closed, and it had been opened in
a mode which allows it to be written).  When you see a
close_write event for a recording file of the sort that
Asterisk writes, you'd check to see if it's been converted
to your desired format yet.  If not, fire off a separate
task (e.g. via "batch") to convert it.

Here's a very simple script I did to do something like this...
run a periodic-processing script a few seconds after files
with a specific name pattern have been touched in any way.
It's not sophisticated enough to look only for close or
close_wait events, but it should give you the idea.

#!/bin/bash

function processevents () {
 action=0
 while true ; do
   if [ $action == 0 ] ; then
       timeout=300
   else
       timeout=5
   fi
   read -t $timeout event
   if [ $? != 0 ] ; then
      action=0
      /data/soundchaser/periodic
   else
      if [[ $event =~ ".wav" || $event =~ ".gotit" ]] ; then
          action=1
      fi
   fi
 done
}

cd /data/soundchaser

inotifywait -m /data/soundchaser/public_html/done | processevents


--
_____________________________________________________________________
-- 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
andrew at vsave.co.za
Guest





PostPosted: Thu Jul 03, 2014 2:09 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

Can you explain?




Sent from Samsung Mobile




-------- Original message --------
From: Tiago Geada
Date:03/07/2014 9:04 PM (GMT+02:00)
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] recording in mp3


no need.


mixmonitor has a argument that is a script ran just as the recording is finished.

we use this to move the file from ramfs to final destination.

you can use it to use sox and convert it...




On 2 July 2014 18:54, Dave Platt <dplatt@radagast.org (dplatt@radagast.org)> wrote:
Quote:

Quote:
Problem with this is client needs to listen to the call recordings and my interface will only display .wav or .mp3 so they will moan if they have to wait until the next day for today's recordings


If you're up to writing a bit of shell script, and are running
on Linux, you could automate the conversion process so that it
happens as soon as the recording is completed.

Look at the "inotify" system service (man section 7) and the
"inotifywatch" program. You can tell inotifywatch to monitor
files being written into a specific directory (or set of
directories) and output a series of events when files in this
directory are open or closed.

What you'd probably want to do, is catch the "close_write"
events (a file has been closed, and it had been opened in
a mode which allows it to be written). When you see a
close_write event for a recording file of the sort that
Asterisk writes, you'd check to see if it's been converted
to your desired format yet. If not, fire off a separate
task (e.g. via "batch") to convert it.

Here's a very simple script I did to do something like this...
run a periodic-processing script a few seconds after files
with a specific name pattern have been touched in any way.
It's not sophisticated enough to look only for close or
close_wait events, but it should give you the idea.

#!/bin/bash

function processevents () {
action=0
while true ; do
if [ $action == 0 ] ; then
timeout=300
else
timeout=5
fi
read -t $timeout event
if [ $? != 0 ] ; then
action=0
/data/soundchaser/periodic
else
if [[ $event =~ ".wav" || $event =~ ".gotit" ]] ; then
action=1
fi
fi
done
}

cd /data/soundchaser

inotifywait -m /data/soundchaser/public_html/done | processevents


--
_____________________________________________________________________
-- 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: Thu Jul 03, 2014 2:22 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

Please don't top-post.

Please trim irrelevant posts.

Quote:
From: Tiago Geada

mixmonitor has a argument that is a script ran just as the recording is
finished.

we use this to move the file from ramfs to final destination.

you can use it to use sox and convert it...

On Thu, 3 Jul 2014, andrew Colin wrote:

Quote:
Can you explain?

I'm guessing 'core show application MixMonitor' should give you a good
start.

--
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
yadav.tirveni at gmail...
Guest





PostPosted: Thu Jul 03, 2014 11:50 pm    Post subject: [asterisk-users] recording in mp3 Reply with quote

On Tue, Jul 1, 2014 at 9:39 PM, binary <dreamer.binary@gmail.com> wrote:
Quote:

i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.



This method works for us too.

We get around 40 GB of recordings (wav) in around nine hours in a day.
Which is converted to mp3 in night and moved to a NAS through a Perl
script.

Perl program merges all -in and -out wav files using sox, then convers
to MP3 using twolame.


--
Regards,

Tirveni Yadav
www.udyansh.org

What is this Universe ? From what it arises ? Into what does it go?
In freedom it arises, In freedom it rests and into freedom it melts away.
Upanishads.

--
_____________________________________________________________________
-- 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
serov.d.p at gmail.com
Guest





PostPosted: Fri Jul 04, 2014 12:07 am    Post subject: [asterisk-users] recording in mp3 Reply with quote

converting wav to mp3

[sub-Monitor-Init]
exten => s,1,NoOp(Monitor Init)
exten => s,n,Set(_X-SRC_CHANNEL=${CHANNEL})
exten =>
s,n,Set(recMonitorFName=${STRFTIME(${EPOCH},,%Y_%m_%d)}/${STRFTIME(${EPOCH},,%Y_%m_%d_%H_%M_%S)}-${FILTER(0-9a-zA-Z,${ARG1})}-${FILTER(0-9a-zA-Z,${ARG2})})
exten => s,n,Set(CDR(record_file)=${recMonitorFName})
exten => s,n(exit),Return

[sub-Monitor]
exten => s,1,NoOp(Start recording)
exten => s,n,NoOp(audioreadformat: ${CHANNEL(audioreadformat)},
audionativeformat: ${CHANNEL(audionativeformat)}, audiowriteformat:
${CHANNEL(audiowriteformat)})
exten => s,n,GotoIf($["${ARG1}" = ""]?exit)
exten => s,n,Set(LOCAL(fName)=/var/www/asterisk_records/${ARG1})
exten => s,n,MixMonitor(${fname}.wav,b,/usr/local/bin/sox -q -r 8000 -c
1 ${fname}.wav ${fname}.mp3 && ${notifyCallEnded} ${ARG2})
exten => s,n(exit),Return(CONTINUE)

exten =>
s,n,GoSub(sub-Monitor-Init,s,1(${CALLERID(num)},${EXTEN},${agi_call_server}))
exten =>
s,n,Dial(SIP/server/${EXTEN},60,U(sub-Monitor,${recMonitorFName},${CDR(uniqueid)}))


04.07.2014 8:50, tirveni yadav пишет:
Quote:
On Tue, Jul 1, 2014 at 9:39 PM, binary <dreamer.binary@gmail.com> wrote:
Quote:
i would go for recording into wav.
then at regular intervals eg every night at 01:00 i would start a script to convert the wav to mp3 and then delete the wav files.
it is really easy.


This method works for us too.

We get around 40 GB of recordings (wav) in around nine hours in a day.
Which is converted to mp3 in night and moved to a NAS through a Perl
script.

Perl program merges all -in and -out wav files using sox, then convers
to MP3 using twolame.




--
_____________________________________________________________________
-- 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