Corrections to script

First off thanks for 2.3.0.

I like many of the new changes that I’ve noticed in the 30 minutes I’ve used it. I love the renaming of older files before replacement as I’ve customized several of them and previous install routines just overwrote many of them.

As for the script. It has a correction that I first posted on the trixbox site many months ago but it never caught up to the final set of corrections. So I thought I’d also post them here.

Sorry I’m not sure of the proper format so. I’ll try and make this simple…

Edit the script.

Search for the line: # Convert %20 to spaces, leave anythign else alone.
remove that line and the following one (shoule be line 54 and 55).

Replace with the following lines:

Convert %2x to proper characters, leave anything else alone.

$subject =~ s/\%20/ /g;
$subject =~ s/\%21/\!/g;
$subject =~ s/\%22/\"/g;
$subject =~ s/\%23/\#/g;
$subject =~ s/\%24/\$/g;
$subject =~ s/\%25/\%/g;
$subject =~ s/\%26/\&/g;
$subject =~ s/\%27/\'/g;
$subject =~ s/\%28/\(/g;
$subject =~ s/\%29/\)/g;
$subject =~ s/\%2a/\*/g;
$subject =~ s/\%2A/\*/g;
$subject =~ s/\%2b/\+/g;
$subject =~ s/\%2B/\+/g;
$subject =~ s/\%2c/\,/g;
$subject =~ s/\%2C/\,/g;
$subject =~ s/\%2d/\-/g;
$subject =~ s/\%2D/\-/g;
$subject =~ s/\%2e/\./g;
$subject =~ s/\%2F/\./g;
$subject =~ s/\%2f/\//g;
$subject =~ s/\%2F/\//g;

This will translate any of the special characters that I’ve seen to date in any fax DID line back to the proper ASCII characters. Yes I’m also sure there is a better and more efficient way to do it in a loop with a string array (or convert the hex to it’s number, then convert that to a character, but I don’t do Perl, so I hacked it this way to work.


Thanks to Rob Thomas for all his great work on the original script.


thanks and I hate to ask you to post twice but… If this is a bug/issue, can you please open a ticket on the ticket system describing the issue and including this fix. Otherwise, it will simply get lost again - there is too much to keep track of and that is what we rely on to do it. Thanks!

Philippe Lindheimer - FreePBX Project Lead
http// - IRC #freepbx

I could not find a module referance for fax so attached it to the core (be that right or wrong) but included fax and subject line in the keywords.