<h1>Project "FreeSWITCH user-contributed scripts, etc" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: a4349bbeba56858b0c17f8b69ed69ecebba0bc58 (commit)
via: d6ded2bd476117e0c7e39621c0a6a95454157310 (commit)
via: 44b8a8f178ebb09b2fe16ca1708e3c8446d14e20 (commit)
via: 64b9f3a914fb371d42c574b70214efb89ef838fd (commit)
via: c8a8da3aa2582b706740a30306b0ecdc9affc04e (commit)
via: 597108e000837ecbcaca0e65df59a486b896c97a (commit)
via: 56a3cbb570354567ca5913ca0770261453767605 (commit)
via: 36b4392111daa9ea604887a77a8e3a49eba66584 (commit)
via: 461d85e717ffe2afa687c6b69771033ff5e2eb78 (commit)
via: cb7e89da288c3b6a9a673ad266da3701881e1f70 (commit)
via: 4990dd940ad380a4d7ff6222397582e6384f002c (commit)
via: 927ad712718b071435d0033f7e94e78db0a56500 (commit)
via: fc7c364691b5d756b44a4e97dd7b20e072bccc29 (commit)
via: 7435ba814b094f1be499a101df196a38738bc821 (commit)
via: 5dd65f9693f8abd0a3692674607d5e27c7815a20 (commit)
via: ef2e4bddf8333b9fe49c0f7e42df015f003220d2 (commit)
via: 236ab231e43a931930d8536ff0ec43f829f67258 (commit)
via: 9be34a8280f1725f6a2e03a78488a6fa4267e11f (commit)
via: ed44070766b5280de0f324d5d3a44e079da816fa (commit)
via: 0b65cd12d9f6fe8279d647be34144e8229bcfc77 (commit)
via: 90d087c7e58bccef773954f91ec95348b8979aeb (commit)
via: 709375847fc8265fc1398e68b4b1bfd8a33e90bb (commit)
via: 1ae0de5a8a501996eb06595d57f6f63308fa8a59 (commit)
via: 5bc837fb4b23978921fa491977c711e786c204d7 (commit)
via: beb50f4d4a6b4029e0659f429b5ebec02fea85dd (commit)
via: 90a6cf59dde3f0d8ba5fcff422a70444f59a8489 (commit)
via: 5842b4b76d8834980c4fe1de575aa131a2f840b9 (commit)
via: 6b536b430435cdf26939dc2e5c7601faa54b3df4 (commit)
via: ba720fed0ac4ceb8a96c74058b23d32d9397559c (commit)
via: 12afec666a5e2da9c214a13dc4de17b17cbed2b6 (commit)
via: 8593c1de9a8a85b235d34d03790ca5f1aace3655 (commit)
via: 21bc78cbd2bad7dd11db339aa5a37f01c79fe9ab (commit)
via: d72a5c8982ac39a11583fb188ad7d53be5bcbcd6 (commit)
via: b815b2c170a14e7cdad9c1da1f766aa1b17ff0b5 (commit)
via: 4f549b24bbde5af0e5f51ea639a27be856afb1d2 (commit)
via: fc466382a7073ee9c72712cc9ab4a136734d27a6 (commit)
from: d93d8a0e353b8a112167961178bffda485356ee7 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Michael S Collins
comments:
Add 'nopunct' option to randomize passwords script so you can have alphanumeric auth passwds
<span style="color: #000080; font-weight: bold">diff --git a/mcollins/randomize-passwords.pl b/mcollins/randomize-passwords.pl</span>
<span style="color: #000080; font-weight: bold">index ef0f664..d792f2b 100755</span>
<span style="color: #A00000">--- a/mcollins/randomize-passwords.pl</span>
<span style="color: #00A000">+++ b/mcollins/randomize-passwords.pl</span>
<span style="color: #800080; font-weight: bold">@@ -21,13 +21,19 @@ use File::Copy;</span>
$|++;
<span style="color: #00A000">+## 'CHARACTERS' contains punctuation marks</span>
use constant CHARACTERS => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=+?></.,!@#$%^&*();:';
my $numchars = length(CHARACTERS);
<span style="color: #00A000">+## 'ALPHACHARS' contains upper and lower case letters and digits but no punctuation</span>
<span style="color: #00A000">+use constant ALPHACHARS => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';</span>
<span style="color: #00A000">+my $numalphas = length(ALPHACHARS);</span>
<span style="color: #00A000">+</span>
my $vmlen = 4; # Length of VM password
my $authlen = 10; # Length of auth password
my $filespec; # File specification
my $delbak; # Flag - delete backups (default = keep backups)
<span style="color: #00A000">+my $nopunct; # Flag - set to true to disable punction marks (i.e. alphanumerics only) in auth passwords</span>
my $opts_ok = GetOptions ("h" => \&usage,
"help" => \&usage,
<span style="color: #800080; font-weight: bold">@@ -35,6 +41,7 @@ my $opts_ok = GetOptions ("h" => \&usage,</span>
"authlen=i" => \$authlen,
"files=s" => \$filespec,
"D" => \$delbak,
<span style="color: #00A000">+                         "nopunct" => \$nopunct,</span>
                         );
## Confirm that a file spec was provided
<span style="color: #800080; font-weight: bold">@@ -110,9 +117,18 @@ sub get_random_chars () {</span>
my $length = shift;
if ( ! $length ) { $length = $authlen; }
my $chars;
<span style="color: #A00000">- foreach my $i (1 .. $length) {</span>
<span style="color: #A00000">-        my $nextchar = substr( CHARACTERS,int(rand $numchars),1);</span>
<span style="color: #A00000">- $chars .= $nextchar;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+ if ( $nopunct ) {</span>
<span style="color: #00A000">+        foreach my $i (1 .. $length) {</span>
<span style="color: #00A000">+         my $nextchar = substr( ALPHACHARS,int(rand $numalphas),1 );</span>
<span style="color: #00A000">+         $chars .= $nextchar;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+ } else {</span>
<span style="color: #00A000">+        foreach my $i (1 .. $length) {</span>
<span style="color: #00A000">+         my $nextchar = substr( CHARACTERS,int(rand $numchars),1 );</span>
<span style="color: #00A000">+         $chars .= $nextchar;</span>
<span style="color: #00A000">+        }</span>
}
return $chars;
}
<span style="color: #800080; font-weight: bold">@@ -150,6 +166,8 @@ Options:</span>
--authlen Set length of auth password. (Default is 10 characters)
<span style="color: #00A000">+ --nopunct Disable punction marks in auth passwords, i.e. alphanumerics only</span>
<span style="color: #00A000">+</span>
Example:
To randomize all the passwords for a default Linux install, with 6 digit VM passwords, use this command:
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://scratch/usr/local/src/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Chad Phillips
comments:
Merge branch 'master' of ssh://git.freeswitch.org/freeswitch-contrib
</pre></div>
<div class="highlight"><pre>committer: Michael S Collins
comments:
Update chan vars scripts to be git repo friendly
<span style="color: #000080; font-weight: bold">diff --git a/mcollins/create-chanvars-html-page.pl b/mcollins/create-chanvars-html-page.pl</span>
<span style="color: #000080; font-weight: bold">index 5737a4d..a9191ac 100755</span>
<span style="color: #A00000">--- a/mcollins/create-chanvars-html-page.pl</span>
<span style="color: #00A000">+++ b/mcollins/create-chanvars-html-page.pl</span>
<span style="color: #800080; font-weight: bold">@@ -65,7 +65,7 @@ my $htmldir = '/usr/local/freeswitch/htdocs';</span>
## Use these as defaults unless command line args are supplied
GetOptions( 'srcdir=s' => \$srcdir,
'tmpdir=s' => \$tmpdir,
<span style="color: #A00000">- 'htmldir=s' => \$htmldir,</span>
<span style="color: #00A000">+         'htmldir=s' => \$htmldir,</span>
);
my $srcdirlen = length $srcdir; # calculate this once since it doesn't change
<span style="color: #800080; font-weight: bold">@@ -74,7 +74,7 @@ my $headerfile = $tmpdir . "/header-defs.txt";</span>
my $datafile = $tmpdir . "/get-set-vars.txt";
my $htmlfile = $htmldir . "/chanvars.html";
<span style="color: #A00000">-my $site = 'http://fisheye.freeswitch.org/browse/freeswitch.git';</span>
<span style="color: #00A000">+my $site = 'http://fisheye.freeswitch.org/browse/FreeSWITCH.git';</span>
my $obvious_exceptions; # regex match for channel variable names we don't care about
$obvious_exceptions = '^(|argv|v?var|var_?name|v?buf|char.*|inner_var_array.*|arg.*|string|tmp_name|[^_]*_var|\(char \*\) vvar)$';
<span style="color: #800080; font-weight: bold">@@ -105,9 +105,11 @@ open(FILEIN,"<",$datafile) or die "$datafile - $!\n";</span>
while(<FILEIN>) {
chomp;
next if m/switch_channel_get_variables/; # get variables != what we want
<span style="color: #A00000">- next unless m/switch_channel_(s|g)et_variable\s?\(/;</span>
<span style="color: #00A000">+ next unless ( m/switch_channel_(s|g)et_variable\s?\(/ or m/switch_channel_(s|g)et_variable_partner\s?\(/ );</span>
<span style="color: #00A000">+</span>
next if m/#define|SWITCH_DECLARE/;
next unless m/\.c(pp)?:/; # only c and cpp files for now
<span style="color: #00A000">+</span>
## Extract source file name
my @RECIN = split /(\.c(pp)?)/,$_; # split on file name.c or name.cpp
my ($filename,$dir,$ext) = fileparse($RECIN[0]);
<span style="color: #800080; font-weight: bold">@@ -118,7 +120,7 @@ while(<FILEIN>) {</span>
my $reldir = substr $dir, $srcdirlen;
#print "$filename $dir $ext ($reldir)\n";
if ( ! exists( $source_files{$filename} ) ) {
<span style="color: #A00000">- $source_files{ $filename } = $site . $reldir . $filename;</span>
<span style="color: #00A000">+ $source_files{ $filename } = $site . $reldir . $filename . '?r=HEAD';</span>
}
## Extract line number for this occurrence in this source file
<span style="color: #800080; font-weight: bold">@@ -159,10 +161,56 @@ while(<FILEIN>) {</span>
## Skip obvious exceptions...
next if $channel_variable_name =~ m/$obvious_exceptions/;
<span style="color: #A00000">- ## populate the hash for this variable, filename and line num & get/set val</span>
<span style="color: #00A000">+ ## populate the hash for this variable, filename and line num & set/get</span>
push @{ $channel_vars{$channel_variable_name}{$filename} }, [$linenum, $setget];
push @{ $source_idx{$filename}{$channel_variable_name} }, [$linenum, $setget];
}
<span style="color: #00A000">+</span>
<span style="color: #00A000">+close(FILEIN);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+## Handle the event header vars...</span>
<span style="color: #00A000">+$datafile = $tmpdir . "/event-vars.txt";</span>
<span style="color: #00A000">+open(FILEIN,'<',$datafile) or die "$datafile - $!\n";</span>
<span style="color: #00A000">+while(<FILEIN>){</span>
<span style="color: #00A000">+ chomp;</span>
<span style="color: #00A000">+ next unless m/\.c(pp)?:/; # only c and cpp files for now</span>
<span style="color: #00A000">+ my @RECIN = split /(\.c(pp)?)/,$_; # split on file name.c or name.cpp</span>
<span style="color: #00A000">+ my ($filename,$dir,$ext) = fileparse($RECIN[0]);</span>
<span style="color: #00A000">+ $filename .= $RECIN[1]; # append .c or .cpp</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+ # debug </span>
<span style="color: #00A000">+ #print "$filename\n";</span>
<span style="color: #00A000">+ # trim off the srcdir from beginning of string</span>
<span style="color: #00A000">+ my $reldir = substr $dir, $srcdirlen;</span>
<span style="color: #00A000">+ #print "$filename $dir $ext ($reldir)\n";</span>
<span style="color: #00A000">+ if ( ! exists( $source_files{$filename} ) ) {</span>
<span style="color: #00A000">+ $source_files{ $filename } = $site . $reldir . $filename . '?r=HEAD';</span>
<span style="color: #00A000">+ }</span>
<span style="color: #00A000">+ </span>
<span style="color: #00A000">+ ## Extract line number for this occurrence in this source file</span>
<span style="color: #00A000">+ my $linenum = 0;</span>
<span style="color: #00A000">+ if ( $RECIN[3] =~ m/:(\d+):/ ) {</span>
<span style="color: #00A000">+ $linenum = $1;</span>
<span style="color: #00A000">+ }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+ ## Extract variable name</span>
<span style="color: #00A000">+ ## if ((var = switch_event_get_header(var_event, "freetdm_outbound_ton")) || (var = switch_core_get_variable("freetdm_outbound_ton")))</span>
<span style="color: #00A000">+ ## Need a little loop, in case there are more than one per line...</span>
<span style="color: #00A000">+ while ( m/switch_event_get_header\(var_event,\s+"(.*?)"/g ) {</span>
<span style="color: #00A000">+        ## $1 *should* have the name of the variable...</span>
<span style="color: #00A000">+        #print "Var name is $1...\n";</span>
<span style="color: #00A000">+        my $channel_variable_name = $1;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        ## Skip obvious exceptions...</span>
<span style="color: #00A000">+        next if $channel_variable_name =~ m/$obvious_exceptions/;</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+        ## populate the hash for this variable, filename and line num & 'event_var'</span>
<span style="color: #00A000">+        push @{ $channel_vars{$channel_variable_name}{$filename} }, [$linenum, 'event_var']; </span>
<span style="color: #00A000">+        push @{ $source_idx{$filename}{$channel_variable_name} }, [$linenum, 'event_var'];</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+ }</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
close(FILEIN);
#debug
<span style="color: #800080; font-weight: bold">@@ -200,7 +248,7 @@ foreach my $chanvar ( sort {lc $a cmp lc $b} keys %channel_vars ) {</span>
#$row[2] .= "@{ $_ }" . "<br/>";
my $linkname = "@{ $_ }";
my $linenum = @{ $_ }[0];
<span style="color: #A00000">- my $url = $source_files{$sourcename};</span>
<span style="color: #00A000">+ my $url = $source_files{$sourcename} . '#to' . $linenum;</span>
$row[2] .= $h->a( { href => $url, target => '_blank' },
$linkname
) . '<br/>';
<span style="color: #000080; font-weight: bold">diff --git a/mcollins/extract-fs-vars-from-source-tree.sh b/mcollins/extract-fs-vars-from-source-tree.sh</span>
<span style="color: #000080; font-weight: bold">index c3205a2..70e09e5 100755</span>
<span style="color: #A00000">--- a/mcollins/extract-fs-vars-from-source-tree.sh</span>
<span style="color: #00A000">+++ b/mcollins/extract-fs-vars-from-source-tree.sh</span>
<span style="color: #800080; font-weight: bold">@@ -12,17 +12,21 @@</span>
# MC 2009-04-02
# Change these vars if your directories are different
<span style="color: #A00000">-SRCDIR=/usr/src/freeswitch.trunk</span>
<span style="color: #00A000">+SRCDIR=/usr/src/freeswitch.git</span>
TMPDIR=/tmp
HTMLDIR=/usr/local/freeswitch/htdocs
# Grep the variables, then grep the aliases in the header files
<span style="color: #A00000">-echo Searching source tree for channel variable set/get...</span>
<span style="color: #00A000">+echo "Searching source tree for channel variable set/get..."</span>
grep -rn "[sg]et_variable(" $SRCDIR/* | grep -v Binary | grep -v svn > $TMPDIR/get-set-vars.txt
<span style="color: #00A000">+grep -rn "[sg]et_variable_partner(" $SRCDIR/* | grep -v Binary | grep -v svn >> $TMPDIR/get-set-vars.txt</span>
<span style="color: #A00000">-echo Getting header file definitions...</span>
<span style="color: #00A000">+echo "Searching source tree for event_get_header channel variables... "</span>
<span style="color: #00A000">+grep -rn "switch_event_get_header(var_event" $SRCDIR/* | grep -v Binary > $TMPDIR/event-vars.txt</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+echo "Getting header file definitions..."</span>
grep -n "_VARIABLE" $SRCDIR/src/include/*h > $TMPDIR/header-defs.txt
# launch perl script here
<span style="color: #A00000">-echo Creating HTML file in $TMPDIR directory</span>
<span style="color: #00A000">+echo "Creating HTML file in $TMPDIR directory"</span>
./create-chanvars-html-page.pl --srcdir=$SRCDIR --tmpdir=$TMPDIR --htmldir=$HTMLDIR
</pre></div>
========================================================================<pre>
Summary of changes:
mcollins/create-chanvars-html-page.pl | 60 +++++++++++++++++++++++---
mcollins/extract-fs-vars-from-source-tree.sh | 12 +++--
mcollins/randomize-passwords.pl | 24 +++++++++-
3 files changed, 83 insertions(+), 13 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH user-contributed scripts, etc</p>