changes in GSM recording format

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

changes in GSM recording format

Postby marcoe » Tue Aug 10, 2010 10:40 am

Hi guys, I was having some trouble with MP3 conversion, it usually uses a lot o CPU power and some wierd stuff was happening on the dialer.

So I decided to stop MP3 conversion and search for some type that offered average audio quality and small file size. GSM is a very nice format, but as I found out, the GSM extension file is not recognized by windows media player but gsm compression is.

By changing two lines in AST_CRON_audio_2_compress.pl I was able to convert to gsm codec and keep the .wav extension.

Matt, maybe this could be used as a new format of conversion, I could change the code to do that and send back to you, if you find interesting to add to the project.

This is the new section of the file:

if ($GSM > 0)
{
$GSMfile = $FILES[$i];
#$GSMfile =~ s/-all\.wav/-all.gsm/gi;

if ($DB) {print "|$recording_id|$ALLfile|$GSMfile| |$SQLfile|\n";}

`$soxbin "$dir2/$ALLfile" -e gsm-full-rate "$dir2/GSM/$GSMfile"`;

$stmtA = "UPDATE recording_log set location='http://$server_ip/RECORDINGS/GSM/$GSMfile' where recording_id='$recording_id';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
}
marcoe
 
Posts: 60
Joined: Tue Feb 23, 2010 2:06 pm
Location: Brazil

Postby williamconley » Tue Aug 10, 2010 4:08 pm

so you're saying that the file converts to a gsm (content) but keeps the wav (extension) so windows thinks it's a WAV and reads it successfully? but still seriously compressed?

of course ... can't you also tell windows to send gsm files to media player?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby marcoe » Tue Aug 10, 2010 4:27 pm

I tried to rename the .GSM file created by sox but it would not recognize either...

Then I found this parameter (-e gsm-full-rate ) that converts the file but still plays on windows media player.
marcoe
 
Posts: 60
Joined: Tue Feb 23, 2010 2:06 pm
Location: Brazil

Postby williamconley » Tue Aug 10, 2010 5:00 pm

how much does it shrink the file?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mflorell » Tue Aug 10, 2010 5:32 pm

That is why we added the --GSW option to the compression script a while ago.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby marcoe » Wed Aug 11, 2010 7:00 am

Ops, didn't mention that I tried that and it returned an error, that's why I went after sox parameters and found (-e gsm-full-rate ). The error during GSW compression is:

----- DEBUG -----


-----TESTING -----

GSW compression
|8107|20100811-084445_9935232302-all.wav|20100811-084445_9935232302-all.wav| ||/usr/bin/sox "/var/spool/asterisk/monitorDONE/20100811-084445_9935232302-all.wav" -g -b "/var/spool/asterisk/monitorDONE/GSW/20100811-084445_9935232302-all.wav"|
/usr/bin/sox FAIL sox: Bits value `/var/spool/asterisk/monitorDONE/GSW/20100811-084445_9935232302-all.wav' is not a positive integer
DONE... EXITING

It seems that the -b option needs the number of bits, and it was not supplied.

-----

@williamconley: its about the same as gsm files, new file is 10% of the original file.
marcoe
 
Posts: 60
Joined: Tue Feb 23, 2010 2:06 pm
Location: Brazil

Postby mflorell » Wed Aug 11, 2010 7:37 am

That's interesting, we have clients using this without any issues currently.

Please create an Issue Tracker tick for this and include your version of ViciDial as well as the version of SoX that you are using and how you installed ViciDial.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mhido » Thu Feb 24, 2011 12:54 pm

recording of calls on VICIDIAL in forma wav but it makes the conversation in forma GSM I want to disable the GSM conversation how I can do.thx for help
mhido
 
Posts: 34
Joined: Thu Mar 11, 2010 9:11 am

Postby williamconley » Thu Feb 24, 2011 1:03 pm

when you post, please post your entire configuration including (but not limited to) your installation method and vicidial version with build.

this IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system.

Similar to This:
Vicibox X.X from .iso | Vicidial X.X.X Build XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation
____________

Please read the manager's manual regarding recording, mixing, and compression.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mhido » Thu Feb 24, 2011 1:11 pm

i have 2 server vicidial:

1-ubuntu-server 8.04: asterisk-1.4.27-vici
vicidial:VERSION: 2.0.5-174
BUILD: 90522-0506


2-vicidialnow-1.3:asterisk-1.2
VERSION: 2.0.5-174
BUILD: 90522-0506
mhido
 
Posts: 34
Joined: Thu Mar 11, 2010 9:11 am

Postby williamconley » Thu Feb 24, 2011 1:13 pm

audio file conversion and storage is handled in crontab -e with scripts that reside in /usr/share/astguiclient and is covered in the manager's manual.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mhido » Thu Feb 24, 2011 1:17 pm

thx for your quick answer but can i stop the conversion in gsm format?
mhido
 
Posts: 34
Joined: Thu Mar 11, 2010 9:11 am

Postby williamconley » Thu Feb 24, 2011 1:24 pm

crontab -e shows the files in use

if you read the script files, they explain their usage

and it's in the manual
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mhido » Thu Feb 24, 2011 2:03 pm

thank you for your help I succeeded to disable the gsm conversion, I have another question: I install a vicidialnow-1.3 on a virtual server but still there are problems on the line hatching, is what the vicidialnow supports virtualization or not?

characteristic of server virtualization:
hard:DELLDell PowerEdge dual xeon, 8G RAM
soft:esxi 4.1
mhido
 
Posts: 34
Joined: Thu Mar 11, 2010 9:11 am

Postby williamconley » Thu Feb 24, 2011 2:16 pm

NO 8)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 30 guests