astpp-commit Mailing List for ASTPP - Open Source Voip Billing
Brought to you by:
darrenkw
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(1) |
Nov
(34) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(3) |
Jul
(1) |
Aug
(3) |
Sep
(8) |
Oct
(3) |
Nov
(11) |
Dec
(6) |
| 2009 |
Jan
(9) |
Feb
(11) |
Mar
(6) |
Apr
(3) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(14) |
Oct
(32) |
Nov
(2) |
Dec
|
| 2010 |
Jan
(1) |
Feb
(11) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
|
Dec
(5) |
| 2011 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <dar...@us...> - 2011-05-07 03:19:40
|
Revision: 2338
http://astpp.svn.sourceforge.net/astpp/?rev=2338&view=rev
Author: darrenkw
Date: 2011-05-07 03:19:33 +0000 (Sat, 07 May 2011)
Log Message:
-----------
Remove tailing | from FreeSWITCH bridge command.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2011-05-07 03:09:36 UTC (rev 2337)
+++ trunk/freeswitch/astpp-fs-xml.pl 2011-05-07 03:19:33 UTC (rev 2338)
@@ -267,20 +267,22 @@
my @outboundroutes = &get_outbound_routes( $astpp_db, $params->{'Caller-Destination-Number'},
$carddata, $routeinfo, @reseller_list );
$xml .= $ASTPP->fs_dialplan_xml_bridge_start() if @outboundroutes;
+ my $count = 0;
foreach my $route (@outboundroutes) {
$ASTPP->debug( debug => "$route->{trunk}: cost $route->{cost}\t $route->{pattern}" );
if ( $route->{cost} > $routeinfo->{cost} ) {
$ASTPP->debug( debug => "$route->{trunk}: $route->{cost} > $routeinfo->{cost}, skipping" );
}
else {
- my ($returned_data,$junk) = $ASTPP->fs_dialplan_xml_bridge(
+ $xml .= $ASTPP->fs_dialplan_xml_bridge(
destination_number => $params->{'Caller-Destination-Number'},
route_prepend => $route->{prepend},
trunk_name => $route->{trunk},
- route_id => $route->{id}
+ route_id => $route->{id},
+ count => $count
);
- $xml .= $returned_data;
}
+ $count++;
}
$xml .= $ASTPP->fs_dialplan_xml_bridge_end() if @outboundroutes;
}
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-05-07 03:09:36 UTC (rev 2337)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-05-07 03:19:33 UTC (rev 2338)
@@ -416,14 +416,17 @@
print STDERR "Phone After: $arg{destination_number}\n";
}
}
+ if ($arg{count} > 0) {
+ $dialstring = "|";
+ } else {
+ }
if ( $trunkdata->{tech} eq "Zap" ) {
- $dialstring .= "openzap/" . $trunkdata->{path} . "/1/" . $arg{route_prepend} . $arg{destination_number} ."|";
- return ($dialstring,$data);
+ $dialstring .= "openzap/" . $trunkdata->{path} . "/1/" . $arg{route_prepend} . $arg{destination_number};
+ return ($dialstring);
}
elsif ( $trunkdata->{tech} eq "SIP" ) {
- $data = "sofia/gateway/" . $trunkdata->{path} . "/" . $arg{route_prepend} . $arg{destination_number};
- $dialstring .= $data . "|";
- return ($dialstring,$data);
+ $dialstring .= "sofia/gateway/" . $trunkdata->{path} . "/" . $arg{route_prepend} . $arg{destination_number};
+ return ($dialstring);
}
else {
print STDERR "CANNOT ROUTE THIS CALL!!!!!\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-05-07 03:09:42
|
Revision: 2337
http://astpp.svn.sourceforge.net/astpp/?rev=2337&view=rev
Author: darrenkw
Date: 2011-05-07 03:09:36 +0000 (Sat, 07 May 2011)
Log Message:
-----------
Fixed FreeSWITCH gateway issues. Tested to be working.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
trunk/web_interface/astpp-admin.cgi
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-30 16:51:30 UTC (rev 2336)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-05-07 03:09:36 UTC (rev 2337)
@@ -421,16 +421,8 @@
return ($dialstring,$data);
}
elsif ( $trunkdata->{tech} eq "SIP" ) {
- my ($profile,$dest) = split(m/","/m, $trunkdata->{path});
- $profile =~ s/"//g; #Strip off quotation marks
- $dest =~ s/"//g; #Strip off quotation marks
- if ($profile eq "gateway") {
- $data = "sofia/gateway/" . $dest . "/" . $arg{route_prepend} . $arg{destination_number};
- $dialstring .= $data . "|";
- } else {
- $data = "sofia/" . $profile . "/" . $arg{route_prepend} . $arg{destination_number} . "\@" . $dest;
- $dialstring .= $data . "|";
- }
+ $data = "sofia/gateway/" . $trunkdata->{path} . "/" . $arg{route_prepend} . $arg{destination_number};
+ $dialstring .= $data . "|";
return ($dialstring,$data);
}
else {
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2011-04-30 16:51:30 UTC (rev 2336)
+++ trunk/web_interface/astpp-admin.cgi 2011-05-07 03:09:36 UTC (rev 2337)
@@ -8445,13 +8445,7 @@
. "</td><td>"
. gettext("Protocol")
. "</td><td>"
- . "<a href=\"\#\">"
. gettext("Peer Name")
- . "<span class=\"popups\">"
- . gettext(
-"If using freeswitch then use the following formats: \"gateway\",\"gatewayname\" or \"profilename\",\"destinationhost\""
- )
- . "</span>" . "</a>"
. "</td><td>"
. gettext("Provider")
. "</td><td>"
@@ -8651,15 +8645,7 @@
. "</td><td>"
. gettext("Protocol")
. "</td><td>"
- . "<div id=\"popups\">"
- . "<a href=\"\#\">"
. gettext("Peer Name")
- . "<span class=\"popups\">"
- . gettext(
-"If using freeswitch then use the following formats: \"gateway\",\"gatewayname\" or \"profilename\",\"destinationhost\""
- )
- . "</span>" . "</a>"
- . "</div>"
. "</td><td>"
. gettext("Provider")
. "</td><td>"
@@ -8754,14 +8740,7 @@
. "</td><td>"
. gettext("Protocol")
. "</td><td>"
- . "<div id=\"popups\">"
- . "<a href=\"\#\">"
. gettext("Peer Name")
- . "<span class=\"popups\">"
- . gettext(
-"If using freeswitch then use the following formats: \"gateway\",\"gatewayname\" or \"profilename\",\"destinationhost\""
- )
- . "</span>" . "</a>"
. "</div>"
. "</td><td>"
. gettext("Provider")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-04-30 16:51:38
|
Revision: 2336
http://astpp.svn.sourceforge.net/astpp/?rev=2336&view=rev
Author: darrenkw
Date: 2011-04-30 16:51:30 +0000 (Sat, 30 Apr 2011)
Log Message:
-----------
Added ignore_early_media to freeswitch bridge command.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-13 03:14:18 UTC (rev 2335)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-30 16:51:30 UTC (rev 2336)
@@ -373,7 +373,7 @@
# $dialstring .= "<action application=\"set\" data=\"provider=" . $trunkdata->{provider} . "\"/>\n";
# $dialstring .= "<action application=\"set\" data=\"trunk=" . $trunkdata->{name} . "\"/>\n";
my $dialstring .= "<action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
- $dialstring .= "<action application=\"bridge\" data=\"";
+ $dialstring .= "<action application=\"bridge\" data=\"{ignore_early_media=true}";
return $dialstring;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-04-13 03:14:26
|
Revision: 2335
http://astpp.svn.sourceforge.net/astpp/?rev=2335&view=rev
Author: darrenkw
Date: 2011-04-13 03:14:18 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Missed adding a line.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-13 03:07:50 UTC (rev 2334)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-13 03:14:18 UTC (rev 2335)
@@ -372,7 +372,8 @@
# my $dialstring = "<action application=\"set\" data=\"outbound_route=" . $arg{route_id} . "\"/>\n";
# $dialstring .= "<action application=\"set\" data=\"provider=" . $trunkdata->{provider} . "\"/>\n";
# $dialstring .= "<action application=\"set\" data=\"trunk=" . $trunkdata->{name} . "\"/>\n";
- my $dialstring = "<action application=\"bridge\" data=\"";
+ my $dialstring .= "<action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
+ $dialstring .= "<action application=\"bridge\" data=\"";
return $dialstring;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-04-13 03:07:57
|
Revision: 2334
http://astpp.svn.sourceforge.net/astpp/?rev=2334&view=rev
Author: darrenkw
Date: 2011-04-13 03:07:50 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Corrected LCR code to match that suggested by FreeSWTICH team. This breaks some of our vendor costing code but that will be fixed later.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2011-03-23 04:33:55 UTC (rev 2333)
+++ trunk/freeswitch/astpp-fs-xml.pl 2011-04-13 03:07:50 UTC (rev 2334)
@@ -262,33 +262,31 @@
$xml .= "<condition field=\"destination_number\" expression=\"" . $params->{'Caller-Destination-Number'} . "\">\n";
$xml .= $returned_data;
- } else {
- # Get the list of routes for the phone number.
- my @outboundroutes =
- &get_outbound_routes( $astpp_db, $params->{'Caller-Destination-Number'},
- $carddata, $routeinfo, @reseller_list );
- foreach my $route (@outboundroutes) {
- $ASTPP->debug( debug =>
- "$route->{trunk}: cost $route->{cost}\t $route->{pattern}" );
- if ( $route->{cost} > $routeinfo->{cost} ) {
- $ASTPP->debug( debug =>
-"$route->{trunk}: $route->{cost} > $routeinfo->{cost}, skipping"
- );
- }
- else {
- my ($returned_data,$junk) = $ASTPP->fs_dialplan_xml_bridge(
- destination_number => $params->{'Caller-Destination-Number'},
- route_prepend => $route->{prepend},
- trunk_name => $route->{trunk},
- route_id => $route->{id}
- );
- $xml .= $returned_data;
- }
- }
- }
- $xml = $ASTPP->fs_dialplan_xml_footer( xml => $xml );
- $ASTPP->debug( debug => $xml );
- print $xml;
+ } else {
+ # Get the list of routes for the phone number.
+ my @outboundroutes = &get_outbound_routes( $astpp_db, $params->{'Caller-Destination-Number'},
+ $carddata, $routeinfo, @reseller_list );
+ $xml .= $ASTPP->fs_dialplan_xml_bridge_start() if @outboundroutes;
+ foreach my $route (@outboundroutes) {
+ $ASTPP->debug( debug => "$route->{trunk}: cost $route->{cost}\t $route->{pattern}" );
+ if ( $route->{cost} > $routeinfo->{cost} ) {
+ $ASTPP->debug( debug => "$route->{trunk}: $route->{cost} > $routeinfo->{cost}, skipping" );
+ }
+ else {
+ my ($returned_data,$junk) = $ASTPP->fs_dialplan_xml_bridge(
+ destination_number => $params->{'Caller-Destination-Number'},
+ route_prepend => $route->{prepend},
+ trunk_name => $route->{trunk},
+ route_id => $route->{id}
+ );
+ $xml .= $returned_data;
+ }
+ }
+ $xml .= $ASTPP->fs_dialplan_xml_bridge_end() if @outboundroutes;
+ }
+ $xml = $ASTPP->fs_dialplan_xml_footer( xml => $xml );
+ $ASTPP->debug( debug => $xml );
+ print $xml;
}
elsif ( $params->{section} eq "directory" ) {
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-03-23 04:33:55 UTC (rev 2333)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-04-13 03:07:50 UTC (rev 2334)
@@ -368,7 +368,19 @@
return $xml;
}
+sub fs_dialplan_xml_bridge_start() {
+# my $dialstring = "<action application=\"set\" data=\"outbound_route=" . $arg{route_id} . "\"/>\n";
+# $dialstring .= "<action application=\"set\" data=\"provider=" . $trunkdata->{provider} . "\"/>\n";
+# $dialstring .= "<action application=\"set\" data=\"trunk=" . $trunkdata->{name} . "\"/>\n";
+ my $dialstring = "<action application=\"bridge\" data=\"";
+ return $dialstring;
+}
+sub fs_dialplan_xml_bridge_end() {
+ my $dialstring = "\"/>\n";
+ return $dialstring;
+}
+
=item $ASTPP->fs_dialplan_xml_bridge()
Return the bridge command along with details. This is only called if a call is approved.
@@ -391,9 +403,6 @@
$trunkdata = $sql->fetchrow_hashref;
$arg{route_prepend} = "" if !$arg{route_prepend};
$sql->finish;
- $dialstring = "<action application=\"set\" data=\"outbound_route=" . $arg{route_id} . "\"/>\n";
- $dialstring .= "<action application=\"set\" data=\"provider=" . $trunkdata->{provider} . "\"/>\n";
- $dialstring .= "<action application=\"set\" data=\"trunk=" . $trunkdata->{name} . "\"/>\n";
if ($trunkdata->{dialed_modify} && $trunkdata->{dialed_modify} ne "") {
my @regexs = split(m/","/m, $trunkdata->{dialed_modify});
foreach my $regex (@regexs) {
@@ -406,20 +415,20 @@
print STDERR "Phone After: $arg{destination_number}\n";
}
}
- if ( $trunkdata->{tech} eq "Zap" ) {
- $dialstring .= "<action application=\"bridge\" data=\"openzap/" . $trunkdata->{path} . "/1/" . $arg{route_prepend} . $arg{destination_number} . "\"/>\n";
- return ($dialstring,$data);
- }
+ if ( $trunkdata->{tech} eq "Zap" ) {
+ $dialstring .= "openzap/" . $trunkdata->{path} . "/1/" . $arg{route_prepend} . $arg{destination_number} ."|";
+ return ($dialstring,$data);
+ }
elsif ( $trunkdata->{tech} eq "SIP" ) {
my ($profile,$dest) = split(m/","/m, $trunkdata->{path});
$profile =~ s/"//g; #Strip off quotation marks
$dest =~ s/"//g; #Strip off quotation marks
if ($profile eq "gateway") {
$data = "sofia/gateway/" . $dest . "/" . $arg{route_prepend} . $arg{destination_number};
- $dialstring .= "<action application=\"bridge\" data=\"" . $data . "\"/>\n";
+ $dialstring .= $data . "|";
} else {
$data = "sofia/" . $profile . "/" . $arg{route_prepend} . $arg{destination_number} . "\@" . $dest;
- $dialstring .= "<action application=\"bridge\" data=\"" . $data . "\"/>\n";
+ $dialstring .= $data . "|";
}
return ($dialstring,$data);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-03-23 04:34:01
|
Revision: 2333
http://astpp.svn.sourceforge.net/astpp/?rev=2333&view=rev
Author: darrenkw
Date: 2011-03-23 04:33:55 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
It was returning incorrect xml in some cases.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-01-23 18:29:07 UTC (rev 2332)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-03-23 04:33:55 UTC (rev 2333)
@@ -801,8 +801,8 @@
foreach my $record (@vars) {
$arg{xml} .= "<variable name=\"" . $record->{var_name} . "\" value=\"" . $record->{var_value} . "\"/>\n";
}
- $arg{xml} .= "<variable name=\"accountcode\" value=\"" . $record->{account} . "\"/>\n";
- $arg{xml} .= "<variable name=\"user_context\" value=\"" . $record->{context} . "\"/>\n";
+# $arg{xml} .= "<variable name=\"accountcode\" value=\"" . $record->{account} . "\"/>\n";
+# $arg{xml} .= "<variable name=\"user_context\" value=\"" . $record->{context} . "\"/>\n";
$arg{xml} .= "</variables>\n";
$arg{xml} .= "</user>\n";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-23 18:29:14
|
Revision: 2332
http://astpp.svn.sourceforge.net/astpp/?rev=2332&view=rev
Author: darrenkw
Date: 2011-01-23 18:29:07 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
Add code to assist with mod_perl implementation
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2011-01-15 21:47:57 UTC (rev 2331)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2011-01-23 18:29:07 UTC (rev 2332)
@@ -22,7 +22,7 @@
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
our %EXPORT_TAGS = ( 'all' => [ qw(
-
+load_config new set_verbosity_level set_verbosity
) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-15 21:48:04
|
Revision: 2331
http://astpp.svn.sourceforge.net/astpp/?rev=2331&view=rev
Author: darrenkw
Date: 2011-01-15 21:47:57 +0000 (Sat, 15 Jan 2011)
Log Message:
-----------
Add more FreeSWITCH support esp vendor rating support.
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2011-01-15 21:45:05 UTC (rev 2330)
+++ trunk/scripts/astpp-common.pl 2011-01-15 21:47:57 UTC (rev 2331)
@@ -98,6 +98,7 @@
. $astpp_db->quote($status)
. " WHERE cardnumber = "
. $astpp_db->quote( $cardinfo->{cardnumber} );
+ print STDERR $sql ."\n";
$astpp_db->do($sql);
}
@@ -1256,7 +1257,7 @@
my $didinfo = &get_did_reseller($astpp_db,$did,$accountdata->{reseller});
my $did_min_available = $didinfo->{monthlycost} + $didinfo->{setup} + $didinfo->{disconnectionfee};
my $credit = &accountbalance( $astpp_db, $accountdata->{number} ); # Find the available credit to the customer.
- print STDERR "Account Balance: $credit" if $config->{debug} == 1;
+ print STDERR "Account Balance: " . $credit . "\n" if $config->{debug} == 1;
$credit = ($credit * -1) + ($accountdata->{credit_limit}); # Add on the accounts credit limit.
if ($credit < $did_min_available) {
return gettext ("Account: " . $accountdata->{number} . " does not have enough funds available.");
@@ -1305,7 +1306,7 @@
} else {
my $did_min_available = $didinfo->{monthlycost} + $didinfo->{setup} + $didinfo->{disconnectionfee};
my $credit = &accountbalance( $astpp_db, $accountinfo->{number} ); # Find the available credit to the customer.
- print STDERR "Account Balance: $credit" if $config->{debug} == 1;
+ print STDERR "Account Balance: " . $credit . "\n" if $config->{debug} == 1;
$credit = ($credit * -1) + ($accountinfo->{credit_limit}); # Add on the accounts credit limit.
if ($credit < $did_min_available) {
return gettext ("Account: " . $accountinfo->{number} . " does not have enough funds available.");
@@ -1846,9 +1847,9 @@
$record = &search_for_route($astpp_db,$config,$destination,$config->{default_brand});
print STDERR "pattern: $record->{pattern}\n" if $record->{pattern};
}
- print STDERR "Route: $record->{comment} Cost: $record->{cost} Pricelist: $record->{pricelist} Pattern: $record->{pattern}\n" if $record;
+ print STDERR "Route: $record->{comment} Cost: $record->{cost} Pricelist: $record->{pricelist} Pattern: $record->{pattern}\n" if $record->{pattern};
}
- if ( $record->{inc} eq "" || $record->{inc} == 0 ) {
+ if ($record->{inc} &&( $record->{inc} eq "" || $record->{inc} == 0 )) {
my $branddata = &get_pricelist( $astpp_db, $pricelist);
$record->{inc} = $branddata->{inc};
}
@@ -3750,12 +3751,12 @@
}
print STDERR "Found pattern: $numdata->{pattern}\n" if $config->{debug} == 1;
$credit = &accountbalance( $astpp_db, $carddata->{number} ); # Find the available credit to the customer.
- print STDERR "Account Balance: " . $credit * 10000 if $config->{debug} == 1;
+ print STDERR "Account Balance: " . $credit * 10000 . "\n" if $config->{debug} == 1;
$credit_limit = $carddata->{credit_limit} * 10000;
- print STDERR "Credit Limit: $credit_limit" if $config->{debug} == 1;
+ print STDERR "Credit Limit: " . $credit_limit . "\n" if $config->{debug} == 1;
$credit = ($credit * -1) + ($credit_limit); # Add on the accounts credit limit.
#$credit = $credit / $carddata->{maxchannels} if $carddata->{maxchannels} > 0;
- print STDERR "Credit: $credit \n" if $config->{debug} == 1;
+ print STDERR "Credit: " . $credit . "\n" if $config->{debug} == 1;
if ($branddata->{markup} > 0) {
$numdata->{connectcost} =
$numdata->{connectcost} * ( ( $branddata->{markup} / 10000 ) + 1 );
@@ -3767,22 +3768,15 @@
}
if ( $numdata->{cost} > 0 ) {
$maxlength = ( ( $credit - $numdata->{connectcost} ) / $numdata->{cost} );
- if ($config->{call_max_length} && $maxlength < $config->{call_max_length} / 1000){
+ if ($config->{call_max_length} && ($maxlength > $config->{call_max_length} / 1000)){
+ print STDERR "LIMITING CALL TO CONFIG MAX LENGTH \n" if $config->{debug} == 1;
$maxlength = $config->{call_max_length} / 1000 / 60;
}
}
else {
+ print STDERR "CALL IS FREE - ASSIGNING MAX LENGHT \n" if $config->{debug} == 1;
$maxlength = $config->{max_free_length}; # If the call is set to be free then assign a max length.
}
- if ( $numdata->{cost} > 0 ) {
- $maxlength = ( ( $credit - $numdata->{connectcost} ) / $numdata->{cost} );
- if ($config->{call_max_length} && $maxlength < $config->{call_max_length} / 1000){
- $maxlength = $config->{call_max_length} / 1000 / 60;
- }
- }
- else {
- $maxlength = $config->{max_free_length}; # If the call is set to be free then assign a max length.
- }
return (1, $maxlength);
}
@@ -3887,7 +3881,7 @@
$sound->{cardnumber_incorrect} = $location . "astpp-badaccount.gsm"; #Incorrect card number.
$sound->{pin} = $location . "astpp-pleasepin.gsm"; #Please enter your pin followed by pound.
$sound->{pin_incorrect} = $location . "astpp-invalidpin.gsm"; #Incorrect pin.
-$sound->{goodbye} = $location . "goodbye.gsm"; #Goodbye.
+$sound->{goodbye} = $location . "conf-goodbye.wav"; #Goodbye.
$sound->{destination} = $location . "astpp-phonenum.gsm"; #Please enter the number you wish to dial followed by pound.
$sound->{destination_incorrect} = $location . "astcc-badphone.gsm"; #Phone number not found!
$sound->{card_inuse} = $location . "astpp-in-use.gsm"; #This card is presently being used.
@@ -3898,7 +3892,9 @@
$sound->{sub_currency_plural} = $location . "astpp-cents.gsm"; #cents
$sound->{per} = $location . "astpp-per.gsm"; #per
$sound->{minute} = $location . "astpp-minute.gsm"; #Minute
-$sound->{minutes} = $location . "astpp-minutes.gsm"; #Minutes
+#Changed By Joseph Watson
+#$sound->{minutes} = $location . "astpp-minutes.gsm"; #Minutes
+$sound->{minutes} = $location . "minutes.wav"; #Minutes
$sound->{second} = $location . "astpp-second.gsm"; #Second
$sound->{seconds} = $location . "astpp-seconds.gsm"; #Seconds
$sound->{a_connect_charge} = $location . "astpp-connectcharge.gsm"; #A connect charge of
@@ -3918,7 +3914,7 @@
$sound->{noanswer} = $location . "astpp-noanswer-tryagain.gsm"; #There was no answer, Press 1 to try again.
$sound->{badnumber} = $location . "astpp-badnumber.gsm"; # "Calls from this location are blocked!"
$sound->{used_elsewhere} = $location . "astpp-used-elsewhere.gsm"; # "This location has been used already."
-$sound->{goodbye} = $location . "goodbye.gsm"; # "Goodbye"
+$sound->{goodbye} = $location . "conf-goodbye.wav"; # "Goodbye"
$sound->{callback_performed} = $location . "astpp-callback-performed.gsm"; # "This callback has been performed please disconnect now"
$sound->{cardnumber} = $location . "astpp-accountnum.gsm"; #Please enter your card number followed by pound.
$sound->{cardnumber_incorrect} = $location . "astpp-badaccount.gsm"; #Incorrect card number.
@@ -3927,7 +3923,7 @@
$sound->{point} = $location . "astcc-point.gsm"; #point.
$sound->{register_ani} = $location . "astpp-register.gsm"; # "Register ANI to this card? Press 1 for yes or any other key for no."
$sound->{card_has_expired} = $location . "astpp_expired.gsm"; #"This card has expired"
-$sound->{card_is_empty} = $location . "astpp-empty.gsm"; #This card is empty
+$sound->{card_is_empty} = $location . "astpp-card-is-empty.gsm"; #This card is empty
$sound->{where_to_call} = $location .
"astpp-where-to-call.gsm"
; #Press 1 to receive a call at the number you called from or registered
@@ -3996,37 +3992,23 @@
######## Call Rating ################################
sub cleanup_cdrs_fs() {
my ($cdr_db, $config) = @_;
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'ORIGINATOR_CANCEL'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'CALL_REJECTED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'USER_NOT_REGISTERED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'CHAN_NOT_IMPLEMENTED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'INVALID_NUMBER_FORMAT'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'UNALLOCATED_NUMBER'");
- if ($config->{trackvendorcharges} == 1) {
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'ORIGINATOR_CANCEL'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CALL_REJECTED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'USER_NOT_REGISTERED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CHAN_NOT_IMPLEMENTED'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'INVALID_NUMBER_FORMAT'");
- $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'UNALLOCATED_NUMBER'");
- }
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'ORIGINATOR_CANCEL'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'CALL_REJECTED'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'USER_NOT_REGISTERED'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'CHAN_NOT_IMPLEMENTED'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'INVALID_NUMBER_FORMAT'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'NORMAL_TEMPORARY_FAILURE'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0',vendor='0' WHERE duration = '0' and billsec='0'");
}
sub cleanup_cdrs() {
my ($cdr_db, $config) = @_;
# First we cleanup all calls that are not answered
if ($config->{astcdr} == 1) {
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0' WHERE disposition REGEXP 'NO ANSWER'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0' WHERE disposition REGEXP 'BUSY'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0' WHERE disposition REGEXP 'FAILED'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0' WHERE disposition REGEXP 'CONGESTION'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0' WHERE disposition REGEXP 'CANCEL'");
- if ($config->{trackvendorcharges} == 1) {
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'NO ANSWER'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'BUSY'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'FAILED'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CONGESTION'");
- $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CANCEL'");
- }
+ $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'NO ANSWER'");
+ $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'BUSY'");
+ $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'FAILED'");
+ $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'CONGESTION'");
+ $cdr_db->do("UPDATE $config->{asterisk_cdr_table} SET cost = '0',vendor='0' WHERE disposition REGEXP 'CANCEL'");
if ($config->{thirdlane_mods} == 1) {
$cdr_db->do("UPDATE $config->{cdr_table} SET accountcode = userfield WHERE (accountcode IS NULL or accountcode = '')");
}
@@ -4058,6 +4040,7 @@
sub rating() { # This routine recieves a specific cdr and takes care of rating it and of marking it as rated. It bills resellers as appropriate.
my ( $astpp_db, $cdr_db, $config, $cdrinfo, $carddata, $vars, @output ) = @_;
my ( $increment, $numdata, $package, $notes, $status );
+ $status = 0;
print STDERR "----------------------------------------------------------------\n";
print STDERR
"uniqueid: $cdrinfo->{uniqueid}, cardno: $carddata->{number}, phoneno: $cdrinfo->{dst}, Userfield: $cdrinfo->{userfield}\n";
@@ -4070,7 +4053,6 @@
# print STDERR "Destination: $cdrinfo->{dst} \n";
# }
$numdata = &get_route( $astpp_db, $config, $cdrinfo->{dst}, $carddata->{pricelist}, $carddata, $cdrinfo->{userfield} );
- print STDERR "PATTERN: $numdata->{pattern}";
if ( !$numdata->{pattern} ) {
&save_cdr( $config, $cdr_db, $cdrinfo->{uniqueid}, "error",$cdrinfo->{dst} ) if !$vars && $config->{astcdr} == 1;
print STDERR "ERROR - ERROR - ERROR - ERROR - ERROR \n";
@@ -4078,7 +4060,7 @@
print STDERR "----------------------------------------------------------------\n";
}
else {
- print STDERR "FOUND A MATCHING PATTERN.\n";
+ print STDERR "FOUND A MATCHING PATTERN: $numdata->{pattern}";
my $branddata = &get_pricelist( $astpp_db, $carddata->{pricelist} );
print STDERR
"pricelistData: $branddata->{name} $branddata->{markup} $branddata->{inc} $branddata->{status}\n";
@@ -4260,6 +4242,7 @@
print STDERR "----------------------\n";
}
elsif ( $cdrinfo->{accountcode} ) {
+ $status = 0;
$status = &rating( $astpp_db, $cdr_db,$config, $cdrinfo, $carddata, $vars);
$cdrinfo = &get_cdr( $config, $cdr_db, $uniqueid ) if !$vars;
if ( $status == 1 ) {
@@ -4344,10 +4327,10 @@
my ( $astpp_db, $cdr_db, $config, $phrase, $uniqueid, $vars ) = @_;
my ($sql,$tmp);
print STDERR "Vendor Rating Uniqueid: " . $uniqueid . "\n";
- if(!$uniqueid) {
- $tmp = "SELECT * FROM $config->{freeswitch_cdr_table} WHERE vendor IN ('error','none')";
- } else {
+ if($uniqueid) {
$tmp = "SELECT * FROM $config->{freeswitch_cdr_table} WHERE uniqueid = '$uniqueid'";
+ } else {
+ $tmp = "SELECT * FROM $config->{freeswitch_cdr_table} WHERE vendor IN ('error','none')";
}
print STDERR $tmp . "\n" if $config->{debug} == 1;
$sql = $cdr_db->prepare($tmp);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-15 21:45:11
|
Revision: 2330
http://astpp.svn.sourceforge.net/astpp/?rev=2330&view=rev
Author: darrenkw
Date: 2011-01-15 21:45:05 +0000 (Sat, 15 Jan 2011)
Log Message:
-----------
Fixed bugs in FreeSWITCH vendor rating.
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
trunk/scripts/astpp-rate-engine.pl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2011-01-15 21:38:29 UTC (rev 2329)
+++ trunk/scripts/astpp-common.pl 2011-01-15 21:45:05 UTC (rev 2330)
@@ -4001,12 +4001,14 @@
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'USER_NOT_REGISTERED'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'CHAN_NOT_IMPLEMENTED'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'INVALID_NUMBER_FORMAT'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'UNALLOCATED_NUMBER'");
if ($config->{trackvendorcharges} == 1) {
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'ORIGINATOR_CANCEL'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CALL_REJECTED'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'USER_NOT_REGISTERED'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'CHAN_NOT_IMPLEMENTED'");
$cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET vendor = '0' WHERE disposition REGEXP 'INVALID_NUMBER_FORMAT'");
+ $cdr_db->do("UPDATE $config->{freeswitch_cdr_table} SET cost = '0' WHERE disposition REGEXP 'UNALLOCATED_NUMBER'");
}
}
sub cleanup_cdrs() {
Modified: trunk/scripts/astpp-rate-engine.pl
===================================================================
--- trunk/scripts/astpp-rate-engine.pl 2011-01-15 21:38:29 UTC (rev 2329)
+++ trunk/scripts/astpp-rate-engine.pl 2011-01-15 21:45:05 UTC (rev 2330)
@@ -72,6 +72,7 @@
} else {
$config->{cdr_table} = $config->{asterisk_cdr_table};
$ASTPP->debug("Rating calls for Asterisk", $verbosity);
+ &cleanup_cdrs($cdr_db, $config);
}
if ( $uniqueid ne "" ) {
@@ -181,7 +182,6 @@
exit(0);
}
else {
- &cleanup_cdrs($cdr_db, $config);
my @chargelist;
my $phrase = "none";
@chargelist = &list_cdrs_status( $config, $cdr_db, $phrase ); # Grab a list of all calls with "none" assigned in the cost field
@@ -190,13 +190,13 @@
@chargelist = &list_cdrs_status( $config, $cdr_db, $phrase ); # Grab a list of all calls with "none" assigned in the cost field
&processlist($astpp_db, $cdr_db, $config, \@chargelist); # See if we can now bill some of the calls that are marked in "error"
if ($config->{trackvendorcharges} == 1) {
- print STDERR gettext("START ON VENDOR CALL RATING!") . "\n" if $config->{debug} == 1;
+ print STDERR gettext("START ON VENDOR CALL RATING!") . "\n" if $config->{debug} == 1;
if ($config->{softswitch} == 0) {
- &vendor_process_rating( $astpp_db, $cdr_db, $config, "none", 0 );
- &vendor_process_rating( $astpp_db, $cdr_db, $config. $config, "error", 0 );
+ &vendor_process_rating( $astpp_db, $cdr_db, $config, "none", 0 );
+ &vendor_process_rating( $astpp_db, $cdr_db, $config. $config, "error", 0 );
} elsif ($config->{softswitch} == 1) {
- &vendor_process_rating_fs( $astpp_db, $cdr_db, $config, "none", 0 );
- &vendor_process_rating_fs( $astpp_db, $cdr_db, $config. $config, "error", 0 );
+ &vendor_process_rating_fs( $astpp_db, $cdr_db, $config, "none", 0 );
+ &vendor_process_rating_fs( $astpp_db, $cdr_db, $config, $config, "error", 0 );
}
print STDERR gettext("VENDOR CALLS WHICH HAVE NOT BEEN RATED.") . "\n" if $config->{debug} == 1;
# Print a list of calls which have not been rated
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-15 21:38:35
|
Revision: 2329
http://astpp.svn.sourceforge.net/astpp/?rev=2329&view=rev
Author: darrenkw
Date: 2011-01-15 21:38:29 +0000 (Sat, 15 Jan 2011)
Log Message:
-----------
Fixed output on callingcard balance. Also added support to set vendor/trunk information on outgoing calls.
Modified Paths:
--------------
trunk/freeswitch/astpp-callingcards.pl
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2011-01-11 03:19:05 UTC (rev 2328)
+++ trunk/freeswitch/astpp-callingcards.pl 2011-01-15 21:38:29 UTC (rev 2329)
@@ -9,7 +9,6 @@
# This program is Free Software and is distributed under the
# terms of the GNU General Public License version 2.
#############################################################################
-#use DBI;
use POSIX qw(ceil floor);
use POSIX qw(strftime);
use Time::HiRes qw( gettimeofday tv_interval );
@@ -51,8 +50,7 @@
}
sub set_in_use()
-{ # Set the "inuse" flag on the calling cards. This prevents multiple people from
-
+{ # Set the "inuse" flag on the calling cards. This prevents multiple people from
# using the same card.
my ( $cardinfo, $status ) = @_;
my $sql;
@@ -115,7 +113,6 @@
$astpp_db->do($sql);
}
-# $cardinfo = &get_callingcard( $astpp_db, $cardinfo->{cardnumber} );
if ( $cardinfo->{validfordays} > 0 )
{ #Check if the card is set to expire and deal with that as appropriate.
my $sql =
@@ -189,25 +186,50 @@
}
if ( $config->{calling_cards_rate_announce} == 1 ) {
if ( $numberinfo->{cost} > 0 ) {
+ my @call_cost = split( /\./, sprintf( "%.2f", $numberinfo->{cost} / 10000) );
$session->streamFile( $sound->{call_will_cost} );
- $session->execute( "phrase",
- "spell," . ceil( $numberinfo->{cost} / 100 ) );
- $session->streamFile( $sound->{currency} );
- my @call_cost = split( /\./, ( $numberinfo->{cost} / 100 ) );
- $session->execute( "phrase", "spell," . @call_cost[0] );
- if ( @call_cost[1] ) {
- $session->streamFile( $sound->{point} );
- $session->execute( "phrase", "spell," . @call_cost[1] );
- $session->streamFile( $sound->{sub_currency} );
+$ASTPP->debug( debug => "Call Cost Before Decimal: " . @call_cost[0]);
+ if (@call_cost[0] > 0) {
+ $session->execute( "say", "en number pronounced " . @call_cost[0] );
+ if (@call_cost[0] == 1) {
+ $session->streamFile( $sound->{main_currency} ) ;
+ } else {
+ $session->streamFile( $sound->{main_currency_plural} ) ;
+ }
+ }
+$ASTPP->debug( debug => "Call Cost After Decimal: " . @call_cost[1]);
+ if ( @call_cost[1] > 0 ) {
+ $session->execute( "say", "en number pronounced " . @call_cost[1] );
+ if (@call_cost[1] == 1) {
+ $session->streamFile( $sound->{sub_currency} ) ;
+ } else {
+ $session->streamFile( $sound->{sub_currency_plural} ) ;
+ }
}
$session->streamFile( $sound->{per} );
$session->streamFile( $sound->{minute} );
}
if ( $numberinfo->{connectcost} > 0 ) {
$session->streamFile( $sound->{a_connect_charge} );
- $session->execute( "phrase",
- "spell," . ceil( $numberinfo->{connectcost} / 100 ) );
- $session->streamFile( $sound->{sub_currency} );
+ my @connect_cost = split( /\./, sprintf( "%.2f", $numberinfo->{connectcost} / 10000) );
+$ASTPP->debug( debug => "Connect Cost Before Decimal: " . @connect_cost[0]);
+ if (@connect_cost[0] > 0) {
+ $session->execute( "say", "en number pronounced " . @connect_cost[0] );
+ if (@connect_cost[0] == 1) {
+ $session->streamFile( $sound->{main_currency} ) ;
+ } else {
+ $session->streamFile( $sound->{main_currency_plural} ) ;
+ }
+ }
+$ASTPP->debug( debug => "Connect Cost After Decimal: " . @connect_cost[1]);
+ if ( @connect_cost[1] > 0 ) {
+ $session->execute( "say", "en number pronounced " . @connect_cost[1] );
+ if (@connect_cost[1] == 1) {
+ $session->streamFile( $sound->{sub_currency} ) ;
+ } else {
+ $session->streamFile( $sound->{sub_currency_plural} ) ;
+ }
+ }
$session->streamFile( $sound->{will_apply} );
}
}
@@ -215,13 +237,13 @@
sub timelimit() { #Calculate and say the time limit.
my ( $numberinfo, $pricelistinfo, $cardinfo, $phoneno ) = @_;
- my ( $connectfee, $cost, $timelimit, $available, $maxtime, $balance );
+ my ( $connectcost, $cost, $timelimit, $available, $maxtime, $balance );
# Timelimit is in seconds
if ( $cc == 0 ) {
$available =
( $cardinfo->{value} - $cardinfo->{used} ) -
- $numberinfo->{connectfee};
+ $numberinfo->{connectcost};
$ASTPP->debug(
debug => "FUNDS AVAILABLE: $available",
verbosity => $verbosity
@@ -230,7 +252,7 @@
elsif ( $cc == 1 ) {
$balance = &accountbalance( $astpp_db, $cardinfo->{number} );
$balance = ( $balance * -1 ) + ( $cardinfo->{credit_limit} );
- $available = ( $balance - $numberinfo->{connectfee} ) / 100;
+ $available = ( $balance - $numberinfo->{connectcost} ) / 100;
}
if ( $available > 0 && $numberinfo->{cost} > 0 ) {
$timelimit = ( ( $available / $numberinfo->{cost} ) * 60 );
@@ -246,19 +268,18 @@
verbosity => $verbosity
);
if ( $brandinfo->{reseller} ne "" ) {
- ASTPP->debug(
+ $ASTPP->debug(
debug => "THIS BRAND BELONGS TO $brandinfo->{reseller}!",
verbosity => $verbosity
);
my $carddata = &get_account( $astpp_db, $brandinfo->{reseller} );
-
# ($callstatus, $maxlength) = &max_length($astpp_db, $config, $carddata, $phoneno);
# my $routeinfo = &get_route( $astpp_db, $config, $phoneno, $carddata->{pricelist},$carddata );
my $minimumcharge = $numberinfo->{cost};
my $belongs_to_reseller = 1;
while ( $belongs_to_reseller == 1 ) {
$ASTPP->debug(
- debug => "FINDING LIMIT FOR: $carddata->{reseller}",
+ debug => "FINDING LIMIT FOR: $carddata->{number}",
verbosity => $verbosity
);
push @resellerlist, $carddata->{number};
@@ -307,18 +328,16 @@
);
}
$ASTPP->debug( debug => "TIMELIMIT: $timelimit", verbosity => $verbosity );
- my $minutes = $timelimit / 60;
+ my $minutes = sprintf( "%.0f", $timelimit /60 );
$ASTPP->debug( debug => "MINUTES: $minutes", verbosity => $verbosity );
if ( $minutes > 0 && $config->{calling_cards_timelimit_announce} == 1 ) {
- my $minutes = $timelimit / 60;
- $minutes = sprintf( "%.0f", $minutes );
$session->streamFile( $sound->{call_will_last} );
if ( $minutes == 1 ) {
- $session->execute( "phrase", "spell," . $minutes );
+ $session->execute( "say", "en number pronounced " . $minutes );
$session->streamFile( $sound->{minute} );
}
elsif ( $minutes > 1 ) {
- $session->execute( "phrase", "spell," . $minutes );
+ $session->execute( "say", "en number pronounced " . $minutes );
$session->streamFile( $sound->{minutes} );
}
}
@@ -331,14 +350,14 @@
debug => "Available: $available",
verbosity => $verbosity
);
- $ASTPP->debug( debug => "Balance: $balance", verbosity => $verbosity );
- $ASTPP->debug( debug => "Max Time: $maxtime", verbosity => $verbosity );
+# $ASTPP->debug( debug => "Balance: $balance", verbosity => $verbosity );
+# $ASTPP->debug( debug => "Max Time: $maxtime", verbosity => $verbosity );
return $timelimit;
}
sub say_balance() { #Calculate and say the card balance.
my ($cardinfo) = @_;
- my ( $connectfee, $cost, $included, $sub_balance, $balance, $main_balance );
+ my ( $connectcost, $cost, $included, $sub_balance, $balance, $main_balance );
if ( $cc == 0 ) {
$balance = $cardinfo->{value} - $cardinfo->{used};
}
@@ -347,25 +366,32 @@
$balance = ( $balance * -1 ) + ( $cardinfo->{credit_limit} );
}
if ( $balance > 0 ) {
- $balance = $balance / 10000;
- $balance = sprintf( "%.2f", $balance );
- $sub_balance = substr( $balance, -2, 2 );
- $main_balance = substr( $balance, 0, -2 );
+ my @split_balance = split( /\./, ( sprintf( "%.2f", $balance / 10000) ) );
+# $balance = $balance / 10000;
+# $balance = sprintf( "%.2f", $balance );
+# $sub_balance = substr( $balance, -2, 2 );
+# $main_balance = substr( $balance, 0, -2 );
+ if ($config->{debug} == 1) {
+ print STDERR "BALANCE: $balance \n";
+ print STDERR "BALANCE: " . sprintf( "%.0f", $balance / 10000) . "\n";
+ print STDERR "SPLIT_BALANCE 0: @split_balance[0] \n";
+ print STDERR "SPLIT_BALANCE 1: @split_balance[1] \n";
+ }
$session->streamFile( $sound->{card_has_balance_of} );
- if ( $main_balance == 1 ) {
- $session->execute( "phrase", "spell," . $main_balance );
+ if ( @split_balance[0] == 1 ) {
+ $session->execute( "say", "en number pronounced " . @split_balance[0] );
$session->streamFile( $sound->{main_currency} );
}
- elsif ( $main_balance > 1 ) {
- $session->execute( "phrase", "spell," . $main_balance );
+ elsif ( @split_balance[0] > 1 ) {
+ $session->execute( "say", "en number pronounced " . @split_balance[0] );
$session->streamFile( $sound->{main_currency_plural} );
}
- if ( $sub_balance == 1 ) {
- $session->execute( "phrase", "spell," . $sub_balance );
+ if ( @split_balance[1] == 1 ) {
+ $session->execute( "say", "en number pronounced " . @split_balance[1] );
$session->streamFile( $sound->{sub_currency} );
}
- elsif ( $sub_balance > 1 ) {
- $session->execute( "phrase", "spell," . $sub_balance );
+ elsif ( @split_balance[1] > 1 ) {
+ $session->execute( "say", "en number pronounced " . @split_balance[1] );
$session->streamFile( $sound->{sub_currency_plural} );
}
}
@@ -419,24 +445,35 @@
$count = 0;
foreach my $route (@outboundroutes) {
my $callstart = localtime();
- my ($accountcode);
$callstart = &prettytimestamp if $cc == 1;
- $session->execute( "sched_hangup", "+" . $timelimit * 60 );
+ $session->execute( "set", "execute_on_answer=sched_hangup +" . $timelimit );
+# $session->execute( "export", "execute_on_answer=sched_hangup +" . $timelimit );
+# $session->execute( "set", "execute_on_answer=sched_broadcast", "+" . $timelimit - 60 . " one_minute_left.wav both");
+
my ( $xml_string, $data_string ) = $ASTPP->fs_dialplan_xml_bridge(
destination_number => $destination,
route_prepend => $route->{prepend},
trunk_name => $route->{trunk}
);
+ my $sql = $astpp_db->prepare( "SELECT provider FROM trunks WHERE name = '"
+ . $route->{trunk} ."'" );
+ $sql->execute;
+ my $trunkdata = $sql->fetchrow_hashref;
+ $sql->finish;
+
my ( $dialedtime, $uniqueid, $answeredtime, $clid );
+ $session->execute( "export", "outbound_route=$route->{id}" );
+ $session->execute( "export", "provider=$trunkdata->{provider}" );
+ $session->execute( "export", "trunk=$route->{trunk}" );
+ $session->execute( "export", "callingcard_destination=$destination" );
+
if ( $cc == 1 ) {
- $session->execute( "export", "accountcode=CC:$cardinfo->{number}" );
+ $session->execute( "export", "accountcode=$cardinfo->{accountcode}" );
$session->execute( "export", "callingcard=$cardinfo->{number}" );
- $session->execute( "export", "calldestination=$destination" );
}
else {
- $session->execute( "export", "accountcode=CC:$cardinfo->{cardnumber}" );
+ $session->execute( "export", "accountcode=$cardinfo->{accountcode}" );
$session->execute( "export", "callingcard=$cardinfo->{cardnumber}" );
- $session->execute( "export", "calldestination=$destination" );
}
$session->execute( "bridge", "$data_string" );
return 1;
@@ -510,14 +547,10 @@
sub print_console() #Dump string to the console
{
my ($output) = @_;
- freeswitch::consoleLog( "ASTPP", $output . "\n" );
+# $session->consoleLog( "ASTPP", $output . "\n" );
+ print STDERR "ASTPP:" . $output . "\n";
}
-sub say() {
- my ( $phrase, $say ) = @_;
- $session->execute( "phrase", $phrase . "," . $say );
-}
-
################# Program Starts Here #################################
my ( $cardnum, $pin, $destination, $connectsurcharge, $perminsurcharge, $brand )
= @ARGV;
@@ -531,7 +564,10 @@
$ASTPP->debug( debug => "Vars: " . $vars );
return 1 if ( !$session->ready() );
-if ( $cardnum && $cardnum ne "" ) {
+$cardnum = $session->getVariable("callingcard_number");
+
+
+if ( $cardnum && $cardnum > 0 ) {
$ASTPP->debug(
debug => "We recieved a cardnumber from the dialplan",
verbosity => $verbosity
@@ -623,10 +659,22 @@
&load_config_db_reseller( $astpp_db, $config, $brandinfo->{reseller} );
}
$config = &load_config_db_brand( $astpp_db, $config, $cardinfo->{brand} );
-$pricelistinfo = &get_pricelist( $astpp_db, $brandinfo->{pricelist} )
- if $cc == 0;
-$pricelistinfo = &get_pricelist( $astpp_db, $cardinfo->{pricelist} )
- if $cc == 1;
+#$config->{debug} = 1;
+print STDERR "CC: " . $cc ."\n" if $config->{debug} == 1;
+if ($cc == 0) {
+ $pricelistinfo = &get_pricelist( $astpp_db, $brandinfo->{pricelist} );
+ if ( $brandinfo->{reseller} ne "" ) {
+ print STDERR "SETTING ACCOUNTCODE TO: RESELLER " . $brandinfo->{reseller} . "\n" if $config->{debug} == 1;
+ $cardinfo->{accountcode} = $brandinfo->{reseller};
+ } else {
+ print STDERR "SETTING ACCOUNTCODE TO: SYSTEM DEFAULT " . $config->{callout_accountcode} . "\n" if $config->{debug} == 1;
+ $cardinfo->{accountcode} = $config->{callout_accountcode};
+ }
+} elsif ($cc == 1) {
+ $pricelistinfo = &get_pricelist( $astpp_db, $cardinfo->{pricelist} );
+ print STDERR "SETTING ACCOUNTCODE TO: ASTPP ACCOUNT " . $cardinfo->{number} . "\n" if $config->{debug} == 1;
+ $cardinfo->{accountcode} = $cardinfo->{number};
+}
if ( $destination && $destination ne "" ) {
$numberinfo =
&get_route( $astpp_db, $config, $destination, $brandinfo->{pricelist},
@@ -650,11 +698,15 @@
$session->streamFile( $sound->{destination_incorrect} );
}
else {
+ $ASTPP->debug( debug => "COST: " . $numberinfo->{cost});
$numberinfo->{cost} = $numberinfo->{cost} + $perminsurcharge
- if $perminsurcharge ne "";
+ if $perminsurcharge > 0;
+ $ASTPP->debug( debug => "COST: " . $numberinfo->{cost});
+ $ASTPP->debug( debug => "CONNECTION: " . $numberinfo->{connectcost});
$numberinfo->{connectcost} =
$numberinfo->{connectcost} + $connectsurcharge
- if $connectsurcharge ne "";
+ if $connectsurcharge > 0;
+ $ASTPP->debug( debug => "CONNECTION: " . $numberinfo->{connectcost});
}
$retries++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-11 03:19:12
|
Revision: 2328
http://astpp.svn.sourceforge.net/astpp/?rev=2328&view=rev
Author: darrenkw
Date: 2011-01-11 03:19:05 +0000 (Tue, 11 Jan 2011)
Log Message:
-----------
Fixed a few issues.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-cdr-xml.pl
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-cdr-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-cdr-xml.pl 2011-01-05 06:13:02 UTC (rev 2327)
+++ trunk/freeswitch/astpp-fs-cdr-xml.pl 2011-01-11 03:19:05 UTC (rev 2328)
@@ -16,12 +16,10 @@
use DBI;
use CGI;
use CGI qw/:standard Vars/;
-use ASTPP;
+use ASTPP ':all';
use URI::Escape;
use strict;
-#use XML::Simple;
use Data::Dumper;
-#use XML::Twig;
use XML::LibXML;
@@ -145,7 +143,7 @@
$cdrinfo->{destination_number} = $cdrinfo->{callingcard_destination};
}
-print STDERR Dumper $cdrinfo;
+print STDERR Dumper $cdrinfo if $config->{debug} == 1;
my $tmp = "INSERT INTO " . $config->{freeswitch_cdr_table} . "(accountcode,src,dst,dcontext,clid,channel,dstchannel,lastapp,"
. "lastdata,calldate,answerdate,enddate,duration,billsec,disposition,amaflags,uniqueid,userfield,read_codec,"
@@ -204,22 +202,23 @@
. "'" . $cdrinfo->{progress_mediamsec} . "'"
. ")";
-print STDERR "\n" . $tmp . "\n";
+print STDERR "\n" . $tmp . "\n" if $config->{debug} == 1;
$cdr_db->do($tmp);
print "Wrote CDR\n";
my (@chargelist);
push @chargelist, $cdrinfo->{uuid};
&processlist( $astpp_db, $cdr_db, $config, \@chargelist );
-print STDERR "VENDOR CHARGES: " . $config->{trackvendorcharges} . "\n";
+print STDERR "VENDOR CHARGES: " . $config->{trackvendorcharges} . "\n" if $config->{debug} == 1;
&vendor_process_rating_fs( $astpp_db, $cdr_db, $config, "none", $cdrinfo->{uuid},"" ) if $config->{trackvendorcharges} == 1;
-if ($cdrinfo->{callingcard_destination} && $cdrinfo->{direction} eq "outbound") {
+if ( $cdrinfo->{callingcard_destination} && $cdrinfo->{direction} eq "outbound") {
&process_callingcard_cdr;
}
sub process_callingcard_cdr() {
my ( $cardinfo, $brandinfo, $numberinfo, $pricelistinfo,$cc );
my $destination = $cdrinfo->{destination_number};
+ $cdrinfo->{billsec} = 0 if $cdrinfo->{hangup_cause} ne "NORMAL_CLEARING";
$destination =~ s/@.*//g;
my $cardnumber = $cdrinfo->{callingcard};
$cardinfo = &get_callingcard( $astpp_db, $cardnumber, $config );
@@ -237,9 +236,9 @@
$pricelistinfo = &get_pricelist( $astpp_db, $cardinfo->{pricelist} )
if $cc == 1;
- print STDERR "THIS IS A CALLINGCARD CALL! \n";
- print STDERR "CARD: $cardinfo->{cardnumber} \n";
- print STDERR "CARD: $cardnumber \n";
+ print STDERR "THIS IS A CALLINGCARD CALL! \n" if $config->{debug} == 1;
+ print STDERR "CARD: $cardinfo->{cardnumber} \n" if $config->{debug} == 1;
+ print STDERR "CARD: $cardnumber \n" if $config->{debug} == 1;
$numberinfo = &get_route(
$astpp_db, $config,
$destination,
@@ -290,7 +289,7 @@
( ( $cardinfo->{min_length_pennies} * 100 ) +
$charge );
}
- print STDERR "CARDNUMBER: " . $cardinfo->{cardnumber};
+ print STDERR "CARDNUMBER: " . $cardinfo->{cardnumber} if $config->{debug} == 1;
&write_callingcard_cdr(
$astpp_db,
$config,
@@ -304,7 +303,8 @@
);
&callingcard_set_in_use($astpp_db,$cardinfo,0);
&callingcard_update_balance($astpp_db,$cardinfo,$charge);
- }
+ }
+ &callingcard_set_in_use($astpp_db,$cardinfo,0);
}
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2011-01-05 06:13:02 UTC (rev 2327)
+++ trunk/freeswitch/astpp-fs-xml.pl 2011-01-11 03:19:05 UTC (rev 2328)
@@ -16,7 +16,7 @@
use DBI;
use CGI;
use CGI qw/:standard Vars/;
-use ASTPP;
+use ASTPP ':all';
use XML::Simple;
use Data::Dumper;
use URI::Escape;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-05 06:13:08
|
Revision: 2327
http://astpp.svn.sourceforge.net/astpp/?rev=2327&view=rev
Author: darrenkw
Date: 2011-01-05 06:13:02 +0000 (Wed, 05 Jan 2011)
Log Message:
-----------
Added requirement for XML::LibXML
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-01-05 06:12:12 UTC (rev 2326)
+++ trunk/Makefile 2011-01-05 06:13:02 UTC (rev 2327)
@@ -96,6 +96,10 @@
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
+ for x in sounds/*.gsm; do \
+ echo $$x;\
+ install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
+ done
for x in sounds/WAV/*.WAV; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
@@ -147,6 +151,7 @@
perl -MCPAN -e "install DateTime";
perl -MCPAN -e "install Locale::gettext_pp";
perl -MCPAN -e "install XML::Simple";
+ perl -MCPAN -e "install XML::LibXML";
cd modules/ASTPP && perl Makefile.PL && make && make install && cd ../../
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2011-01-05 06:12:20
|
Revision: 2326
http://astpp.svn.sourceforge.net/astpp/?rev=2326&view=rev
Author: darrenkw
Date: 2011-01-05 06:12:12 +0000 (Wed, 05 Jan 2011)
Log Message:
-----------
Replaced XML::Simple
Modified Paths:
--------------
trunk/freeswitch/astpp-callingcards.pl
trunk/freeswitch/astpp-fs-cdr-xml.pl
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2010-12-31 02:39:20 UTC (rev 2325)
+++ trunk/freeswitch/astpp-callingcards.pl 2011-01-05 06:12:12 UTC (rev 2326)
@@ -431,11 +431,12 @@
if ( $cc == 1 ) {
$session->execute( "export", "accountcode=CC:$cardinfo->{number}" );
$session->execute( "export", "callingcard=$cardinfo->{number}" );
+ $session->execute( "export", "calldestination=$destination" );
}
else {
- $session->execute( "export",
- "accountcode=CC:$cardinfo->{cardnumber}" );
+ $session->execute( "export", "accountcode=CC:$cardinfo->{cardnumber}" );
$session->execute( "export", "callingcard=$cardinfo->{cardnumber}" );
+ $session->execute( "export", "calldestination=$destination" );
}
$session->execute( "bridge", "$data_string" );
return 1;
Modified: trunk/freeswitch/astpp-fs-cdr-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-cdr-xml.pl 2010-12-31 02:39:20 UTC (rev 2325)
+++ trunk/freeswitch/astpp-fs-cdr-xml.pl 2011-01-05 06:12:12 UTC (rev 2326)
@@ -19,9 +19,12 @@
use ASTPP;
use URI::Escape;
use strict;
-use XML::Simple;
+#use XML::Simple;
use Data::Dumper;
+#use XML::Twig;
+use XML::LibXML;
+
use vars
qw($cdr_db $params $ASTPP @output $config $freeswitch_db $astpp_db $verbosity );
use Locale::gettext_pp qw(:locale_h);
@@ -53,122 +56,172 @@
foreach my $param ( param() ) {
$params->{$param} = param($param);
}
+my $cdrinfo;
-#print STDERR $params->{cdr};
+print STDERR $params->{cdr};
-# create object
-my $xml = new XML::Simple;
+my $parser = XML::LibXML->new();
+my $cdr = $parser->parse_string($params->{cdr});
-# read XML file
-my $data = $xml->XMLin($params->{cdr});
+foreach my $var ($cdr->findnodes('/cdr/channel_data/direction')) {
+ $cdrinfo->{direction} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/callingcard')) {
+ $cdrinfo->{callingcard} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/callingcard_destination')) {
+ $cdrinfo->{callingcard_destination} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/accountcode')) {
+ $cdrinfo->{accountcode} = uri_unescape($var->to_literal);
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/caller_id')) {
+ $cdrinfo->{caller_id} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/channel_name')) {
+ $cdrinfo->{channel_name} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/last_app')) {
+ $cdrinfo->{last_app} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/last_arg')) {
+ $cdrinfo->{last_arg} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/start_stamp')) {
+ $cdrinfo->{start_stamp} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/answer_stamp')) {
+ $cdrinfo->{answer_stamp} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/end_stamp')) {
+ $cdrinfo->{end_stamp} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/duration')) {
+ $cdrinfo->{duration} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/billsec')) {
+ $cdrinfo->{billsec} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/hangup_cause')) {
+ $cdrinfo->{hangup_cause} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/read_code')) {
+ $cdrinfo->{read_code} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/write_code')) {
+ $cdrinfo->{write_code} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/provider')) {
+ $cdrinfo->{provider} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/trunk')) {
+ $cdrinfo->{trunk} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/outbound_route')) {
+ $cdrinfo->{outbound_route} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/progressmsec')) {
+ $cdrinfo->{progressmess} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/answermsec')) {
+ $cdrinfo->{answermsec} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/variables/progress_mediamsec')) {
+ $cdrinfo->{progress_mediamsec} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/callflow/caller_profile/username')) {
+ $cdrinfo->{username} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/callflow/caller_profile/destination_number')) {
+ $cdrinfo->{destination_number} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/callflow/caller_profile/context')) {
+ $cdrinfo->{context} = $var->to_literal;
+}
+foreach my $var ($cdr->findnodes('/cdr/callflow/caller_profile/uuid')) {
+ $cdrinfo->{uuid} = $var->to_literal;
+}
+if ($cdrinfo->{callingcard_destination} && $cdrinfo->{direction} eq "outbound") {
+ $cdrinfo->{destination_number} = $cdrinfo->{callingcard_destination};
+}
-# print output
-print STDERR Dumper($data);
+print STDERR Dumper $cdrinfo;
-
my $tmp = "INSERT INTO " . $config->{freeswitch_cdr_table} . "(accountcode,src,dst,dcontext,clid,channel,dstchannel,lastapp,"
. "lastdata,calldate,answerdate,enddate,duration,billsec,disposition,amaflags,uniqueid,userfield,read_codec,"
. "write_codec,cost,vendor,provider,trunk,outbound_route,progressmsec,answermsec,progress_mediamsec) VALUES ("
- . "'"
- . $data->{variables}->{accountcode}
- . "'"
+ . "'" . $cdrinfo->{accountcode} . "'"
+ . ","
+ . "'" . $cdrinfo->{username} . "'"
. ","
- . "'"
- . $data->{callflow}->{caller_profile}->{username}
- . "'"
+ . "'" . $cdrinfo->{destination_number} . "'"
. ","
-# . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{destination_number})
- . "'"
- . $data->{callflow}->{caller_profile}->{destination_number}
- . "'"
+ . "'" . $cdrinfo->{context} . "'"
. ","
-# . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{context})
- . "'"
- . $data->{callflow}->{caller_profile}->{context}
- . "'"
+ . "'" . uri_unescape($cdrinfo->{caller_id}) . "'"
. ","
- . "'"
- . uri_unescape($data->{variables}->{caller_id})
- . "'"
-# . "\"" . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{caller_id_name}) . "\""
-# . "<" . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{caller_id_number}) . ">"
-# . "\"" . $data->{callflow}->{caller_profile}->{caller_id_name} . "\""
-# . "<" . $data->{callflow}->{caller_profile}->{caller_id_number} . ">"
+ . "'" . uri_unescape($cdrinfo->{channel_name}) . "'"
. ","
- . "'"
- . uri_unescape($data->{variables}->{channel_name})
- . "'"
- . ","
. "''"
. ","
- . "'" . $data->{variables}->{last_app} . "'"
+ . "'" . $cdrinfo->{last_app} . "'"
. ","
- . "'" . uri_unescape($data->{variables}->{last_arg}) . "'"
+ . "'" . uri_unescape($cdrinfo->{last_arg}) . "'"
. ","
- . "'"
- . uri_unescape($data->{variables}->{start_stamp})
- . "'"
+ . "'" . uri_unescape($cdrinfo->{start_stamp}) . "'"
. ","
- . "'" . uri_unescape($data->{variables}->{answer_stamp}) . "'"
+ . "'" . uri_unescape($cdrinfo->{answer_stamp}) . "'"
. ","
- . "'"
- . uri_unescape($data->{variables}->{end_stamp})
- . "'"
+ . "'" . uri_unescape($cdrinfo->{end_stamp}) . "'"
. ","
- . "'"
- . $data->{variables}->{duration}
- . "'"
+ . "'" . $cdrinfo->{duration} . "'"
. ","
- . "'"
- . $data->{variables}->{billsec}
- . "'"
+ . "'" . $cdrinfo->{billsec} . "'"
. ","
- . "'"
- . $data->{variables}->{hangup_cause}
- . "'"
+ . "'" . $cdrinfo->{hangup_cause} . "'"
. ","
. "''"
. ","
- . "'"
- . $data->{callflow}->{caller_profile}->{uuid}
- . "'"
+ . "'" . $cdrinfo->{uuid} . "'"
. ","
. "''"
. ","
- . "'" . $data->{variables}->{read_code} . "'"
+ . "'" . $cdrinfo->{read_code} . "'"
. ","
- . "'" . $data->{variables}->{write_code} . "'"
+ . "'" . $cdrinfo->{write_code} . "'"
. ",'none','none'"
. ","
- . "'" . $data->{variables}->{provider} . "'"
+ . "'" . $cdrinfo->{provider} . "'"
. ","
- . "'" . $data->{variables}->{trunk} . "'"
+ . "'" . $cdrinfo->{trunk} . "'"
. ","
- . "'" . $data->{variables}->{outbound_route} . "'"
+ . "'" . $cdrinfo->{outbound_route} . "'"
. ","
- . "'" . $data->{variables}->{progressmsec} . "'"
+ . "'" . $cdrinfo->{progressmsec} . "'"
. ","
- . "'" . $data->{variables}->{answermsec} . "'"
+ . "'" . $cdrinfo->{answermsec} . "'"
. ","
- . "'" . $data->{variables}->{progress_mediamsec} . "'"
+ . "'" . $cdrinfo->{progress_mediamsec} . "'"
. ")";
print STDERR "\n" . $tmp . "\n";
$cdr_db->do($tmp);
-print "Wrote CDR";
+print "Wrote CDR\n";
my (@chargelist);
-push @chargelist, $data->{callflow}->{caller_profile}->{uuid};
+push @chargelist, $cdrinfo->{uuid};
&processlist( $astpp_db, $cdr_db, $config, \@chargelist );
print STDERR "VENDOR CHARGES: " . $config->{trackvendorcharges} . "\n";
-&vendor_process_rating_fs( $astpp_db, $cdr_db, $config, "none", $data->{callflow}->{caller_profile}->{uuid},"" ) if $config->{trackvendorcharges} == 1;
+&vendor_process_rating_fs( $astpp_db, $cdr_db, $config, "none", $cdrinfo->{uuid},"" ) if $config->{trackvendorcharges} == 1;
-&process_callingcard_cdr if $data->{variables}->{callingcard};
+if ($cdrinfo->{callingcard_destination} && $cdrinfo->{direction} eq "outbound") {
+ &process_callingcard_cdr;
+}
sub process_callingcard_cdr() {
my ( $cardinfo, $brandinfo, $numberinfo, $pricelistinfo,$cc );
- my $destination = $data->{callflow}->{caller_profile}->{destination_number};
+ my $destination = $cdrinfo->{destination_number};
$destination =~ s/@.*//g;
- my $cardnumber = $data->{variables}->{callingcard};
+ my $cardnumber = $cdrinfo->{callingcard};
$cardinfo = &get_callingcard( $astpp_db, $cardnumber, $config );
if ( !$cardinfo ) {
$cardinfo = &get_account_cc( $astpp_db, $cardnumber );
@@ -192,7 +245,7 @@
$destination,
$brandinfo->{pricelist}, $cardinfo
);
- if ( $data->{variables}->{billsec} > 0 )
+ if ( $cdrinfo->{billsec} > 0 )
{
$ASTPP->debug(
debug => "CALL ANSWERED",
@@ -207,13 +260,13 @@
}
$ASTPP->debug(
debug =>
-"$numberinfo->{connectcost}, $numberinfo->{cost}, $data->{variables}->{billsec}, $increment, $numberinfo->{includedseconds}",
+"$numberinfo->{connectcost}, $numberinfo->{cost}, $cdrinfo->{billsec}, $increment, $numberinfo->{includedseconds}",
verbosity => $verbosity
);
my $charge = &calc_call_cost(
$numberinfo->{connectcost},
$numberinfo->{cost},
- $data->{variables}->{billsec},
+ $cdrinfo->{billsec},
$increment,
$numberinfo->{includedseconds}
);
@@ -226,12 +279,12 @@
( ( $cardinfo->{minute_fee_pennies} * 100 ) +
$charge )
if $cardinfo->{timeused} +
- $data->{variables}->{billsec} =>
+ $cdrinfo->{billsec} =>
$cardinfo->{minute_fee_minutes};
}
if ( $cardinfo->{min_length_pennies} > 0
&& ( $cardinfo->{min_length_minutes} * 60 ) >
- $data->{variables}->{billsec} )
+ $cdrinfo->{billsec} )
{
$charge =
( ( $cardinfo->{min_length_pennies} * 100 ) +
@@ -242,12 +295,12 @@
$astpp_db,
$config,
$cardinfo,
- uri_unescape($data->{variables}->{caller_id}),
+ uri_unescape($cdrinfo->{caller_id}),
$destination,
- uri_unescape($data->{variables}->{hangup_cause}),
- uri_unescape($data->{variables}->{start_stamp}),
+ uri_unescape($cdrinfo->{hangup_cause}),
+ uri_unescape($cdrinfo->{start_stamp}),
$charge,
- $data->{variables}->{billsec}
+ $cdrinfo->{billsec}
);
&callingcard_set_in_use($astpp_db,$cardinfo,0);
&callingcard_update_balance($astpp_db,$cardinfo,$charge);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-12-31 02:39:27
|
Revision: 2325
http://astpp.svn.sourceforge.net/astpp/?rev=2325&view=rev
Author: darrenkw
Date: 2010-12-31 02:39:20 +0000 (Fri, 31 Dec 2010)
Log Message:
-----------
The code to return a correct rate was returing routes that had been disabled. This is incorrect and has been fixed.
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2010-12-31 02:09:29 UTC (rev 2324)
+++ trunk/scripts/astpp-common.pl 2010-12-31 02:39:20 UTC (rev 2325)
@@ -1775,7 +1775,7 @@
my ($tmp,$sql,$record);
$tmp = "SELECT * FROM routes WHERE "
. $astpp_db->quote($destination)
- . " RLIKE pattern AND pricelist = "
+ . " RLIKE pattern AND status = 1 AND pricelist = "
. $astpp_db->quote($pricelist)
. " ORDER BY LENGTH(pattern) DESC LIMIT 1";
print STDERR "$tmp\n" if $config->{debug} == 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-12-31 02:09:35
|
Revision: 2324
http://astpp.svn.sourceforge.net/astpp/?rev=2324&view=rev
Author: darrenkw
Date: 2010-12-31 02:09:29 +0000 (Fri, 31 Dec 2010)
Log Message:
-----------
Correct a couple of samples, fix spacing in ASTPP.pm, add perl modules to makefile.
Modified Paths:
--------------
trunk/Makefile
trunk/freeswitch/contrib/darren/conf/autoload_configs/acl.conf.xml
trunk/freeswitch/contrib/darren/conf/dialplan/default.xml
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-12-30 02:47:26 UTC (rev 2323)
+++ trunk/Makefile 2010-12-31 02:09:29 UTC (rev 2324)
@@ -127,6 +127,7 @@
perl -MCPAN -e "install DBI";
perl -MCPAN -e "install DBD::mysql";
# perl -MCPAN -e "install DBD::Pg";
+ perl -MCPAN -e "install Params::Validate";
perl -MCPAN -e "install CGI";
perl -MCPAN -e "install Asterisk::AGI";
perl -MCPAN -e "install LWP::Simple";
@@ -140,7 +141,9 @@
perl -MCPAN -e "install Data::Paginate";
perl -MCPAN -e "install HTML::Template";
perl -MCPAN -e "install HTML::Template::Expr";
+ perl -MCPAN -e "install DateTime";
perl -MCPAN -e "install DateTime::TimeZone";
+ perl -MCPAN -e "install DateTime::Locale";
perl -MCPAN -e "install DateTime";
perl -MCPAN -e "install Locale::gettext_pp";
perl -MCPAN -e "install XML::Simple";
Modified: trunk/freeswitch/contrib/darren/conf/autoload_configs/acl.conf.xml
===================================================================
--- trunk/freeswitch/contrib/darren/conf/autoload_configs/acl.conf.xml 2010-12-30 02:47:26 UTC (rev 2323)
+++ trunk/freeswitch/contrib/darren/conf/autoload_configs/acl.conf.xml 2010-12-31 02:09:29 UTC (rev 2324)
@@ -1,29 +1,20 @@
<configuration name="acl.conf" description="Network Lists">
<network-lists>
- <list name="dl-candidates" default="allow">
- <node type="deny" cidr="10.0.0.0/8"/>
- <node type="deny" cidr="172.16.0.0/12"/>
- <node type="deny" cidr="192.168.0.0/16"/>
- </list>
- <list name="rfc1918" default="deny">
- <node type="allow" cidr="10.0.0.0/8"/>
- <node type="allow" cidr="172.16.0.0/12"/>
- <node type="allow" cidr="192.168.0.0/16"/>
- </list>
+ <!--
+ These ACL's are automatically created on startup.
- <list name="lan" default="allow">
- <node type="deny" cidr="192.168.42.0/24"/>
- <node type="allow" cidr="192.168.42.42/32"/>
- </list>
+ rfc1918.auto - RFC1918 Space
+ nat.auto - RFC1918 Excluding your local lan.
+ localnet.auto - ACL for your local lan.
+ loopback.auto - ACL for your local lan.
+ -->
- <list name="strict" default="deny">
- <node type="allow" cidr="208.102.123.124/32"/>
+ <list name="domains" default="allow">
+ <node type="deny" cidr="1.2.3.0/24"/>
</list>
- <list name="domains" default="deny">
- <node type="allow" domain="$${domain}"/>
- </list>
</network-lists>
</configuration>
+
Modified: trunk/freeswitch/contrib/darren/conf/dialplan/default.xml
===================================================================
--- trunk/freeswitch/contrib/darren/conf/dialplan/default.xml 2010-12-30 02:47:26 UTC (rev 2323)
+++ trunk/freeswitch/contrib/darren/conf/dialplan/default.xml 2010-12-31 02:09:29 UTC (rev 2324)
@@ -257,7 +257,7 @@
</extension>
<extension name="astpp_callingcards">
- <condition field="destination_number" expression="^9912345$">
+ <condition field="destination_number" expression="^14357297148$">
<action application="answer"/>
<action application="eval" data="Here we go!"/>
<!-- <action application="lua" data="astpp_callingcards.lua"/> -->
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-12-30 02:47:26 UTC (rev 2323)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-12-31 02:09:29 UTC (rev 2324)
@@ -354,8 +354,12 @@
if ($diddata->{extensions} =~ m/^("|)(L|l)ocal.*/m) {
my ($junk,$ext,$context) = split /,(?!(?:[^",]|[^"],[^"])+")/, $diddata->{extensions};
#jump to local dialplan
-$ext =~ s/"//mg;
-$context =~ s/"//mg;
+ print STDERR "EXT: $ext\n" if $arg{debug} == 1;
+ $ext =~ s/"//mg;
+ print STDERR "EXT: $ext \n" if $arg{debug} == 1;
+ print STDERR "CONTEXT: $context\n" if $arg{debug} == 1;
+ $context =~ s/"//mg;
+ print STDERR "CONTEXT: $context \n" if $arg{debug} == 1;
$xml .= "<action application=\"transfer\" data=\"" . $ext ." XML " .$context . "\"/>\n";
} else {
$xml .= "<action application=\"bridge\" data=\"" . $diddata->{extensions} . "\"/>\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-12-30 02:47:33
|
Revision: 2323
http://astpp.svn.sourceforge.net/astpp/?rev=2323&view=rev
Author: darrenkw
Date: 2010-12-30 02:47:26 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
Renamed files to .WAV
Added Paths:
-----------
trunk/sounds/WAV/astcc-badphone.WAV
trunk/sounds/WAV/astpp-accountnum.WAV
trunk/sounds/WAV/astpp-badaccount.WAV
trunk/sounds/WAV/astpp-badphone.WAV
trunk/sounds/WAV/astpp-busy-tryagain.WAV
trunk/sounds/WAV/astpp-call-completed.WAV
trunk/sounds/WAV/astpp-callingcard-menu.WAV
trunk/sounds/WAV/astpp-card-has-expired.WAV
trunk/sounds/WAV/astpp-card-is-empty.WAV
trunk/sounds/WAV/astpp-card-to-empty.WAV
trunk/sounds/WAV/astpp-card-to-refill.WAV
trunk/sounds/WAV/astpp-cent.WAV
trunk/sounds/WAV/astpp-cents.WAV
trunk/sounds/WAV/astpp-congested-tryagain.WAV
trunk/sounds/WAV/astpp-connectcharge.WAV
trunk/sounds/WAV/astpp-dollar.WAV
trunk/sounds/WAV/astpp-dollars.WAV
trunk/sounds/WAV/astpp-down.WAV
trunk/sounds/WAV/astpp-in-use.WAV
trunk/sounds/WAV/astpp-invalidpin.WAV
trunk/sounds/WAV/astpp-menu.WAV
trunk/sounds/WAV/astpp-minute.WAV
trunk/sounds/WAV/astpp-noanswer-tryagain.WAV
trunk/sounds/WAV/astpp-not-enough-credit.WAV
trunk/sounds/WAV/astpp-not-enough-money.WAV
trunk/sounds/WAV/astpp-per.WAV
trunk/sounds/WAV/astpp-phonenum.WAV
trunk/sounds/WAV/astpp-please-wait-while-i-connect.WAV
trunk/sounds/WAV/astpp-pleasepin.WAV
trunk/sounds/WAV/astpp-second.WAV
trunk/sounds/WAV/astpp-seconds.WAV
trunk/sounds/WAV/astpp-this-call-will-last.WAV
trunk/sounds/WAV/astpp-this-card-has-a-balance-of.WAV
trunk/sounds/WAV/astpp-willapply.WAV
trunk/sounds/WAV/astpp-willcost.WAV
trunk/sounds/WAV/cent.WAV
trunk/sounds/WAV/is-suspended.WAV
trunk/sounds/WAV/of-local-credit.WAV
trunk/sounds/WAV/of-longdistance.WAV
trunk/sounds/WAV/per.WAV
trunk/sounds/WAV/please-wait-while-i-connect.WAV
trunk/sounds/WAV/press_one_if_you_wish.WAV
trunk/sounds/WAV/this-call-will-last.WAV
trunk/sounds/WAV/this-card-has-a-balance-of.WAV
Removed Paths:
-------------
trunk/sounds/WAV/astcc-badphone.wav
trunk/sounds/WAV/astpp-accountnum.wav
trunk/sounds/WAV/astpp-badaccount.wav
trunk/sounds/WAV/astpp-badphone.wav
trunk/sounds/WAV/astpp-busy-tryagain.wav
trunk/sounds/WAV/astpp-call-completed.wav
trunk/sounds/WAV/astpp-callingcard-menu.wav
trunk/sounds/WAV/astpp-card-has-expired.wav
trunk/sounds/WAV/astpp-card-is-empty.wav
trunk/sounds/WAV/astpp-card-to-empty.wav
trunk/sounds/WAV/astpp-card-to-refill.wav
trunk/sounds/WAV/astpp-cent.wav
trunk/sounds/WAV/astpp-cents.wav
trunk/sounds/WAV/astpp-congested-tryagain.wav
trunk/sounds/WAV/astpp-connectcharge.wav
trunk/sounds/WAV/astpp-dollar.wav
trunk/sounds/WAV/astpp-dollars.wav
trunk/sounds/WAV/astpp-down.wav
trunk/sounds/WAV/astpp-in-use.wav
trunk/sounds/WAV/astpp-invalidpin.wav
trunk/sounds/WAV/astpp-menu.wav
trunk/sounds/WAV/astpp-minute.wav
trunk/sounds/WAV/astpp-noanswer-tryagain.wav
trunk/sounds/WAV/astpp-not-enough-credit.wav
trunk/sounds/WAV/astpp-not-enough-money.wav
trunk/sounds/WAV/astpp-per.wav
trunk/sounds/WAV/astpp-phonenum.wav
trunk/sounds/WAV/astpp-please-wait-while-i-connect.wav
trunk/sounds/WAV/astpp-pleasepin.wav
trunk/sounds/WAV/astpp-second.wav
trunk/sounds/WAV/astpp-seconds.wav
trunk/sounds/WAV/astpp-this-call-will-last.wav
trunk/sounds/WAV/astpp-this-card-has-a-balance-of.wav
trunk/sounds/WAV/astpp-willapply.wav
trunk/sounds/WAV/astpp-willcost.wav
trunk/sounds/WAV/cent.wav
trunk/sounds/WAV/is-suspended.wav
trunk/sounds/WAV/of-local-credit.wav
trunk/sounds/WAV/of-longdistance-credit.wav
trunk/sounds/WAV/per.wav
trunk/sounds/WAV/please-wait-while-i-connect.wav
trunk/sounds/WAV/press_one_if_you_wish.wav
trunk/sounds/WAV/this-call-will-last.wav
trunk/sounds/WAV/this-card-has-a-balance-of.wav
Copied: trunk/sounds/WAV/astcc-badphone.WAV (from rev 2322, trunk/sounds/WAV/astcc-badphone.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astcc-badphone.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-accountnum.WAV (from rev 2322, trunk/sounds/WAV/astpp-accountnum.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-accountnum.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-badaccount.WAV (from rev 2322, trunk/sounds/WAV/astpp-badaccount.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-badaccount.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-badphone.WAV (from rev 2322, trunk/sounds/WAV/astpp-badphone.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-badphone.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-busy-tryagain.WAV (from rev 2322, trunk/sounds/WAV/astpp-busy-tryagain.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-busy-tryagain.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-call-completed.WAV (from rev 2322, trunk/sounds/WAV/astpp-call-completed.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-call-completed.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-callingcard-menu.WAV (from rev 2322, trunk/sounds/WAV/astpp-callingcard-menu.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-callingcard-menu.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-card-has-expired.WAV (from rev 2322, trunk/sounds/WAV/astpp-card-has-expired.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-card-has-expired.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-card-is-empty.WAV (from rev 2322, trunk/sounds/WAV/astpp-card-is-empty.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-card-is-empty.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-card-to-empty.WAV (from rev 2322, trunk/sounds/WAV/astpp-card-to-empty.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-card-to-empty.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-card-to-refill.WAV (from rev 2322, trunk/sounds/WAV/astpp-card-to-refill.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-card-to-refill.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-cent.WAV (from rev 2322, trunk/sounds/WAV/astpp-cent.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-cent.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-cents.WAV (from rev 2322, trunk/sounds/WAV/astpp-cents.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-cents.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-congested-tryagain.WAV (from rev 2322, trunk/sounds/WAV/astpp-congested-tryagain.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-congested-tryagain.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-connectcharge.WAV (from rev 2322, trunk/sounds/WAV/astpp-connectcharge.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-connectcharge.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-dollar.WAV (from rev 2322, trunk/sounds/WAV/astpp-dollar.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-dollar.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-dollars.WAV (from rev 2322, trunk/sounds/WAV/astpp-dollars.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-dollars.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-down.WAV (from rev 2322, trunk/sounds/WAV/astpp-down.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-down.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-in-use.WAV (from rev 2322, trunk/sounds/WAV/astpp-in-use.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-in-use.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-invalidpin.WAV (from rev 2322, trunk/sounds/WAV/astpp-invalidpin.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-invalidpin.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-menu.WAV (from rev 2322, trunk/sounds/WAV/astpp-menu.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-menu.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-minute.WAV (from rev 2322, trunk/sounds/WAV/astpp-minute.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-minute.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-noanswer-tryagain.WAV (from rev 2322, trunk/sounds/WAV/astpp-noanswer-tryagain.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-noanswer-tryagain.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-not-enough-credit.WAV (from rev 2322, trunk/sounds/WAV/astpp-not-enough-credit.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-not-enough-credit.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-not-enough-money.WAV (from rev 2322, trunk/sounds/WAV/astpp-not-enough-money.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-not-enough-money.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-per.WAV (from rev 2322, trunk/sounds/WAV/astpp-per.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-per.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-phonenum.WAV (from rev 2322, trunk/sounds/WAV/astpp-phonenum.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-phonenum.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-please-wait-while-i-connect.WAV (from rev 2322, trunk/sounds/WAV/astpp-please-wait-while-i-connect.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-please-wait-while-i-connect.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-pleasepin.WAV (from rev 2322, trunk/sounds/WAV/astpp-pleasepin.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-pleasepin.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-second.WAV (from rev 2322, trunk/sounds/WAV/astpp-second.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-second.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-seconds.WAV (from rev 2322, trunk/sounds/WAV/astpp-seconds.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-seconds.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-this-call-will-last.WAV (from rev 2322, trunk/sounds/WAV/astpp-this-call-will-last.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-this-call-will-last.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-this-card-has-a-balance-of.WAV (from rev 2322, trunk/sounds/WAV/astpp-this-card-has-a-balance-of.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-this-card-has-a-balance-of.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-willapply.WAV (from rev 2322, trunk/sounds/WAV/astpp-willapply.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-willapply.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/astpp-willcost.WAV (from rev 2322, trunk/sounds/WAV/astpp-willcost.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/astpp-willcost.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/cent.WAV (from rev 2322, trunk/sounds/WAV/cent.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/cent.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/is-suspended.WAV (from rev 2322, trunk/sounds/WAV/is-suspended.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/is-suspended.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/of-local-credit.WAV (from rev 2322, trunk/sounds/WAV/of-local-credit.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/of-local-credit.wav
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/of-longdistance-credit.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/of-longdistance.WAV (from rev 2322, trunk/sounds/WAV/of-longdistance-credit.wav)
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/per.WAV (from rev 2322, trunk/sounds/WAV/per.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/per.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/please-wait-while-i-connect.WAV (from rev 2322, trunk/sounds/WAV/please-wait-while-i-connect.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/please-wait-while-i-connect.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/press_one_if_you_wish.WAV (from rev 2322, trunk/sounds/WAV/press_one_if_you_wish.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/press_one_if_you_wish.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/this-call-will-last.WAV (from rev 2322, trunk/sounds/WAV/this-call-will-last.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/this-call-will-last.wav
===================================================================
(Binary files differ)
Copied: trunk/sounds/WAV/this-card-has-a-balance-of.WAV (from rev 2322, trunk/sounds/WAV/this-card-has-a-balance-of.wav)
===================================================================
(Binary files differ)
Deleted: trunk/sounds/WAV/this-card-has-a-balance-of.wav
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-12-30 02:25:16
|
Revision: 2322
http://astpp.svn.sourceforge.net/astpp/?rev=2322&view=rev
Author: darrenkw
Date: 2010-12-30 02:25:10 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
moved sound files.
Added Paths:
-----------
trunk/sounds/WAV/
Removed Paths:
-------------
trunk/sounds/wav/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-12-30 02:23:05
|
Revision: 2321
http://astpp.svn.sourceforge.net/astpp/?rev=2321&view=rev
Author: darrenkw
Date: 2010-12-30 02:22:59 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
Fixed a link to old sounds location.
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-10-14 02:08:31 UTC (rev 2320)
+++ trunk/Makefile 2010-12-30 02:22:59 UTC (rev 2321)
@@ -92,11 +92,11 @@
done
install_sounds_freeswitch:
- for x in sounds/gsm/*.gsm; do \
+ for x in sounds/GSM/*.GSM; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
- for x in sounds/wav/*.wav; do \
+ for x in sounds/WAV/*.WAV; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-10-14 02:08:37
|
Revision: 2320
http://astpp.svn.sourceforge.net/astpp/?rev=2320&view=rev
Author: darrenkw
Date: 2010-10-14 02:08:31 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
get_charges sql code was incorrect. It was returning count rather than the list.
Modified Paths:
--------------
trunk/scripts/astpp-common.pl
Modified: trunk/scripts/astpp-common.pl
===================================================================
--- trunk/scripts/astpp-common.pl 2010-09-29 03:40:36 UTC (rev 2319)
+++ trunk/scripts/astpp-common.pl 2010-10-14 02:08:31 UTC (rev 2320)
@@ -5006,7 +5006,7 @@
my ( $tmp,$sql, @chargelist, $record );
if ($params->{startdate} && $params->{enddate}) {
$tmp =
- "SELECT COUNT(*) FROM cdrs WHERE cardnum = "
+ "SELECT * FROM cdrs WHERE cardnum = "
. $astpp_db->quote($account)
. " AND status = 0"
. " AND callstart >= DATE(" . $astpp_db->quote($params->{startdate}) . ")"
@@ -5014,21 +5014,21 @@
. " ORDER BY callstart";
} elsif ($params->{startdate}) {
$tmp =
- "SELECT COUNT(*) FROM cdrs WHERE cardnum = "
+ "SELECT * FROM cdrs WHERE cardnum = "
. $astpp_db->quote($account)
. " AND status = 0"
. " AND callstart >= DATE(" . $astpp_db->quote($params->{startdate}) . ")"
. " ORDER BY callstart";
} elsif ($params->{enddate}) {
$tmp =
- "SELECT COUNT(*) FROM cdrs WHERE cardnum = "
+ "SELECT * FROM cdrs WHERE cardnum = "
. $astpp_db->quote($account)
. " AND status = 0"
. " AND callstart <= DATE(" . $astpp_db->quote($params->{enddate}) . ")"
. " ORDER BY callstart";
} else {
$tmp =
- "SELECT COUNT(*) FROM cdrs WHERE cardnum = "
+ "SELECT * FROM cdrs WHERE cardnum = "
. $astpp_db->quote($account)
. " AND status = 0"
. " ORDER BY callstart";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-29 03:40:42
|
Revision: 2319
http://astpp.svn.sourceforge.net/astpp/?rev=2319&view=rev
Author: darrenkw
Date: 2010-09-29 03:40:36 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
Corrected code for incoming DIDs. Transfer will work better than execute.
Modified Paths:
--------------
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-13 23:25:06 UTC (rev 2318)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-29 03:40:36 UTC (rev 2319)
@@ -356,7 +356,7 @@
#jump to local dialplan
$ext =~ s/"//mg;
$context =~ s/"//mg;
- $xml .= "<action application=\"execute_extension\" data=\"" . $ext ." XML " .$context . "\"/>\n";
+ $xml .= "<action application=\"transfer\" data=\"" . $ext ." XML " .$context . "\"/>\n";
} else {
$xml .= "<action application=\"bridge\" data=\"" . $diddata->{extensions} . "\"/>\n";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-13 23:25:13
|
Revision: 2318
http://astpp.svn.sourceforge.net/astpp/?rev=2318&view=rev
Author: darrenkw
Date: 2010-09-13 23:25:06 +0000 (Mon, 13 Sep 2010)
Log Message:
-----------
Added support to view callingcard cdrs from the interface.
Modified Paths:
--------------
trunk/web_interface/astpp-admin.cgi
Added Paths:
-----------
trunk/templates/callingcards-cdrs.tpl
Added: trunk/templates/callingcards-cdrs.tpl
===================================================================
--- trunk/templates/callingcards-cdrs.tpl (rev 0)
+++ trunk/templates/callingcards-cdrs.tpl 2010-09-13 23:25:06 UTC (rev 2318)
@@ -0,0 +1,43 @@
+<table class="viewcdrs">
+ <tr>
+ <td colspan=7><form method="post" action="/cgi-bin/astpp-admin/astpp-admin.cgi?mode=List%20Errors" enctype="multipart/form-data"></td>
+ </tr>
+ <tr class="header">
+ <td>Card Number</td>
+ <td>UniqueID</td>
+ <td>Date</td>
+ <td>CallerID</td>
+ <td>Dest</td>
+ <td>BillSec</td>
+ <td>Disposition</td>
+ <td>Debit</td>
+ <td>Credit</td>
+ <td>Notes</td>
+ <td>Pricelist</td>
+ <td>Pattern</td>
+ </tr>
+ <TMPL_LOOP NAME="cdrlist">
+ <tr class="<TMPL_VAR NAME="class">">
+ <td><TMPL_VAR NAME="cardnumber"></td>
+ <td><TMPL_VAR NAME="uniqueid"></td>
+ <td><TMPL_VAR NAME="callstart"></td>
+ <td><TMPL_VAR NAME="clid"></td>
+ <td><TMPL_VAR NAME="destination"></td>
+ <td><TMPL_VAR NAME="seconds"></td>
+ <td><TMPL_VAR NAME="disposition"></td>
+ <td><TMPL_VAR NAME="debit"></td>
+ <td><TMPL_VAR NAME="credit"></td>
+ <td><TMPL_VAR NAME="notes"></td>
+ <td><TMPL_VAR NAME="pricelist"></td>
+ <td><TMPL_VAR NAME="pattern"></td>
+ </tr>
+ </TMPL_LOOP>
+</table>
+
+<table>
+ <tr>
+ <td><TMPL_VAR NAME="pagination"></td>
+ <td><TMPL_VAR NAME="status"></td>
+ </tr>
+ </table>
+</form>
Modified: trunk/web_interface/astpp-admin.cgi
===================================================================
--- trunk/web_interface/astpp-admin.cgi 2010-09-13 04:14:22 UTC (rev 2317)
+++ trunk/web_interface/astpp-admin.cgi 2010-09-13 23:25:06 UTC (rev 2318)
@@ -99,7 +99,8 @@
gettext("List Cards"), gettext("Add Cards"),
gettext("Delete Card"), gettext("Refill Card"),
gettext("View Card"), gettext("Update Card(s) Status"),
- gettext("Reset InUse"), gettext("CC Brands")
+ gettext("Reset InUse"), gettext("CC Brands"),
+ gettext("Callingcard CDRs")
);
my @SwitchConfig = ();
my @CallShops = ( gettext("Create CallShop"), gettext("Remove CallShop") );
@@ -445,6 +446,8 @@
return &build_view_card() if $params->{mode} eq gettext("View Card");
return &build_cc_brands()
if $params->{mode} eq gettext("CC Brands");
+ return &build_callingcard_cdrs()
+ if $params->{mode} eq gettext("Callingcard CDRs");
return &build_delete_cards()
if $params->{mode} eq gettext("Delete Card");
return &build_refill_card()
@@ -464,6 +467,8 @@
return &build_periodic_charges()
if $params->{mode} eq gettext("Periodic Charges");
return &build_view_cdrs() if $params->{mode} eq gettext("View CDRs");
+ return &build_view_cdrs_asterisk() if $params->{mode} eq gettext("View Asterisk(TM) CDRs");
+ return &build_view_cdrs_freeswitch() if $params->{mode} eq gettext("View FreeSwitch(TM) CDRs");
return &build_configuration()
if $params->{mode} eq gettext("Configuration");
return &build_view_invoice()
@@ -488,6 +493,8 @@
if $params->{mode} eq gettext("Trunk Statistics");
return &logout() if $params->{mode} eq gettext("Logout");
return &build_view_cdrs() if $params->{mode} eq gettext("View CDRs");
+ return &build_view_cdrs_asterisk() if $params->{mode} eq gettext("View Asterisk CDRs");
+ return &build_view_cdrs_freeswitch() if $params->{mode} eq gettext("View FreeSwitch CDRs");
return &build_outbound_routes()
if $params->{mode} eq gettext("Outbound Routes");
$params->{mode} = gettext("Home");
@@ -1356,6 +1363,15 @@
}
#################### Stats stuff ###########################
+sub build_view_cdrs_asterisk() {
+ return &build_view_cdrs();
+}
+
+sub build_view_cdrs_freeswitch() {
+ $config->{cdr_table} = $config->{freeswitch_cdr_table};
+ return &build_view_cdrs();
+}
+
sub build_view_cdrs() {
my (
@trunklist, $body, $id, $tmp,
@@ -4082,7 +4098,52 @@
}
### End of Code from convergence.com.pk
+sub build_callingcard_cdrs() {
+ my ( @cdrlist, $results, $body, $status, $count, $pageno, $pagesrequired );
+ $count = 0;
+ my $template = HTML::Template->new(
+ filename => '/var/lib/astpp/templates/callingcards-cdrs.tpl',
+ die_on_bad_params => $config->{template_die_on_bad_params}
+ );
+ my $sql_select =
+"SELECT * FROM callingcardcdrs ORDER BY callstart DESC";
+ my $sql_count =
+"SELECT COUNT(*) FROM callingcardcdrs";
+ my ( $sql, $pagination ) = $ASTPP->pagination(
+ sql_select => $sql_select,
+ sql_count => $sql_count,
+ results_per_page => $config->{results_per_page},
+ ve => $params->{ve},
+ te => $params->{ee},
+ db => $astpp_db,
+ mode => $params->{mode},
+ );
+
+ $ASTPP->debug( user => $params->{username}, debug => $sql );
+ $results = $astpp_db->prepare($sql);
+ $results->execute;
+
+ while ( my $record = $results->fetchrow_hashref ) {
+ $ASTPP->debug(
+ user => $params->{username},
+ debug => $record->{uniqueid}
+ );
+ $count++;
+ if ( $count % 2 == 0 ) {
+ $record->{class} = "rowtwo";
+ }
+ else {
+ $record->{class} = "rowone";
+ }
+ push( @cdrlist, $record );
+ }
+ $results->finish;
+ $template->param( cdrlist => \@cdrlist );
+ $template->param( pagination => $pagination );
+ return $template->output;
+}
+
sub build_list_errors() {
my ( @cdrlist, $results, $body, $status, $count, $pageno, $pagesrequired );
$cdr_db = &cdr_connect_db( $config, @output );
@@ -12062,9 +12123,15 @@
gettext("Asterisk(TM) SIP Devices"),
gettext("Asterisk(TM) Dialplan")
);
+ push @Statistics,(
+ gettext("View Asterisk(TM) CDRs")
+ );
}
if ( $config->{users_dids_freeswitch} == 1 ) {
push @SwitchConfig, ( gettext("Freeswitch(TM) SIP Devices") );
+ push @Statistics,(
+ gettext("View FreeSwitch(TM) CDRs")
+ );
}
}
if ( $config->{callingcards} == 1 ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-13 04:14:28
|
Revision: 2317
http://astpp.svn.sourceforge.net/astpp/?rev=2317&view=rev
Author: darrenkw
Date: 2010-09-13 04:14:22 +0000 (Mon, 13 Sep 2010)
Log Message:
-----------
Corrected capitalization errors and added code to correct urlencoding issues.
Modified Paths:
--------------
trunk/freeswitch/astpp-callingcards.pl
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2010-09-13 04:13:05 UTC (rev 2316)
+++ trunk/freeswitch/astpp-callingcards.pl 2010-09-13 04:14:22 UTC (rev 2317)
@@ -428,13 +428,14 @@
trunk_name => $route->{trunk}
);
my ( $dialedtime, $uniqueid, $answeredtime, $clid );
- $session->execute( "export", "CALLINGCARDS=1" );
if ( $cc == 1 ) {
- $session->execute( "export", "ACCOUNTCODE=CC:$cardinfo->{number}" );
+ $session->execute( "export", "accountcode=CC:$cardinfo->{number}" );
+ $session->execute( "export", "callingcard=$cardinfo->{number}" );
}
else {
$session->execute( "export",
- "ACCOUNTCODE=CC:$cardinfo->{cardnumber}" );
+ "accountcode=CC:$cardinfo->{cardnumber}" );
+ $session->execute( "export", "callingcard=$cardinfo->{cardnumber}" );
}
$session->execute( "bridge", "$data_string" );
return 1;
@@ -462,20 +463,22 @@
verbosity => $verbosity
);
if ( $cc == 1 ) {
- $session->execute( "export", "CARDNUMBER=$cardinfo->{number}" );
+ $session->execute( "export", "cardnumber=$cardinfo->{number}" );
+ $session->execute( "export", "callingcard=$cardinfo->{number}" );
}
else {
- $session->execute( "export", "CARDNUMBER=$cardinfo->{cardnumber}" );
+ $session->execute( "export", "cardnumber=$cardinfo->{cardnumber}" );
+ $session->execute( "export", "callingcard=$cardinfo->{cardnumber}" );
}
- $session->execute( "export", "PIN=$cardinfo->{pin}" );
+ $session->execute( "export", "pin=$cardinfo->{pin}" );
if ( $whatnow == 1 ) {
- $session->execute( "export", "NEWCALL=1" );
- $session->execute( "export", "DESTINATION=$stats{destination}" );
+ $session->execute( "export", "newcall=1" );
+ $session->execute( "export", "destination=$stats{destination}" );
&exit_program();
}
elsif ( $whatnow == 2 ) {
- $session->execute( "export", "NEWCALL=1" );
- $session->execute( "export", "DESTINATION=" );
+ $session->execute( "export", "newcall=1" );
+ $session->execute( "export", "destination=" );
&exit_program();
}
elsif ( $whatnow == 3 ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-13 04:13:13
|
Revision: 2316
http://astpp.svn.sourceforge.net/astpp/?rev=2316&view=rev
Author: darrenkw
Date: 2010-09-13 04:13:05 +0000 (Mon, 13 Sep 2010)
Log Message:
-----------
Added code to correct urlencoding issues.
Modified Paths:
--------------
trunk/freeswitch/astpp-fs-xml.pl
Modified: trunk/freeswitch/astpp-fs-xml.pl
===================================================================
--- trunk/freeswitch/astpp-fs-xml.pl 2010-09-01 03:26:00 UTC (rev 2315)
+++ trunk/freeswitch/astpp-fs-xml.pl 2010-09-13 04:13:05 UTC (rev 2316)
@@ -336,7 +336,7 @@
print $void_xml;
exit(0);
}
-} elsif ( $params->{cdr} ) {
+} elsif ( $params->{cdr} ) { # PROCESS CDRs.
print header( -type => 'text/plain' );
# create object
@@ -353,21 +353,21 @@
. "lastdata,calldate,answerdate,enddate,duration,billsec,disposition,amaflags,uniqueid,originator,userfield,read_codec,"
. "write_codec,cost,vendor,provider,trunk,outbound_route,progressmsec,answermsec,progress_mediamsec) VALUES ("
. "'"
- . $data->{variables}->{accountcode}
+ . uri_unescape($data->{variables}->{accountcode})
. "'"
. ","
. "'"
- . $data->{callflow}->{caller_profile}->{username}
+ . uri_unescape($data->{callflow}->{caller_profile}->{username})
. "'"
. ","
# . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{destination_number})
. "'"
- . $data->{callflow}->{caller_profile}->{destination_number}
+ . uri_unescape($data->{callflow}->{caller_profile}->{destination_number})
. "'"
. ","
# . $cdr_db->quote($data->{callflow}->{caller_profile}->{originatee}->{originatee_caller_profile}->{context})
. "'"
- . $data->{callflow}->{caller_profile}->{context}
+ . uri_unescape($data->{callflow}->{caller_profile}->{context})
. "'"
. ","
. "'"
@@ -384,7 +384,7 @@
. ","
. "''"
. ","
- . "'" . $data->{variables}->{last_app} . "'"
+ . "'" . uri_unescape($data->{variables}->{last_app}) . "'"
. ","
. "'" . uri_unescape($data->{variables}->{last_arg}) . "'"
. ","
@@ -399,45 +399,45 @@
. "'"
. ","
. "'"
- . $data->{variables}->{duration}
+ . uri_unescape($data->{variables}->{duration})
. "'"
. ","
. "'"
- . $data->{variables}->{billsec}
+ . uri_unescape($data->{variables}->{billsec})
. "'"
. ","
. "'"
- . $data->{variables}->{hangup_cause}
+ . uri_unescape($data->{variables}->{hangup_cause})
. "'"
. ","
. "''"
. ","
. "'"
- . $data->{callflow}->{caller_profile}->{uuid}
+ . uri_unescape($data->{callflow}->{caller_profile}->{uuid})
. "'"
. ","
. "'"
- . $data->{variables}->{originator}
+ . uri_unescape($data->{variables}->{originator})
. "'"
. ","
. "''"
. ","
- . "'" . $data->{variables}->{read_code} . "'"
+ . "'" . uri_unescape($data->{variables}->{read_code}) . "'"
. ","
- . "'" . $data->{variables}->{write_code} . "'"
+ . "'" . uri_unescape($data->{variables}->{write_code}) . "'"
. ",'none','none'"
. ","
- . "'" . $data->{variables}->{provider} . "'"
+ . "'" . uri_unescape($data->{variables}->{provider}) . "'"
. ","
- . "'" . $data->{variables}->{trunk} . "'"
+ . "'" . uri_unescape($data->{variables}->{trunk}) . "'"
. ","
- . "'" . $data->{variables}->{outbound_route} . "'"
+ . "'" . uri_unescape($data->{variables}->{outbound_route}) . "'"
. ","
- . "'" . $data->{variables}->{progressmsec} . "'"
+ . "'" . uri_unescape($data->{variables}->{progressmsec}) . "'"
. ","
- . "'" . $data->{variables}->{answermsec} . "'"
+ . "'" . uri_unescape($data->{variables}->{answermsec}) . "'"
. ","
- . "'" . $data->{variables}->{progress_mediamsec} . "'"
+ . "'" . uri_unescape($data->{variables}->{progress_mediamsec}) . "'"
. ")";
print STDERR "\n" . $tmp . "\n";
@@ -453,9 +453,9 @@
sub process_callingcard_cdr() {
my ( $cardinfo, $brandinfo, $numberinfo, $pricelistinfo,$cc );
- my $destination = $data->{callflow}->{caller_profile}->{destination_number};
+ my $destination = uri_unescape($data->{callflow}->{caller_profile}->{destination_number});
$destination =~ s/@.*//g;
- my $cardnumber = $data->{variables}->{callingcard};
+ my $cardnumber = uri_unescape($data->{variables}->{callingcard});
$cardinfo = &get_callingcard( $astpp_db, $cardnumber, $config );
if ( !$cardinfo ) {
$cardinfo = &get_account_cc( $astpp_db, $cardnumber );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-01 03:26:07
|
Revision: 2315
http://astpp.svn.sourceforge.net/astpp/?rev=2315&view=rev
Author: darrenkw
Date: 2010-09-01 03:26:00 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
Fix a few more issues. Makefile was installing files in wrong location.
Modified Paths:
--------------
trunk/Makefile
trunk/freeswitch/astpp-callingcards.pl
trunk/modules/ASTPP/lib/ASTPP.pm
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/Makefile 2010-09-01 03:26:00 UTC (rev 2315)
@@ -92,7 +92,7 @@
done
install_sounds_freeswitch:
- for x in sounds/GSM/*.GSM; do \
+ for x in sounds/gsm/*.gsm; do \
echo $$x;\
install -m 644 $$x $(DESTDIR)$(FS_SOUNDSDIR); \
done
Modified: trunk/freeswitch/astpp-callingcards.pl
===================================================================
--- trunk/freeswitch/astpp-callingcards.pl 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/freeswitch/astpp-callingcards.pl 2010-09-01 03:26:00 UTC (rev 2315)
@@ -9,7 +9,7 @@
# This program is Free Software and is distributed under the
# terms of the GNU General Public License version 2.
#############################################################################
-use DBI;
+#use DBI;
use POSIX qw(ceil floor);
use POSIX qw(strftime);
use Time::HiRes qw( gettimeofday tv_interval );
@@ -47,7 +47,7 @@
}
$cdr_db = &cdr_connect_db( $config, @output );
$ASTPP->set_cdr_db($cdr_db);
- $sound = &define_sounds($astpp_db,$config->{freeswitch_sound_files});
+ $sound = &define_sounds($astpp_db);
}
sub set_in_use()
@@ -228,7 +228,7 @@
);
}
elsif ( $cc == 1 ) {
- $balance = $ASTPP->accountbalance( $cardinfo->{number} );
+ $balance = &accountbalance( $astpp_db, $cardinfo->{number} );
$balance = ( $balance * -1 ) + ( $cardinfo->{credit_limit} );
$available = ( $balance - $numberinfo->{connectfee} ) / 100;
}
@@ -428,12 +428,13 @@
trunk_name => $route->{trunk}
);
my ( $dialedtime, $uniqueid, $answeredtime, $clid );
+ $session->execute( "export", "CALLINGCARDS=1" );
if ( $cc == 1 ) {
- $session->execute( "export", "accountcode=$cardinfo->{number}" );
+ $session->execute( "export", "ACCOUNTCODE=CC:$cardinfo->{number}" );
}
else {
$session->execute( "export",
- "callingcard=$cardinfo->{cardnumber}" );
+ "ACCOUNTCODE=CC:$cardinfo->{cardnumber}" );
}
$session->execute( "bridge", "$data_string" );
return 1;
@@ -471,13 +472,11 @@
$session->execute( "export", "NEWCALL=1" );
$session->execute( "export", "DESTINATION=$stats{destination}" );
&exit_program();
- return 1;
}
elsif ( $whatnow == 2 ) {
$session->execute( "export", "NEWCALL=1" );
$session->execute( "export", "DESTINATION=" );
&exit_program();
- return 1;
}
elsif ( $whatnow == 3 ) {
$session->streamFile( $sound->{goodbye} );
@@ -501,8 +500,7 @@
. $astpp_db->quote( $stats{answered_time} )
. ")" );
$stats{total_time} = tv_interval( $stats{start_time} );
-# exit(1);
- return 1;
+ return 1;
}
sub print_console() #Dump string to the console
@@ -586,9 +584,8 @@
}
if ( $cardinfo->{status} != 1 ) {
$session->streamFile( $sound->{goodbye} );
- $session->hangup();
-# exit(1);
- return 1;
+# $session->hangup();
+ return 1;
}
}
@@ -609,8 +606,7 @@
if ( $pin != $cardinfo->{pin} ) {
$session->streamFile( $sound->{pin_incorrect} );
$session->streamFile( $sound->{goodbye} );
-# exit(1);
- return 1;
+ return 1;
}
}
&check_card($cardinfo) if $cc == 0;
@@ -661,7 +657,7 @@
if ( !$numberinfo->{pattern} ) {
$session->streamFile( $sound->{destination_incorrect} );
$session->streamFile( $sound->{goodbye} );
- $session->hangup();
+# $session->hangup();
&leave($cardinfo);
}
@@ -678,4 +674,3 @@
);
1;
-
Modified: trunk/modules/ASTPP/lib/ASTPP.pm
===================================================================
--- trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-01 01:25:12 UTC (rev 2314)
+++ trunk/modules/ASTPP/lib/ASTPP.pm 2010-09-01 03:26:00 UTC (rev 2315)
@@ -803,7 +803,8 @@
$arg{xml} .= "</user>\n";
}
}
- my ($count,@ip_users) = &ip_address_authenticate($self,%arg);
+ my @ip_users;
+ ($count,@ip_users) = &ip_address_authenticate($self,%arg);
print STDERR "COUNT: $count\n";
if ($count > 0) {
foreach my $record (@ip_users) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dar...@us...> - 2010-09-01 01:25:20
|
Revision: 2314
http://astpp.svn.sourceforge.net/astpp/?rev=2314&view=rev
Author: darrenkw
Date: 2010-09-01 01:25:12 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
added sql for Freeswitch support
Added Paths:
-----------
trunk/freeswitch/contrib/README
trunk/freeswitch/contrib/mysql-4.0.sql
trunk/freeswitch/contrib/mysql-5.0.sql
Added: trunk/freeswitch/contrib/README
===================================================================
--- trunk/freeswitch/contrib/README (rev 0)
+++ trunk/freeswitch/contrib/README 2010-09-01 01:25:12 UTC (rev 2314)
@@ -0,0 +1,2 @@
+The SQL files are copied out of the contrib directory in the freeswitch source code. They
+were contributed there by intralanman.
Added: trunk/freeswitch/contrib/mysql-4.0.sql
===================================================================
--- trunk/freeswitch/contrib/mysql-4.0.sql (rev 0)
+++ trunk/freeswitch/contrib/mysql-4.0.sql 2010-09-01 01:25:12 UTC (rev 2314)
@@ -0,0 +1,885 @@
+-- phpMyAdmin SQL Dump
+-- version 3.1.2deb1
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost
+-- Generation Time: Feb 15, 2009 at 09:36 PM
+-- Server version: 5.0.75
+-- PHP Version: 5.2.6-3ubuntu2
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+--
+-- Database: `freeswitch`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `acl_lists`
+--
+
+CREATE TABLE IF NOT EXISTS `acl_lists` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `acl_name` varchar(128) NOT NULL,
+ `default_policy` varchar(45) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `acl_lists`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `acl_nodes`
+--
+
+CREATE TABLE IF NOT EXISTS `acl_nodes` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `cidr` varchar(45) NOT NULL,
+ `type` varchar(16) NOT NULL,
+ `list_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `acl_nodes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_advertise`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_advertise` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `room` varchar(64) NOT NULL,
+ `status` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_room` (`room`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_advertise`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_controls`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_controls` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `conf_group` varchar(64) NOT NULL,
+ `action` varchar(64) NOT NULL,
+ `digits` varchar(16) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_group_action` (`conf_group`,`action`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_controls`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_profiles`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_profiles` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `profile_name` varchar(64) NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `unique_profile_param` (`profile_name`,`param_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_profiles`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan` (
+ `dialplan_id` int(11) NOT NULL auto_increment,
+ `domain` varchar(128) NOT NULL,
+ `ip_address` varchar(15) NOT NULL,
+ PRIMARY KEY (`dialplan_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_actions`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_actions` (
+ `action_id` int(11) NOT NULL auto_increment,
+ `condition_id` int(11) NOT NULL,
+ `application` varchar(256) NOT NULL,
+ `data` varchar(256) NOT NULL,
+ `type` varchar(32) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`action_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_actions`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_condition`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_condition` (
+ `condition_id` int(11) NOT NULL auto_increment,
+ `extension_id` int(11) NOT NULL,
+ `field` varchar(1238) NOT NULL,
+ `expression` varchar(128) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`condition_id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_condition`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_context`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_context` (
+ `context_id` int(11) NOT NULL auto_increment,
+ `dialplan_id` int(11) NOT NULL,
+ `context` varchar(64) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`context_id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_context`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_extension`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_extension` (
+ `extension_id` int(11) NOT NULL auto_increment,
+ `context_id` int(11) NOT NULL,
+ `name` varchar(128) NOT NULL,
+ `continue` varchar(32) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`extension_id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_extension`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_special`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_special` (
+ `id` int(11) NOT NULL auto_increment,
+ `context` varchar(255) NOT NULL,
+ `class_file` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_context` (`context`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_special`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_profiles`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_profiles` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `profile_name` varchar(64) NOT NULL,
+ `type` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_name` (`profile_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_profiles`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_profile_params`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_profile_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `dingaling_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_type_name` (`dingaling_id`,`param_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_profile_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_settings` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_param` (`param_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory`
+--
+
+CREATE TABLE IF NOT EXISTS `directory` (
+ `id` int(11) NOT NULL auto_increment,
+ `username` varchar(255) NOT NULL,
+ `domain` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_domains`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_domains` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `domain_name` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_domains`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_gateways`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_gateways` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `directory_id` int(10) unsigned NOT NULL,
+ `gateway_name` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_gateways`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_gateway_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_gateway_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `d_gw_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_gw_param` (`d_gw_id`,`param_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_gateway_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_global_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_global_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(128) NOT NULL,
+ `domain_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_global_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_global_vars`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_global_vars` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `var_name` varchar(64) NOT NULL,
+ `var_value` varchar(128) NOT NULL,
+ `domain_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_global_vars`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_params` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_vars`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_vars` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) default NULL,
+ `var_name` varchar(255) default NULL,
+ `var_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_vars`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `iax_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `iax_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `profile_name` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `iax_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `iax_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `iax_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `iax_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `iax_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ivr_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `ivr_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL,
+ `greet_long` varchar(255) NOT NULL,
+ `greet_short` varchar(255) NOT NULL,
+ `invalid_sound` varchar(255) NOT NULL,
+ `exit_sound` varchar(255) NOT NULL,
+ `max_failures` int(10) unsigned NOT NULL default '3',
+ `timeout` int(11) NOT NULL default '5',
+ `tts_engine` varchar(64) default NULL,
+ `tts_voice` varchar(64) default NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_name` (`name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `ivr_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ivr_entries`
+--
+
+CREATE TABLE IF NOT EXISTS `ivr_entries` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `ivr_id` int(10) unsigned NOT NULL,
+ `action` varchar(64) NOT NULL,
+ `digits` varchar(16) NOT NULL,
+ `params` varchar(255) default NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_ivr_digits` (`ivr_id`,`digits`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `ivr_entries`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `limit_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `limit_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` varchar(255) default NULL,
+ `value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `limit_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `limit_data`
+--
+
+CREATE TABLE IF NOT EXISTS `limit_data` (
+ `hostname` varchar(255) default NULL,
+ `realm` varchar(255) default NULL,
+ `id` varchar(255) default NULL,
+ `uuid` varchar(255) default NULL
+) TYPE=MyISAM;
+
+--
+-- Dumping data for table `limit_data`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `local_stream_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `local_stream_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_name` varchar(255) default NULL,
+ `directory_path` text,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `local_stream_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `modless_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `modless_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `conf_name` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `modless_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `post_load_modules_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `post_load_modules_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `module_name` varchar(64) NOT NULL,
+ `load_module` tinyint(1) NOT NULL default '1',
+ `priority` int(10) unsigned NOT NULL default '1000',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_mod` (`module_name`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `post_load_modules_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `rss_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `rss_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) NOT NULL,
+ `feed` text NOT NULL,
+ `local_file` text NOT NULL,
+ `description` text,
+ `priority` int(11) NOT NULL default '1000',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `rss_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_authentication`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_authentication` (
+ `nonce` varchar(255) default NULL,
+ `expires` int(11) default NULL
+) TYPE=InnoDB;
+
+--
+-- Dumping data for table `sip_authentication`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_dialogs`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_dialogs` (
+ `call_id` varchar(255) default NULL,
+ `uuid` varchar(255) default NULL,
+ `sip_to_user` varchar(255) default NULL,
+ `sip_to_host` varchar(255) default NULL,
+ `sip_from_user` varchar(255) default NULL,
+ `sip_from_host` varchar(255) default NULL,
+ `contact_user` varchar(255) default NULL,
+ `contact_host` varchar(255) default NULL,
+ `state` varchar(255) default NULL,
+ `direction` varchar(255) default NULL,
+ `user_agent` varchar(255) default NULL
+) TYPE=InnoDB;
+
+--
+-- Dumping data for table `sip_dialogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_registrations`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_registrations` (
+ `call_id` varchar(255) default NULL,
+ `sip_user` varchar(255) default NULL,
+ `sip_host` varchar(255) default NULL,
+ `contact` varchar(1024) default NULL,
+ `status` varchar(255) default NULL,
+ `rpid` varchar(255) default NULL,
+ `expires` int(11) default NULL,
+ `user_agent` varchar(255) default NULL
+) TYPE=InnoDB;
+
+--
+-- Dumping data for table `sip_registrations`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_subscriptions`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_subscriptions` (
+ `proto` varchar(255) default NULL,
+ `sip_user` varchar(255) default NULL,
+ `sip_host` varchar(255) default NULL,
+ `sub_to_user` varchar(255) default NULL,
+ `sub_to_host` varchar(255) default NULL,
+ `event` varchar(255) default NULL,
+ `contact` varchar(1024) default NULL,
+ `call_id` varchar(255) default NULL,
+ `full_from` varchar(255) default NULL,
+ `full_via` varchar(255) default NULL,
+ `expires` int(11) default NULL,
+ `user_agent` varchar(255) default NULL,
+ `accept` varchar(255) default NULL
+) TYPE=InnoDB;
+
+--
+-- Dumping data for table `sip_subscriptions`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_aliases`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_aliases` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `sofia_id` int(10) unsigned NOT NULL,
+ `alias_name` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_aliases`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `profile_name` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_domains`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_domains` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `domain_name` varchar(255) default NULL,
+ `parse` tinyint(1) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_domains`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_gateways`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_gateways` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `gateway_name` varchar(255) default NULL,
+ `gateway_param` varchar(255) default NULL,
+ `gateway_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_gateways`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `vm_profile` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_profile` (`vm_profile`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_email`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_email` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `voicemail_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_profile_param` (`param_name`,`voicemail_id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_email`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `voicemail_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) TYPE=InnoDB AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_settings`
+--
+
+
+--
+-- Constraints for dumped tables
+--
+
+--
+-- Constraints for table `dingaling_profile_params`
+--
+ALTER TABLE `dingaling_profile_params`
+ ADD CONSTRAINT `dingaling_profile` FOREIGN KEY (`dingaling_id`) REFERENCES `dingaling_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
Added: trunk/freeswitch/contrib/mysql-5.0.sql
===================================================================
--- trunk/freeswitch/contrib/mysql-5.0.sql (rev 0)
+++ trunk/freeswitch/contrib/mysql-5.0.sql 2010-09-01 01:25:12 UTC (rev 2314)
@@ -0,0 +1,887 @@
+-- phpMyAdmin SQL Dump
+-- version 3.1.2deb1
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost
+-- Generation Time: Feb 15, 2009 at 09:36 PM
+-- Server version: 5.0.75
+-- PHP Version: 5.2.6-3ubuntu2
+
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+--
+-- Database: `freeswitch`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `acl_lists`
+--
+
+CREATE TABLE IF NOT EXISTS `acl_lists` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `acl_name` varchar(128) NOT NULL,
+ `default_policy` varchar(45) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `acl_lists`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `acl_nodes`
+--
+
+CREATE TABLE IF NOT EXISTS `acl_nodes` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `cidr` varchar(45) NOT NULL,
+ `type` varchar(16) NOT NULL,
+ `list_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `acl_nodes`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_advertise`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_advertise` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `room` varchar(64) NOT NULL,
+ `status` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_room` (`room`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_advertise`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_controls`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_controls` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `conf_group` varchar(64) NOT NULL,
+ `action` varchar(64) NOT NULL,
+ `digits` varchar(16) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_group_action` USING BTREE (`conf_group`,`action`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_controls`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `conference_profiles`
+--
+
+CREATE TABLE IF NOT EXISTS `conference_profiles` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `profile_name` varchar(64) NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `unique_profile_param` (`profile_name`,`param_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `conference_profiles`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan` (
+ `dialplan_id` int(11) NOT NULL auto_increment,
+ `domain` varchar(128) NOT NULL,
+ `ip_address` varchar(15) NOT NULL,
+ PRIMARY KEY (`dialplan_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_actions`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_actions` (
+ `action_id` int(11) NOT NULL auto_increment,
+ `condition_id` int(11) NOT NULL,
+ `application` varchar(256) NOT NULL,
+ `data` varchar(256) NOT NULL,
+ `type` varchar(32) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`action_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_actions`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_condition`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_condition` (
+ `condition_id` int(11) NOT NULL auto_increment,
+ `extension_id` int(11) NOT NULL,
+ `field` varchar(1238) NOT NULL,
+ `expression` varchar(128) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`condition_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_condition`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_context`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_context` (
+ `context_id` int(11) NOT NULL auto_increment,
+ `dialplan_id` int(11) NOT NULL,
+ `context` varchar(64) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`context_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_context`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_extension`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_extension` (
+ `extension_id` int(11) NOT NULL auto_increment,
+ `context_id` int(11) NOT NULL,
+ `name` varchar(128) NOT NULL,
+ `continue` varchar(32) NOT NULL,
+ `weight` int(11) NOT NULL,
+ PRIMARY KEY (`extension_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_extension`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dialplan_special`
+--
+
+CREATE TABLE IF NOT EXISTS `dialplan_special` (
+ `id` int(11) NOT NULL auto_increment,
+ `context` varchar(255) NOT NULL,
+ `class_file` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_context` (`context`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dialplan_special`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_profiles`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_profiles` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `profile_name` varchar(64) NOT NULL,
+ `type` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_name` (`profile_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_profiles`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_profile_params`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_profile_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `dingaling_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_type_name` (`dingaling_id`,`param_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_profile_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `dingaling_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `dingaling_settings` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_param` (`param_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `dingaling_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory`
+--
+
+CREATE TABLE IF NOT EXISTS `directory` (
+ `id` int(11) NOT NULL auto_increment,
+ `username` varchar(255) NOT NULL,
+ `domain` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_domains`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_domains` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `domain_name` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_domains`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_gateways`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_gateways` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `directory_id` int(10) unsigned NOT NULL,
+ `gateway_name` varchar(128) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_gateways`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_gateway_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_gateway_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `d_gw_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_gw_param` (`d_gw_id`,`param_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_gateway_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_global_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_global_params` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(128) NOT NULL,
+ `domain_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_global_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_global_vars`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_global_vars` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `var_name` varchar(64) NOT NULL,
+ `var_value` varchar(128) NOT NULL,
+ `domain_id` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_global_vars`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_params`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_params` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_params`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `directory_vars`
+--
+
+CREATE TABLE IF NOT EXISTS `directory_vars` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) default NULL,
+ `var_name` varchar(255) default NULL,
+ `var_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `directory_vars`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `iax_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `iax_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `profile_name` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `iax_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `iax_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `iax_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `iax_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `iax_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ivr_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `ivr_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(64) NOT NULL,
+ `greet_long` varchar(255) NOT NULL,
+ `greet_short` varchar(255) NOT NULL,
+ `invalid_sound` varchar(255) NOT NULL,
+ `exit_sound` varchar(255) NOT NULL,
+ `max_failures` int(10) unsigned NOT NULL default '3',
+ `timeout` int(11) NOT NULL default '5',
+ `tts_engine` varchar(64) default NULL,
+ `tts_voice` varchar(64) default NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `ivr_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `ivr_entries`
+--
+
+CREATE TABLE IF NOT EXISTS `ivr_entries` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `ivr_id` int(10) unsigned NOT NULL,
+ `action` varchar(64) NOT NULL,
+ `digits` varchar(16) NOT NULL,
+ `params` varchar(255) default NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_ivr_digits` USING BTREE (`ivr_id`,`digits`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `ivr_entries`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `limit_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `limit_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `name` varchar(255) default NULL,
+ `value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `limit_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `limit_data`
+--
+
+CREATE TABLE IF NOT EXISTS `limit_data` (
+ `hostname` varchar(255) default NULL,
+ `realm` varchar(255) default NULL,
+ `id` varchar(255) default NULL,
+ `uuid` varchar(255) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `limit_data`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `local_stream_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `local_stream_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_name` varchar(255) default NULL,
+ `directory_path` text,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `local_stream_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `modless_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `modless_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `conf_name` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `modless_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `post_load_modules_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `post_load_modules_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `module_name` varchar(64) NOT NULL,
+ `load_module` tinyint(1) NOT NULL default '1',
+ `priority` int(10) unsigned NOT NULL default '1000',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_mod` (`module_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `post_load_modules_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `rss_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `rss_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `directory_id` int(11) NOT NULL,
+ `feed` text NOT NULL,
+ `local_file` text NOT NULL,
+ `description` text,
+ `priority` int(11) NOT NULL default '1000',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `rss_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_authentication`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_authentication` (
+ `nonce` varchar(255) default NULL,
+ `expires` int(11) default NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `sip_authentication`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_dialogs`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_dialogs` (
+ `call_id` varchar(255) default NULL,
+ `uuid` varchar(255) default NULL,
+ `sip_to_user` varchar(255) default NULL,
+ `sip_to_host` varchar(255) default NULL,
+ `sip_from_user` varchar(255) default NULL,
+ `sip_from_host` varchar(255) default NULL,
+ `contact_user` varchar(255) default NULL,
+ `contact_host` varchar(255) default NULL,
+ `state` varchar(255) default NULL,
+ `direction` varchar(255) default NULL,
+ `user_agent` varchar(255) default NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `sip_dialogs`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_registrations`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_registrations` (
+ `call_id` varchar(255) default NULL,
+ `sip_user` varchar(255) default NULL,
+ `sip_host` varchar(255) default NULL,
+ `contact` varchar(1024) default NULL,
+ `status` varchar(255) default NULL,
+ `rpid` varchar(255) default NULL,
+ `expires` int(11) default NULL,
+ `user_agent` varchar(255) default NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `sip_registrations`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sip_subscriptions`
+--
+
+CREATE TABLE IF NOT EXISTS `sip_subscriptions` (
+ `proto` varchar(255) default NULL,
+ `sip_user` varchar(255) default NULL,
+ `sip_host` varchar(255) default NULL,
+ `sub_to_user` varchar(255) default NULL,
+ `sub_to_host` varchar(255) default NULL,
+ `event` varchar(255) default NULL,
+ `contact` varchar(1024) default NULL,
+ `call_id` varchar(255) default NULL,
+ `full_from` varchar(255) default NULL,
+ `full_via` varchar(255) default NULL,
+ `expires` int(11) default NULL,
+ `user_agent` varchar(255) default NULL,
+ `accept` varchar(255) default NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+--
+-- Dumping data for table `sip_subscriptions`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_aliases`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_aliases` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `sofia_id` int(10) unsigned NOT NULL,
+ `alias_name` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_aliases`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_conf` (
+ `id` int(11) NOT NULL auto_increment,
+ `profile_name` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_domains`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_domains` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `domain_name` varchar(255) default NULL,
+ `parse` tinyint(1) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_domains`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_gateways`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_gateways` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `gateway_name` varchar(255) default NULL,
+ `gateway_param` varchar(255) default NULL,
+ `gateway_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_gateways`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sofia_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `sofia_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `sofia_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `sofia_settings`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_conf`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_conf` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `vm_profile` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_profile` (`vm_profile`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_conf`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_email`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_email` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `voicemail_id` int(10) unsigned NOT NULL,
+ `param_name` varchar(64) NOT NULL,
+ `param_value` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_profile_param` (`param_name`,`voicemail_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_email`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `voicemail_settings`
+--
+
+CREATE TABLE IF NOT EXISTS `voicemail_settings` (
+ `id` int(11) NOT NULL auto_increment,
+ `voicemail_id` int(11) default NULL,
+ `param_name` varchar(255) default NULL,
+ `param_value` varchar(255) default NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `voicemail_settings`
+--
+
+
+--
+-- Constraints for dumped tables
+--
+
+--
+-- Constraints for table `dingaling_profile_params`
+--
+ALTER TABLE `dingaling_profile_params`
+ ADD CONSTRAINT `dingaling_profile` FOREIGN KEY (`dingaling_id`) REFERENCES `dingaling_profiles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|