Re: [asterisk-users] file command with alaw file

2010-05-21 Thread Pham Quy
From alaw to wav, you can use Asterisk's CLI f   file
convert /var/lib/asterisk/sounds/soundfile.alaw 
/var/lib/asterisk/sounds/soundfile.wav

I want to have my record alaw automically be converted to mp3 (or wav)
right after finishing recording. How can I do it in dialplan? 


We are going to connect our asterisk to E1-Euro ISDN. AFASIK, it uses
G711 A-law for audio codec. Is it possible for me to save my recorded
audio file directly as wav files without calling CLI's file command (it
will be converted to mp3 later)?

Thanks for all your time and your wisdom
Quyps




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


Re: [asterisk-users] file command with alaw file

2010-05-21 Thread Danny Nicholas
Might not be the answer you seek, but you could put a QD AGI in-line to do
the CLI command for you. Something like this:
Exten = s,1,answer
Exten = s,n,record(file.alaw)
Exten = s,n,AGI(alaw2mp3.agi,file.alaw, file.mp3)
Exten = s,n,hangup

Alternatively, you could replace the AGI with a System command.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Pham Quy
Sent: Friday, May 21, 2010 5:04 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] file command with alaw file

From alaw to wav, you can use Asterisk's CLI f   file
convert /var/lib/asterisk/sounds/soundfile.alaw
/var/lib/asterisk/sounds/soundfile.wav

I want to have my record alaw automically be converted to mp3 (or wav)
right after finishing recording. How can I do it in dialplan? 


We are going to connect our asterisk to E1-Euro ISDN. AFASIK, it uses
G711 A-law for audio codec. Is it possible for me to save my recorded
audio file directly as wav files without calling CLI's file command (it
will be converted to mp3 later)?

Thanks for all your time and your wisdom
Quyps




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


Re: [asterisk-users] file command with alaw file

2010-05-20 Thread Steve Murphy
Quyps--

I've noticed in general that the ulaw, alaw, gsm, slin files used and
generated by
asterisk do not have headers (the RIFF stuff), and asterisk is not expecting
them. in general they
will louse up Asterisk's ability to play the sound. They are just raw data
and the extension
on the file name (.gsm, or .ulaw, etc) is the only clue to the file
format/contents.

In general, if you need a sound file of your own making in a certain format,
you can convert
to most of the formats using sox in linux, but really, the best thing to do
is record the source
sound file in cd-quality sound WAV format, in 44 khz sampling rate, or
higher, and then
use sox to convert to 8khz format. Asterisk can do some of this via the file
convert CLI
command, ( on the asterisk cli, type help file convert). You'd have to
judge for yourself
if file convert tt-weasels.gsm tt-weasels.ulaw which would convert the
8khz gsm format to
8 khz ulaw, or sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t sw
tt-weasels.raw;
sox -r 8000 -c 1 -t sw tt-weasels.raw -t ul tt-weasels.ulaw  which is the
way the Asterisk
sounds are produced from the the cd-quality sounds. They would seem a bit
equivalent.

I wonder if just sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t ul
tt-weasels.ulaw would
sound any better... you audio engineers out there may have an opinion.

I've personally noted that not all linux distributions provide the same
version of sox;
some distribute sox with an absolute minimum of sound formats built-in. You
may have
to go out and find all the libraries and roll your own sox.

murf





On Wed, May 19, 2010 at 10:34 PM, Pham Quy qu...@vega.com.vn wrote:

 On Mon, 2010-05-17 at 17:49 +0700, Pham Quy wrote:
  On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
   hi all,
  
   I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5 #1 SMP Tue
   Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) and do record
   audio clip with mixmonitor() as alaw file (softphone is also configured
   with alaw active only). Using file command i can get the following
   information
  
   983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
   ITU G.711 A-law, mono 8000 Hz
  
   But when i install the same system on Centos 5.5 (kernel 2.6.18-92.el5
   #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) i
   could get the same information with file command. File command
   recognized alaw file as JPEG image:
  
   983006584-20100517-123825.alaw: JPEG image data
  
   I guess i may miss something when i setup the new on on Centos 5.5, but
   u dont know what it is. Anyone have idea about this?
  
   please help.
  
   Thanks in advance.
   Quyps
 
  I did check content of two alaw files (using a hex editor) generated
  from two aboves cases. For the one fromo CentOS 5.2, beginning bytes
  look likes :
 
  riff1^0.wavefmt@...@...fact.^0.data.^0...
 
  and the one from CentOS 5.5
 
  ..RQVTVXEMBAX
 
  It seem like the first one have some information about file format,
  which make our convert tool works correctly, and which the second one
  doesnt have.
 
  Can you explain to me this different, and how can i get the information
  as the first one?
 
  Thanks in advances,
  Quyps

 This question have been asked for a while, I really need some help
 here?

 Thanks in advance.
 Quyps


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




-- 
Steve Murphy
ParseTree Corp
-- 
_
-- 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

Re: [asterisk-users] file command with alaw file

2010-05-20 Thread Pham Quy
Hi,

How can I convert FROM ALAW file, which generated by asterisk apps
(monitor, or record app), to format (wav or mp3) that is playable by
music player?? Can Sox do this?


I have an asterisk 1.6.2.6 on my CentOS 5.2. I record audio clip by
mixmonitor app and use file command to check the alaw output, and here
is output:

-
983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
ITU G.711 A-law, mono 8000 Hz
-

How could file command recognize the format as there is no header in the
output file? Or Did I probably miss something making asterisk yield
incorrect alaw files?

Please help, thanks

Quyps

On Thu, 2010-05-20 at 00:50 -0600, Steve Murphy wrote:
 Quyps--
 
 I've noticed in general that the ulaw, alaw, gsm, slin files used and
 generated by 
 asterisk do not have headers (the RIFF stuff), and asterisk is not
 expecting them. in general they
 will louse up Asterisk's ability to play the sound. They are just raw
 data and the extension
 on the file name (.gsm, or .ulaw, etc) is the only clue to the file
 format/contents.
 
 In general, if you need a sound file of your own making in a certain
 format, you can convert
 to most of the formats using sox in linux, but really, the best thing
 to do is record the source
 sound file in cd-quality sound WAV format, in 44 khz sampling rate, or
 higher, and then 
 use sox to convert to 8khz format. Asterisk can do some of this via
 the file convert CLI
 command, ( on the asterisk cli, type help file convert). You'd have
 to judge for yourself
 if file convert tt-weasels.gsm tt-weasels.ulaw which would convert
 the 8khz gsm format to
 8 khz ulaw, or sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t sw
 tt-weasels.raw;
 sox -r 8000 -c 1 -t sw tt-weasels.raw -t ul tt-weasels.ulaw  which
 is the way the Asterisk
 sounds are produced from the the cd-quality sounds. They would seem a
 bit equivalent.
 
 I wonder if just sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t ul
 tt-weasels.ulaw would
 sound any better... you audio engineers out there may have an opinion.
 
 I've personally noted that not all linux distributions provide the
 same version of sox;
 some distribute sox with an absolute minimum of sound formats
 built-in. You may have 
 to go out and find all the libraries and roll your own sox.
 
 murf
 
 
 
 
 
 On Wed, May 19, 2010 at 10:34 PM, Pham Quy qu...@vega.com.vn wrote:
 On Mon, 2010-05-17 at 17:49 +0700, Pham Quy wrote:
  On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
   hi all,
  
   I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5
 #1 SMP Tue
   Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux)
 and do record
   audio clip with mixmonitor() as alaw file (softphone is
 also configured
   with alaw active only). Using file command i can get the
 following
   information
  
   983006584-20100517-125002.alaw: RIFF (little-endian) data,
 WAVE audio,
   ITU G.711 A-law, mono 8000 Hz
  
   But when i install the same system on Centos 5.5 (kernel
 2.6.18-92.el5
   #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64
 GNU/Linux) i
   could get the same information with file command. File
 command
   recognized alaw file as JPEG image:
  
   983006584-20100517-123825.alaw: JPEG image data
  
   I guess i may miss something when i setup the new on on
 Centos 5.5, but
   u dont know what it is. Anyone have idea about this?
  
   please help.
  
   Thanks in advance.
   Quyps
 
  I did check content of two alaw files (using a hex editor)
 generated
  from two aboves cases. For the one fromo CentOS 5.2,
 beginning bytes
  look likes :
 
  riff1^0.wavefmt@...@...fact.^0.data.^0...
 
  and the one from CentOS 5.5
 
  ..RQVTVXEMBAX
 
  It seem like the first one have some information about file
 format,
  which make our convert tool works correctly, and which the
 second one
  doesnt have.
 
  Can you explain to me this different, and how can i get the
 information
  as the first one?
 
  Thanks in advances,
  Quyps
 
 This question have been asked for a while, I really need some
 help
 here?
 
 Thanks in advance.
 Quyps
 
 
 --
 _
 -- Bandwidth and Colocation Provided by
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every
 Thurs:
 

Re: [asterisk-users] file command with alaw file

2010-05-20 Thread Danny Nicholas
Sox v14.1.0 doesn't play with alaw, but AFAIK, Asterisk has this function
(this is from 1.4.30, think 1.6X has same functionality)
CLI help file convert
Usage: file convert file_in file_out
Convert from file_in to file_out. If an absolute path is not given, the
default Asterisk sounds directory will be used.

Example:
file convert tt-weasels.gsm tt-weasels.ulaw

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Pham Quy
Sent: Thursday, May 20, 2010 2:50 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] file command with alaw file

Hi,

How can I convert FROM ALAW file, which generated by asterisk apps
(monitor, or record app), to format (wav or mp3) that is playable by
music player?? Can Sox do this?


I have an asterisk 1.6.2.6 on my CentOS 5.2. I record audio clip by
mixmonitor app and use file command to check the alaw output, and here
is output:

-
983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
ITU G.711 A-law, mono 8000 Hz
-

How could file command recognize the format as there is no header in the
output file? Or Did I probably miss something making asterisk yield
incorrect alaw files?

Please help, thanks

Quyps

On Thu, 2010-05-20 at 00:50 -0600, Steve Murphy wrote:
 Quyps--
 
 I've noticed in general that the ulaw, alaw, gsm, slin files used and
 generated by 
 asterisk do not have headers (the RIFF stuff), and asterisk is not
 expecting them. in general they
 will louse up Asterisk's ability to play the sound. They are just raw
 data and the extension
 on the file name (.gsm, or .ulaw, etc) is the only clue to the file
 format/contents.
 
 In general, if you need a sound file of your own making in a certain
 format, you can convert
 to most of the formats using sox in linux, but really, the best thing
 to do is record the source
 sound file in cd-quality sound WAV format, in 44 khz sampling rate, or
 higher, and then 
 use sox to convert to 8khz format. Asterisk can do some of this via
 the file convert CLI
 command, ( on the asterisk cli, type help file convert). You'd have
 to judge for yourself
 if file convert tt-weasels.gsm tt-weasels.ulaw which would convert
 the 8khz gsm format to
 8 khz ulaw, or sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t sw
 tt-weasels.raw;
 sox -r 8000 -c 1 -t sw tt-weasels.raw -t ul tt-weasels.ulaw  which
 is the way the Asterisk
 sounds are produced from the the cd-quality sounds. They would seem a
 bit equivalent.
 
 I wonder if just sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t ul
 tt-weasels.ulaw would
 sound any better... you audio engineers out there may have an opinion.
 
 I've personally noted that not all linux distributions provide the
 same version of sox;
 some distribute sox with an absolute minimum of sound formats
 built-in. You may have 
 to go out and find all the libraries and roll your own sox.
 
 murf
 
 
 
 
 
 On Wed, May 19, 2010 at 10:34 PM, Pham Quy qu...@vega.com.vn wrote:
 On Mon, 2010-05-17 at 17:49 +0700, Pham Quy wrote:
  On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
   hi all,
  
   I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5
 #1 SMP Tue
   Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux)
 and do record
   audio clip with mixmonitor() as alaw file (softphone is
 also configured
   with alaw active only). Using file command i can get the
 following
   information
  
   983006584-20100517-125002.alaw: RIFF (little-endian) data,
 WAVE audio,
   ITU G.711 A-law, mono 8000 Hz
  
   But when i install the same system on Centos 5.5 (kernel
 2.6.18-92.el5
   #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64
 GNU/Linux) i
   could get the same information with file command. File
 command
   recognized alaw file as JPEG image:
  
   983006584-20100517-123825.alaw: JPEG image data
  
   I guess i may miss something when i setup the new on on
 Centos 5.5, but
   u dont know what it is. Anyone have idea about this?
  
   please help.
  
   Thanks in advance.
   Quyps
 
  I did check content of two alaw files (using a hex editor)
 generated
  from two aboves cases. For the one fromo CentOS 5.2,
 beginning bytes
  look likes :
 
  riff1^0.wavefmt@...@...fact.^0.data.^0...
 
  and the one from CentOS 5.5
 
  ..RQVTVXEMBAX
 
  It seem like the first one have some information about file
 format,
  which make our convert tool works correctly, and which the
 second one

Re: [asterisk-users] file command with alaw file

2010-05-20 Thread Steve Murphy
On Thu, May 20, 2010 at 1:49 AM, Pham Quy qu...@vega.com.vn wrote:

 Hi,

 How can I convert FROM ALAW file, which generated by asterisk apps
 (monitor, or record app), to format (wav or mp3) that is playable by
 music player?? Can Sox do this?


From alaw to wav, you can use Asterisk's CLI f   file convert
/var/lib/asterisk/sounds/soundfile.alaw
/var/lib/asterisk/sounds/soundfile.wav

to go from alaw to mp3, first convert to wav, then use lame options
/var/lib/asterisk/sounds/soundfile.wav
/var/lib/asterisk/sounds/soundfile.mp3

sox looks like it can ogg/vorbis, but mine doesn't list mp3. You might fetch
the source for sox and see if it can do mp3; lame is probably
just as easy to obtain and use.

murf



 I have an asterisk 1.6.2.6 on my CentOS 5.2. I record audio clip by
 mixmonitor app and use file command to check the alaw output, and here
 is output:

 -
 983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
 ITU G.711 A-law, mono 8000 Hz
 -

 How could file command recognize the format as there is no header in the
 output file? Or Did I probably miss something making asterisk yield
 incorrect alaw files?

 Please help, thanks

 Quyps

 On Thu, 2010-05-20 at 00:50 -0600, Steve Murphy wrote:
  Quyps--
 
  I've noticed in general that the ulaw, alaw, gsm, slin files used and
  generated by
  asterisk do not have headers (the RIFF stuff), and asterisk is not
  expecting them. in general they
  will louse up Asterisk's ability to play the sound. They are just raw
  data and the extension
  on the file name (.gsm, or .ulaw, etc) is the only clue to the file
  format/contents.
 
  In general, if you need a sound file of your own making in a certain
  format, you can convert
  to most of the formats using sox in linux, but really, the best thing
  to do is record the source
  sound file in cd-quality sound WAV format, in 44 khz sampling rate, or
  higher, and then
  use sox to convert to 8khz format. Asterisk can do some of this via
  the file convert CLI
  command, ( on the asterisk cli, type help file convert). You'd have
  to judge for yourself
  if file convert tt-weasels.gsm tt-weasels.ulaw which would convert
  the 8khz gsm format to
  8 khz ulaw, or sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t sw
  tt-weasels.raw;
  sox -r 8000 -c 1 -t sw tt-weasels.raw -t ul tt-weasels.ulaw  which
  is the way the Asterisk
  sounds are produced from the the cd-quality sounds. They would seem a
  bit equivalent.
 
  I wonder if just sox -v 0.7 tt-weasels.44khz.wav -r 8000 -c 1 -t ul
  tt-weasels.ulaw would
  sound any better... you audio engineers out there may have an opinion.
 
  I've personally noted that not all linux distributions provide the
  same version of sox;
  some distribute sox with an absolute minimum of sound formats
  built-in. You may have
  to go out and find all the libraries and roll your own sox.
 
  murf
 
 
 
 
 
  On Wed, May 19, 2010 at 10:34 PM, Pham Quy qu...@vega.com.vn wrote:
  On Mon, 2010-05-17 at 17:49 +0700, Pham Quy wrote:
   On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
hi all,
   
I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5
  #1 SMP Tue
Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux)
  and do record
audio clip with mixmonitor() as alaw file (softphone is
  also configured
with alaw active only). Using file command i can get the
  following
information
   
983006584-20100517-125002.alaw: RIFF (little-endian) data,
  WAVE audio,
ITU G.711 A-law, mono 8000 Hz
   
But when i install the same system on Centos 5.5 (kernel
  2.6.18-92.el5
#1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64
  GNU/Linux) i
could get the same information with file command. File
  command
recognized alaw file as JPEG image:
   
983006584-20100517-123825.alaw: JPEG image data
   
I guess i may miss something when i setup the new on on
  Centos 5.5, but
u dont know what it is. Anyone have idea about this?
   
please help.
   
Thanks in advance.
Quyps
  
   I did check content of two alaw files (using a hex editor)
  generated
   from two aboves cases. For the one fromo CentOS 5.2,
  beginning bytes
   look likes :
  
   riff1^0.wavefmt@...@...fact.^0.data.^0...
  
   and the one from CentOS 5.5
  
   ..RQVTVXEMBAX
  
   It seem like the first one have some information about file
  format,
   which make our convert tool works correctly, and which the
  second one
   doesnt have.
  
   

[asterisk-users] file command with alaw file

2010-05-20 Thread crjw
This may be totally irrelevant and it may send you down the wrong track, but I 
thought I would mention it:
There is a bug which can prevent recent versions of asterisk from creating 
proper headers in WAV files.
The bug shows up on Solaris systems but Linux is theoretically not immune to it.
If you are creating raw ulaw or alaw files you should probably not expect any 
headers when things are working normally.
But if you are creating wav files (which can contain alaw or ulaw data) and you 
find a bunch of null characters (0x0) in the header, then you may have hit the 
bug.
See: https://issues.asterisk.org/view.php?id=16610

 I did check content of two alaw files (using a hex editor) generated
 from two aboves cases. For the one fromo CentOS 5.2, beginning bytes
 look likes : 
 
 RIFF1^0.WAVEfmt at @...fact.^0.data.^0...
 
 and the one from CentOS 5.5 
 
 ..RQVTVXEMBAX
 
 It seem like the first one have some information about file format,
 which make our convert tool works correctly, and which the second one
 doesnt have.


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


Re: [asterisk-users] file command with alaw file

2010-05-19 Thread Pham Quy
On Mon, 2010-05-17 at 17:49 +0700, Pham Quy wrote:
 On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
  hi all,
  
  I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5 #1 SMP Tue
  Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) and do record
  audio clip with mixmonitor() as alaw file (softphone is also configured
  with alaw active only). Using file command i can get the following
  information
  
  983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
  ITU G.711 A-law, mono 8000 Hz
  
  But when i install the same system on Centos 5.5 (kernel 2.6.18-92.el5
  #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) i
  could get the same information with file command. File command
  recognized alaw file as JPEG image:
  
  983006584-20100517-123825.alaw: JPEG image data
  
  I guess i may miss something when i setup the new on on Centos 5.5, but
  u dont know what it is. Anyone have idea about this?
  
  please help.
  
  Thanks in advance.
  Quyps
 
 I did check content of two alaw files (using a hex editor) generated
 from two aboves cases. For the one fromo CentOS 5.2, beginning bytes
 look likes : 
 
 riff1^0.wavefmt@...@...fact.^0.data.^0...
 
 and the one from CentOS 5.5 
 
 ..RQVTVXEMBAX
 
 It seem like the first one have some information about file format,
 which make our convert tool works correctly, and which the second one
 doesnt have.
 
 Can you explain to me this different, and how can i get the information
 as the first one?
 
 Thanks in advances,
 Quyps

This question have been asked for a while, I really need some help
here? 

Thanks in advance.
Quyps 


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


[asterisk-users] file command with alaw file

2010-05-17 Thread Pham Quy
hi all,

I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5 #1 SMP Tue
Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) and do record
audio clip with mixmonitor() as alaw file (softphone is also configured
with alaw active only). Using file command i can get the following
information

983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
ITU G.711 A-law, mono 8000 Hz

But when i install the same system on Centos 5.5 (kernel 2.6.18-92.el5
#1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) i
could get the same information with file command. File command
recognized alaw file as JPEG image:

983006584-20100517-123825.alaw: JPEG image data

I guess i may miss something when i setup the new on on Centos 5.5, but
u dont know what it is. Anyone have idea about this?

please help.

Thanks in advance.
Quyps


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


Re: [asterisk-users] file command with alaw file

2010-05-17 Thread Pham Quy
On Mon, 2010-05-17 at 13:06 +0700, Pham Quy wrote:
 hi all,
 
 I install Asterisk 1.6 on Centos 5.2 (kernel 2.6.18-92.el5 #1 SMP Tue
 Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) and do record
 audio clip with mixmonitor() as alaw file (softphone is also configured
 with alaw active only). Using file command i can get the following
 information
 
 983006584-20100517-125002.alaw: RIFF (little-endian) data, WAVE audio,
 ITU G.711 A-law, mono 8000 Hz
 
 But when i install the same system on Centos 5.5 (kernel 2.6.18-92.el5
 #1 SMP Tue Jun 10 18:51:06 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux) i
 could get the same information with file command. File command
 recognized alaw file as JPEG image:
 
 983006584-20100517-123825.alaw: JPEG image data
 
 I guess i may miss something when i setup the new on on Centos 5.5, but
 u dont know what it is. Anyone have idea about this?
 
 please help.
 
 Thanks in advance.
 Quyps

I did check content of two alaw files (using a hex editor) generated
from two aboves cases. For the one fromo CentOS 5.2, beginning bytes
look likes : 

riff1^0.wavefmt@...@...fact.^0.data.^0...

and the one from CentOS 5.5 

..RQVTVXEMBAX

It seem like the first one have some information about file format,
which make our convert tool works correctly, and which the second one
doesnt have.

Can you explain to me this different, and how can i get the information
as the first one?

Thanks in advances,
Quyps


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