Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-21 Thread Tzafrir Cohen
On Thu, Aug 20, 2009 at 05:36:47PM -0700, Steve Edwards wrote:
> On Fri, 21 Aug 2009, Lee, John (Sydney) wrote:
> 
> > How can I check what format my channels are using?
> 
> Format? Format is the "envelope." Codec is the algorithm used to encode 
> and decode.
> 
> Try "sip show peer " to see which codecs are configured 
> (allowed) for that peer.
> 
> Some variant of "show channel " will show you what codecs 
> are being used by an in-progress call.

sip show channels
iax2 show channels

Will also show you the codecs actually used by SIP/IAX channels
("calls").

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Steve Edwards
On Fri, 21 Aug 2009, Lee, John (Sydney) wrote:

> Is this the one you are talking about?
>
> Do you mean that if I play MOH using any of the formats below, then 
> there will be no CPUs wasted for translation purposes?
>
> *CLI> core show codecs

[irrelevant display of codecs snipped]

Nope.

That command just shows you what codec number means what codec name.

You should familiarize yourself with each Asterisk CLI command and what 
they do. I'm a 1.2 Luddite, so the syntax may be different, but enter 
"help" in one shell and in another enter "help" followed by the commands 
displayed in the first shell one by one.

I was referring to the "sip show peers" command (your syntax may vary) to 
get a list of your peers and then "sip show " for each of the 
peers. Towards the end of the information displayed, you will see a line 
similar to "Codecs : 0x4 (ulaw)" followed by "Codec Order : (ulaw)."

My output shows that I only allow ulaw, and that ulaw is considered first 
(obviously since I only allow 1 codec).

To find the codecs that are actually being used by a particular channel 
(which may change depending on the allowed codecs and the codec order of 
each endpoint of the call), enter "show channels" to get a list of the 
active channels followed by "show channel ."

In the information displayed you will see information similar to 
"NativeFormat: 4, WriteFormat: 64, ReadFormat: 64" which, using the "show 
codecs" command you can determine which codecs are in use for the call.

The "holy grail" to avoid transcoding is to have all of the codecs (I 
consider it inconsistent to use the word "format" here) the same and to 
have sound files encoded with that codec as well.

That, based on my limited understanding of the process, is that :)

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Lee, John (Sydney)
Is this the one you are talking about?

Do you mean that if I play MOH using any of the formats below, then
there will be no CPUs wasted for translation purposes?

*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.
INTBINARYHEX   TYPE   NAME   DESC


  1 (1 <<  0)  (0x1)  audio   g723   (G.723.1)
  2 (1 <<  1)  (0x2)  audiogsm   (GSM)
  4 (1 <<  2)  (0x4)  audio   ulaw   (G.711 u-law)
  8 (1 <<  3)  (0x8)  audio   alaw   (G.711 A-law)
 16 (1 <<  4) (0x10)  audio   g726aal2   (G.726 AAL2)
 32 (1 <<  5) (0x20)  audio  adpcm   (ADPCM)
 64 (1 <<  6) (0x40)  audio   slin   (16 bit Signed
Linear PCM)
128 (1 <<  7) (0x80)  audio  lpc10   (LPC10)
256 (1 <<  8)(0x100)  audio   g729   (G.729A)
512 (1 <<  9)(0x200)  audio  speex   (SpeeX)
   1024 (1 << 10)(0x400)  audio   ilbc   (iLBC)
   2048 (1 << 11)(0x800)  audio   g726   (G.726 RFC3551)
   4096 (1 << 12)   (0x1000)  audio   g722   (G722)
  65536 (1 << 16)  (0x1)  image   jpeg   (JPEG image)
 131072 (1 << 17)  (0x2)  imagepng   (PNG image)
 262144 (1 << 18)  (0x4)  video   h261   (H.261 Video)
 524288 (1 << 19)  (0x8)  video   h263   (H.263 Video)
1048576 (1 << 20) (0x10)  video  h263p   (H.263+ Video)
2097152 (1 << 21) (0x20)  video   h264   (H.264 Video)


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Steve Edwards
On Fri, 21 Aug 2009, Lee, John (Sydney) wrote:

> How can I check what format my channels are using?

Format? Format is the "envelope." Codec is the algorithm used to encode 
and decode.

Try "sip show peer " to see which codecs are configured 
(allowed) for that peer.

Some variant of "show channel " will show you what codecs 
are being used by an in-progress call.

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Lee, John (Sydney)

> It also means that unless your target cchannel is in gsm format
How can I check what format my channels are using?


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Danny Nicholas
That would be a "Feature request".  BTW, thanks (to you and Tzafir) for
using my earlier post for a "Teaching Moment".  I don't always think through
these answers as much as I should.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Thursday, August 20, 2009 12:24 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong
format? Weird, worked yesterday! :-)

On Thu, 20 Aug 2009, Danny Nicholas wrote:

> Did you try streaming it without the .wav extension?

How many times a month do you think people do this? (I'll confess I still 
do it on occasion.)

Wouldn't it be nice if after trying all the file types for all the loaded 
formats, Asterisk would try opening the file name as specified? Maybe with 
a warning message on the console?

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Steve Edwards
On Thu, 20 Aug 2009, Danny Nicholas wrote:

> Did you try streaming it without the .wav extension?

How many times a month do you think people do this? (I'll confess I still 
do it on occasion.)

Wouldn't it be nice if after trying all the file types for all the loaded 
formats, Asterisk would try opening the file name as specified? Maybe with 
a warning message on the console?

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Steve Edwards
On Thu, 20 Aug 2009, Danny Nicholas wrote:

> BTW, you eat CPU trying to play wav files across channels (gsm is 
> preferable (IMO) ) and the file has to be at 8000 Khz for Asterisk to 
> like it.

On Thu, 20 Aug 2009, Johan Sandgren wrote:

> Advice taken!  Ok I'll use gsm/8kHz instead, I sure want to save CPU!

Please don't unless you understand the implications.

If your goal is to reduce transcoding (converting from one encoding to 
another), you want to have your sound files in the same encoding as your 
channels.

If you are only using GSM, then you would want your sound files (including 
all of the standard Asterisk prompts) in GSM.

If you are only using ULAW (like me), then encoding to GSM means Asterisk 
will have to transcode every file every time it is played.

If you are using a mix of encodings, say ULAW for internal calls and GSM 
for external calls, you would want to have your sound files (again, 
including all of the standard Asterisk prompts) in both ULAW and GSM 
encodings.

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

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Tzafrir Cohen
On Thu, Aug 20, 2009 at 10:55:50AM -0500, Danny Nicholas wrote:

> BTW,  you eat CPU trying to play
> wav files across channels (gsm is preferable (IMO) )

Huh? I assume that by "wav" you refer to a standard WAV/RIFF file. This
is basically a simple PCM file with a short header. 

gsm is a compressed format, which means lower quality (with gsm the
quality is noticably lower than plain 8kHz audio). It also means that
unless your target cchannel is in gsm format, there'll be more
transcoding done along the way and hence more CPU time eaten.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Johan Sandgren
It's true, it worked without the .wav in the filename.

:-)

Thanks!

-Ursprungligt meddelande-
Från: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] För Steve Howes
Skickat: den 20 augusti 2009 17:57
Till: Asterisk Users Mailing List - Non-Commercial Discussion
Ämne: Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong 
format? Weird, worked yesterday! :-)


On 20 Aug 2009, at 16:47, Johan Sandgren wrote:

>
> I'm trying to play a wav-file on a channel.
>
> This is what I see in the asterisk debug console
>
> AGI Rx << STREAM FILE "test.wav" "12345"
> [Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full:  
> File test.wav does not exist in any format
>
> So it doesn't find the file, or it's in a wrong format?
>

Show us your dialplan. We need to know what you are putting in, rather  
than just what you are getting out.

Chances are you are putting '.wav' in your filename in the dialplan  
rather than missing it off.

Steve
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Johan Sandgren
Advice taken!  Ok I'll use gsm/8kHz instead, I sure want to save CPU!

It was the .wav that made it not find the file.
Great!
:)
/Johan

Från: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] För Danny Nicholas
Skickat: den 20 augusti 2009 17:56
Till: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Ämne: Re: [asterisk-users] Cannot play soundfile,doesnt find it or wrong 
format? Weird, worked yesterday! :-)

Can you play it from a Playback or Background command?  Did you try streaming 
it without the .wav extension?  BTW,  you eat CPU trying to play wav files 
across channels (gsm is preferable (IMO) ) and the file has to be at 8000 Khz 
for Asterisk to like it.


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johan Sandgren
Sent: Thursday, August 20, 2009 10:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Cannot play soundfile, doesnt find it or wrong 
format? Weird, worked yesterday! :-)


I'm trying to play a wav-file on a channel.

This is what I see in the asterisk debug console

AGI Rx << STREAM FILE "test.wav" "12345"
[Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full: File test.wav 
does not exist in any format

So it doesn't find the file, or it's in a wrong format?

I can listen to it with windows media player... it's a wave-file.
I even recorded it yesterday with asterisk recordFile as a wav-file.
And it did play yesterday! :)
Weird!

It's still in the same folder: /var/lib/asterisk/sounds/

But even then, I get this error message mentioned.

Where should I search for the error?

I'm out of ideas

/Johan

___
Johan Sandgren
Svep Design Center AB
Phone +46 46 192 722
Mobile +46 70 173 4152
Box 1233, 221 05 Lund, Sweden
E-mail   j...@svep.se
Website www.svep.se<http://www.svep.se/>

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Miguel Molina

Johan Sandgren escribió:


 


I'm trying to play a wav-file on a channel.

 


This is what I see in the asterisk debug console

 


AGI Rx << STREAM FILE "test.wav" "12345"

[Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full: File 
test.wav does not exist in any format


 


So it doesn't find the file, or it's in a wrong format?

 


I can listen to it with windows media player... it's a wave-file.

I even recorded it yesterday with asterisk recordFile as a wav-file.

And it did play yesterday! J

Weird!

 


It's still in the same folder: /var/lib/asterisk/sounds/

 


But even then, I get this error message mentioned.

 


Where should I search for the error?

 


I'm out of ideas

 


/Johan

 


*___*

*Johan Sandgren*   

Svep Design Center AB


Phone +46 46 192 722

Mobile +46 70 173 4152

Box 1233, 221 05 Lund, Sweden 


E-mail   j...@svep.se

Website www.svep.se 


Hi,

Try specifying the file without the extension on your AGI:

AGI Rx << STREAM FILE "test" "12345"

Just like the Playback() application, asterisk should look for the 
filename in any compatible format that it supports.


Cheers,

--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Steve Howes

On 20 Aug 2009, at 16:47, Johan Sandgren wrote:

>
> I’m trying to play a wav-file on a channel.
>
> This is what I see in the asterisk debug console
>
> AGI Rx << STREAM FILE "test.wav" "12345"
> [Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full:  
> File test.wav does not exist in any format
>
> So it doesn’t find the file, or it’s in a wrong format?
>

Show us your dialplan. We need to know what you are putting in, rather  
than just what you are getting out.

Chances are you are putting '.wav' in your filename in the dialplan  
rather than missing it off.

Steve
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Danny Nicholas
Can you play it from a Playback or Background command?  Did you try
streaming it without the .wav extension?  BTW,  you eat CPU trying to play
wav files across channels (gsm is preferable (IMO) ) and the file has to be
at 8000 Khz for Asterisk to like it.

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Johan Sandgren
Sent: Thursday, August 20, 2009 10:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Cannot play soundfile, doesnt find it or wrong
format? Weird, worked yesterday! :-)

 

 

I'm trying to play a wav-file on a channel.

 

This is what I see in the asterisk debug console

 

AGI Rx << STREAM FILE "test.wav" "12345"

[Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full: File
test.wav does not exist in any format

 

So it doesn't find the file, or it's in a wrong format?

 

I can listen to it with windows media player. it's a wave-file.

I even recorded it yesterday with asterisk recordFile as a wav-file.

And it did play yesterday! :-)

Weird!

 

It's still in the same folder: /var/lib/asterisk/sounds/

 

But even then, I get this error message mentioned.

 

Where should I search for the error?

 

I'm out of ideas

 

/Johan

 

___

Johan Sandgren

Svep Design Center AB

Phone +46 46 192 722

Mobile +46 70 173 4152

Box 1233, 221 05 Lund, Sweden  

E-mail   j...@svep.se

Website  <http://www.svep.se/> www.svep.se

 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] Cannot play soundfile, doesnt find it or wrong format? Weird, worked yesterday! :-)

2009-08-20 Thread Johan Sandgren

I'm trying to play a wav-file on a channel.

This is what I see in the asterisk debug console

AGI Rx << STREAM FILE "test.wav" "12345"
[Aug 20 16:10:19] WARNING[25219]: file.c:602 ast_openstream_full: File test.wav 
does not exist in any format

So it doesn't find the file, or it's in a wrong format?

I can listen to it with windows media player... it's a wave-file.
I even recorded it yesterday with asterisk recordFile as a wav-file.
And it did play yesterday! :)
Weird!

It's still in the same folder: /var/lib/asterisk/sounds/

But even then, I get this error message mentioned.

Where should I search for the error?

I'm out of ideas

/Johan

___
Johan Sandgren
Svep Design Center AB
Phone +46 46 192 722
Mobile +46 70 173 4152
Box 1233, 221 05 Lund, Sweden
E-mail   j...@svep.se
Website www.svep.se

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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