Re: [asterisk-users] realtime sip peers : musiconhold class

2010-08-19 Thread Jonas Kellens

Converting with sox works well as followed :

sox -V intro.wav -c 1 -r 8000 intro2.wav

To convert with asterisk convert, I needed to use an absolute path :

asterisk -rx file convert /var/lib/asterisk/moh/folder/intro.wav 
/var/lib/asterisk/folder/intro.alaw



All works well.


Jonas.

On 08/19/2010 02:31 AM, Nasir Iqbal wrote:

Hi

to convert wav file use following

sox 'orgFile' -w -r 8000 -c 1 -s  'fixedFile'

while replace orgFile and fixedFile with actual filenames


If still now luck try with mp3

Regards
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-18 Thread Nasir Iqbal
Hi

to convert wav file use following

sox 'orgFile' -w -r 8000 -c 1 -s  'fixedFile'

while replace orgFile and fixedFile with actual filenames


If still now luck try with mp3

Regards
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-17 Thread Jonas Kellens
Can anyone help because I don't understand why Asterisk can not read the 
input file, there is not much info given...


2 files :

[r...@asterisk testing]# file testExtended.wav
testExtended.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 
16 bit, stereo 44100 Hz

[r...@asterisk testing]# file testLong.wav
testLong.wav: RIFF (little-endian) data, WAVE audio, 20294 channels 
1414676809 Hz


to mono :

[r...@asterisk testing]# sox testExtended.wav -r 8000 -c1 
testExtended2.wav resample -ql

sox sox: effect `resample' is deprecated; see sox(1) for an alternative
[r...@asterisk testing]# sox testLong.wav -r 8000 -c1 testLong2.wav 
resample -ql

sox sox: effect `resample' is deprecated; see sox(1) for an alternative
sox effects: resample clipped 2 samples; decrease volume?

afterwards :

[r...@asterisk testing]# file testLong2.wav
testLong2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 
bit, mono 8000 Hz

[r...@asterisk testing]# file testExtended2.wav
testExtended2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 
16 bit, mono 8000 Hz


But Asterisk can not open them :

[r...@asterisk testing]# asterisk -rx file convert testExtended2.wav 
testExtended2.alaw

Unable to open input file: testExtended2.wav
[r...@asterisk testing]# asterisk -rx file convert testLong2.wav 
testLong2.alaw

Unable to open input file: testLong2.wav


Any thoughts ?!


Jonas.




On 08/14/2010 04:30 PM, Motiejus Jakštys wrote:
On Sat, Aug 14, 2010 at 4:24 PM, Jonas Kellens 
jonas.kell...@telenet.be mailto:jonas.kell...@telenet.be wrote:


 intro extended version.wav: RIFF (little-endian) data, WAVE audio, 
Microsoft

 PCM, 16 bit, stereo 44100 Hz


You need *MONO, 8000Hz*

$ man sox

--
Motiejus Jakštys
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-17 Thread Tiago Geada
Hi.

Just to let you know, we record voices with audacity, and export audio as
flac, just in case we need to edit it.

Then I have the following sh script:

o# cat convert.sh
#!/bin/sh

today=$(date +%F);

mkdir -p $today/flac;
mkdir -p $today/wav;
mkdir -p $today/ul;

for i in *.flac;
do
echo 
echo Processing $i;
echo 
#$filename=
sox $i -r 8000 -c 1 $(echo $i|rev|cut -d . -f2-10|rev).wav;
normalize-audio -a 25dB $(echo $i|rev|cut -d . -f2-10|rev).wav;
mv $i $today/flac/;
sox $(echo $i|cut -d . -f1).wav $(echo $i|rev|cut -d .
-f2-10|rev).ul;
mv $(echo $i|rev|cut -d . -f2-10|rev).wav $today/wav/;
mv $(echo $i|rev|cut -d . -f2-10|rev).ul $today/ul/;
echo ;
done

echo All done;


On 17 August 2010 08:07, Jonas Kellens jonas.kell...@telenet.be wrote:

  Can anyone help because I don't understand why Asterisk can not read the
 input file, there is not much info given...

 2 files :

 [r...@asterisk testing]# file testExtended.wav
 testExtended.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
 bit, stereo 44100 Hz
 [r...@asterisk testing]# file testLong.wav
 testLong.wav: RIFF (little-endian) data, WAVE audio, 20294 channels
 1414676809 Hz

 to mono :

 [r...@asterisk testing]# sox testExtended.wav -r 8000 -c1
 testExtended2.wav resample -ql

 sox sox: effect `resample' is deprecated; see sox(1) for an alternative
 [r...@asterisk testing]# sox testLong.wav -r 8000 -c1 testLong2.wav
 resample -ql

 sox sox: effect `resample' is deprecated; see sox(1) for an alternative
 sox effects: resample clipped 2 samples; decrease volume?

 afterwards :

 [r...@asterisk testing]# file testLong2.wav
 testLong2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
 bit, mono 8000 Hz
 [r...@asterisk testing]# file testExtended2.wav
 testExtended2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16
 bit, mono 8000 Hz

 But Asterisk can not open them :

 [r...@asterisk testing]# asterisk -rx file convert testExtended2.wav
 testExtended2.alaw
 Unable to open input file: testExtended2.wav
 [r...@asterisk testing]# asterisk -rx file convert testLong2.wav
 testLong2.alaw
 Unable to open input file: testLong2.wav


 Any thoughts ?!


 Jonas.



 On 08/14/2010 04:30 PM, Motiejus Jakštys wrote:

 On Sat, Aug 14, 2010 at 4:24 PM, Jonas Kellens jonas.kell...@telenet.be
 wrote:
 
  intro extended version.wav: RIFF (little-endian) data, WAVE audio,
 Microsoft
  PCM, 16 bit, stereo 44100 Hz
 

 You need *MONO, 8000Hz*

 $ man sox

 --
 Motiejus Jakštys


 --
 _
 -- 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] realtime sip peers : musiconhold class

2010-08-15 Thread Jonas Kellens

I took this from the wiki, but it's not working :

[r...@asterisk testing]# sox test.wav -r 8000 -c1 test.alaw resample -ql
sox sox: effect `resample' is deprecated; see sox(1) for an alternative
sox formats: no handler for file extension `alaw'



Jonas.

On 08/14/2010 04:30 PM, Motiejus Jakštys wrote:
On Sat, Aug 14, 2010 at 4:24 PM, Jonas Kellens 
jonas.kell...@telenet.be mailto:jonas.kell...@telenet.be wrote:


 intro extended version.wav: RIFF (little-endian) data, WAVE audio, 
Microsoft

 PCM, 16 bit, stereo 44100 Hz


You need *MONO, 8000Hz*

$ man sox

--
Motiejus Jakštys
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-15 Thread Jonas Kellens

And even when I think the format is correct :

[r...@asterisk testing]# sox test.wav -r 8000 -c1 test.wav resample -ql
sox sox: effect `resample' is deprecated; see sox(1) for an alternative
sox wav: Premature EOF on .wav input file

[r...@asterisk testing]# file test.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, 
mono 8000 Hz



It is still not working :

[r...@asterisk testing]# asterisk -rx file convert test.wav test.alaw
Unable to open input file: test.wav



Jonas.

On 08/14/2010 04:30 PM, Motiejus Jakštys wrote:
On Sat, Aug 14, 2010 at 4:24 PM, Jonas Kellens 
jonas.kell...@telenet.be mailto:jonas.kell...@telenet.be wrote:


 intro extended version.wav: RIFF (little-endian) data, WAVE audio, 
Microsoft

 PCM, 16 bit, stereo 44100 Hz


You need *MONO, 8000Hz*

$ man sox

--
Motiejus Jakštys
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-14 Thread Jonas Kellens

I have another file that reads :

[r...@asterisk ]# file intro\ extended\ version.wav
intro extended version.wav: RIFF (little-endian) data, WAVE audio, 
Microsoft PCM, 16 bit, stereo 44100 Hz


With the same result :

[r...@asterisk ]# asterisk -rx file convert 
/var/lib/asterisk/moh/test/intro\ extended\ version.wav 
/var/lib/asterisk/moh/test/testing.alaw
Unable to open input file: /var/lib/asterisk/moh/test/intro extended 
version.wav



Jonas.


On 08/13/2010 01:49 PM, Gareth Blades wrote:

The wav file is not in the correct format. Also the number of channels
and sampling frequency it is reporting is complete nonsense. This is
what it should display:-
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-14 Thread Motiejus Jakštys
On Sat, Aug 14, 2010 at 4:24 PM, Jonas Kellens jonas.kell...@telenet.be
wrote:

 intro extended version.wav: RIFF (little-endian) data, WAVE audio,
Microsoft
 PCM, 16 bit, stereo 44100 Hz


You need *MONO, 8000Hz*

$ man sox

--
Motiejus Jakštys
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-13 Thread Jonas Kellens

Hello list,


I'm using asterisk 1.4.30 and realtime sip.


I notice that the field musiconhold is not working as when putting 
someone on hold, the default musiconhold class is always used.



musiconhold.conf :

[default]
mode=files
directory=/var/lib/asterisk/moh
random=yes
;
[106002]
mode=files
directory=/var/lib/asterisk/moh/106002
random=yes


my realtime sip peers have the following in the column '*musiconhold*' : 
*106002*



asterisk*CLI moh show classes
Class: default
Mode: files
Directory: /var/lib/asterisk/moh
Class: 106002
Mode: files
Directory: /var/lib/asterisk/moh/106002


But always :

[Aug 13 09:47:57] -- Started music on hold, class 'default', on 
SIP/test2-0014

[Aug 13 09:48:05] -- Stopped music on hold on SIP/test2-0014



Can anyone help ?!


Kind regards,

Jonas.

-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-13 Thread Jonas Kellens

Hello list,

when putting the class 'default' in comment, then this happens :

[Aug 13 12:36:34] WARNING[21172]: res_musiconhold.c:666 get_mohbyname: 
Music on Hold class 'default' not found
[Aug 13 12:36:34] -- Started music on hold, class '106002', on 
SIP/test2-0001
[Aug 13 12:36:34] WARNING[21172]: format_wav.c:124 check_header: Does 
not say fmt
[Aug 13 12:36:34] WARNING[21172]: file.c:385 fn_wrapper: Unable to open 
format wav
[Aug 13 12:36:34] WARNING[21172]: res_musiconhold.c:251 
ast_moh_files_next: Unable to open file 
'/var/lib/asterisk/moh/106002/01Long': No such file or directory


Questions :

1. how can I use AND class default AND class 106002 ?!
2. is it normal that Asterisk can not convert from wav to alaw/gsm ?!


Jonas.


On 08/13/2010 09:57 AM, Jonas Kellens wrote:

Hello list,


I'm using asterisk 1.4.30 and realtime sip.


I notice that the field musiconhold is not working as when putting 
someone on hold, the default musiconhold class is always used.



musiconhold.conf :

[default]
mode=files
directory=/var/lib/asterisk/moh
random=yes
;
[106002]
mode=files
directory=/var/lib/asterisk/moh/106002
random=yes


my realtime sip peers have the following in the column '*musiconhold*' 
: *106002*



asterisk*CLI moh show classes
Class: default
Mode: files
Directory: /var/lib/asterisk/moh
Class: 106002
Mode: files
Directory: /var/lib/asterisk/moh/106002


But always :

[Aug 13 09:47:57] -- Started music on hold, class 'default', on 
SIP/test2-0014

[Aug 13 09:48:05] -- Stopped music on hold on SIP/test2-0014



Can anyone help ?!


Kind regards,

Jonas.

-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-13 Thread Gareth Blades
Asterisk can convert from wav but it still needs to be in the correct 
format. See 
http://www.voip-info.org/tiki-index.php?page=Convert+WAV+audio+files+for+use+in+Asterisk

Jonas Kellens wrote:
 Hello list,
 
 when putting the class 'default' in comment, then this happens :
 
 [Aug 13 12:36:34] WARNING[21172]: res_musiconhold.c:666 get_mohbyname: 
 Music on Hold class 'default' not found
 [Aug 13 12:36:34] -- Started music on hold, class '106002', on 
 SIP/test2-0001
 [Aug 13 12:36:34] WARNING[21172]: format_wav.c:124 check_header: Does 
 not say fmt
 [Aug 13 12:36:34] WARNING[21172]: file.c:385 fn_wrapper: Unable to open 
 format wav
 [Aug 13 12:36:34] WARNING[21172]: res_musiconhold.c:251 
 ast_moh_files_next: Unable to open file 
 '/var/lib/asterisk/moh/106002/01Long': No such file or directory
 
 Questions :
 
 1. how can I use AND class default AND class 106002 ?!
 2. is it normal that Asterisk can not convert from wav to alaw/gsm ?!
 
 
 Jonas.
 
 
 On 08/13/2010 09:57 AM, Jonas Kellens wrote:
 Hello list,


 I'm using asterisk 1.4.30 and realtime sip.


 I notice that the field musiconhold is not working as when putting 
 someone on hold, the default musiconhold class is always used.


 musiconhold.conf :

 [default]
 mode=files
 directory=/var/lib/asterisk/moh
 random=yes
 ;
 [106002]
 mode=files
 directory=/var/lib/asterisk/moh/106002
 random=yes


 my realtime sip peers have the following in the column '*musiconhold*' 
 : *106002*


 asterisk*CLI moh show classes
 Class: default
 Mode: files
 Directory: /var/lib/asterisk/moh
 Class: 106002
 Mode: files
 Directory: /var/lib/asterisk/moh/106002


 But always :

 [Aug 13 09:47:57] -- Started music on hold, class 'default', on 
 SIP/test2-0014
 [Aug 13 09:48:05] -- Stopped music on hold on SIP/test2-0014



 Can anyone help ?!


 Kind regards,

 Jonas.



-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-13 Thread Jonas Kellens


1. the converting is not working

[r...@asterisk testing]# file 01Long.wav
01Long.wav: RIFF (little-endian) data, WAVE audio, 20294 channels 
1414676809 Hz


[r...@asterisk testing]# asterisk -rx file convert 
/var/lib/asterisk/testing/01Long.wav /var/lib/asterisk/testing/01Long.alaw

Unable to open input file: /var/lib/asterisk/testing/01Long.wav


2. This does not explain why I can't use class default AND class 
whatever.



Jonas.


On 08/13/2010 12:47 PM, Gareth Blades wrote:

Asterisk can convert from wav but it still needs to be in the correct
format. See
http://www.voip-info.org/tiki-index.php?page=Convert+WAV+audio+files+for+use+in+Asterisk
-- 
_
-- 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] realtime sip peers : musiconhold class

2010-08-13 Thread Gareth Blades
The wav file is not in the correct format. Also the number of channels 
and sampling frequency it is reporting is complete nonsense. This is 
what it should display:-
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

Jonas Kellens wrote:
 
 1. the converting is not working
 
 [r...@asterisk testing]# file 01Long.wav
 01Long.wav: RIFF (little-endian) data, WAVE audio, 20294 channels 
 1414676809 Hz
 
 [r...@asterisk testing]# asterisk -rx file convert 
 /var/lib/asterisk/testing/01Long.wav /var/lib/asterisk/testing/01Long.alaw
 Unable to open input file: /var/lib/asterisk/testing/01Long.wav
 
 
 2. This does not explain why I can't use class default AND class 
 whatever.
 
 
 Jonas.
 
 
 On 08/13/2010 12:47 PM, Gareth Blades wrote:
 Asterisk can convert from wav but it still needs to be in the correct 
 format. See 
 http://www.voip-info.org/tiki-index.php?page=Convert+WAV+audio+files+for+use+in+Asterisk


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