If I do something like exten => 1,1,Record(/someplace/somefile|gsm) It does not record I end up getting -- Executing Record("SIP/mlh-04d0", "|gsm") in new stack exten => 1,1,Record(filename|gsm) it works great! Is there anyway that I can set the path in the record app...if not is there an easy change I (or someone else ) can make to source so that I can. Thanks for your help, Michael
Hi list, Can anyone suggest us what kind compression tool is best to compress a GSM file. And what kind compression ratio can be? Thanks, George Lin
On Thu, 2003-10-09 at 15:51, George Lin wrote:> Hi list, > > Can anyone suggest us what kind compression tool is best to compress a GSM > file. > > And what kind compression ratio can be?This is a hard message to write with out unleashing the flame thrower. On this list it has been discussed many times that you can use sox or toast to convert to GSM. At least you should have issued a apropos gsm on the command line, or even a man -k gsm. That alone would have pointed you to toast. A little study of GSM information tells you that the codec produces 32.5 bytes of data per 20ms. So compression ratio depends on the format it was in to begin with. Generally speaking though, you should be working with 8k samples a second and therefore 20ms is 160 samples. You may even be using 8bit samples like everything else is. At this point 160 samples is 160 bytes that gets compressed to 32.5 bytes. On computer platforms, it is a pain to deal with half bytes. So on a unix system, it has been standardized that 32.5 will be null padded to 33 bytes even. On Crapdos, they decided that this is one of the few places they would try not to bloat. On Crapdos, they take 2 32.5 byte frames and bit shift the second down into the empty half left by the first frame and produce a 65 byte double frame. Oddly enough, the majority of this is all learned from reading the source code readily available already in the asterisk code base. It possibly could be even more easily been found by a simple google search. At the minimum, please go here and read for the next 10 or so minutes. http://kbs.cs.tu-berlin.de/~jutta/toast.html -- Steven Critchfield <critch@basesys.com>
Record(/tmp/testing:gsm) Thats what I use.. and it works. bkw On Thu, 9 Oct 2003, Lists wrote:> If I do something like > > exten => 1,1,Record(/someplace/somefile|gsm) > > It does not record I end up getting > -- Executing Record("SIP/mlh-04d0", "|gsm") in new stack > > exten => 1,1,Record(filename|gsm) > > it works great! > > Is there anyway that I can set the path in the record app...if not is > there an easy change I (or someone else ) can make to source so that I > can. > > > Thanks for your help, > > Michael > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
Thanks Steve. In fact, I am looking for a ZIP tool to zip a GSM file. currently I found that winzip ONLY compress 10% of a WAV file. I am wondering is there any good ZIP tool for a GSM file and or WAV file. Thanks, George Lin. -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of Steven Critchfield Sent: Thursday, October 09, 2003 2:49 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] GSM compression tool On Thu, 2003-10-09 at 15:51, George Lin wrote:> Hi list, > > Can anyone suggest us what kind compression tool is best to compress a GSM > file. > > And what kind compression ratio can be?This is a hard message to write with out unleashing the flame thrower. On this list it has been discussed many times that you can use sox or toast to convert to GSM. At least you should have issued a apropos gsm on the command line, or even a man -k gsm. That alone would have pointed you to toast. A little study of GSM information tells you that the codec produces 32.5 bytes of data per 20ms. So compression ratio depends on the format it was in to begin with. Generally speaking though, you should be working with 8k samples a second and therefore 20ms is 160 samples. You may even be using 8bit samples like everything else is. At this point 160 samples is 160 bytes that gets compressed to 32.5 bytes. On computer platforms, it is a pain to deal with half bytes. So on a unix system, it has been standardized that 32.5 will be null padded to 33 bytes even. On Crapdos, they decided that this is one of the few places they would try not to bloat. On Crapdos, they take 2 32.5 byte frames and bit shift the second down into the empty half left by the first frame and produce a 65 byte double frame. Oddly enough, the majority of this is all learned from reading the source code readily available already in the asterisk code base. It possibly could be even more easily been found by a simple google search. At the minimum, please go here and read for the next 10 or so minutes. http://kbs.cs.tu-berlin.de/~jutta/toast.html -- Steven Critchfield <critch@basesys.com> _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users