Added hosted_settings dialplan variable to FastAGI_log.pl script
git-svn-id: svn://192.168.202.10@3946 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+17
-7
@@ -25,7 +25,7 @@
|
|||||||
# exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
|
# exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# CHANGELOG:
|
# CHANGELOG:
|
||||||
# 61010-1007 - First test build
|
# 61010-1007 - First test build
|
||||||
@@ -102,7 +102,8 @@
|
|||||||
# 240225-0957 - Added AUTONEXT hopper_hold_inserts campaign option
|
# 240225-0957 - Added AUTONEXT hopper_hold_inserts campaign option
|
||||||
# 241001-2224 - Fixes for Khomp call processing
|
# 241001-2224 - Fixes for Khomp call processing
|
||||||
# 241020-1929 - Added khomp campaign settings options
|
# 241020-1929 - Added khomp campaign settings options
|
||||||
# 281028-0958 - Added vicidial_khomp_log logging of container used
|
# 241028-0958 - Added vicidial_khomp_log logging of container used
|
||||||
|
# 250928-1556 - Added hosted_settings dialplan variable
|
||||||
#
|
#
|
||||||
|
|
||||||
# defaults for PreFork
|
# defaults for PreFork
|
||||||
@@ -770,9 +771,9 @@ sub process_request
|
|||||||
if ($AGILOG) {$agi_string = "|CAMPDTO: $dial_timeout|$callerid|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|CAMPDTO: $dial_timeout|$callerid|"; &agi_output;}
|
||||||
}
|
}
|
||||||
|
|
||||||
### BEGIN OpenSIPs CallerIDname code ###
|
### BEGIN OpenSIPs CallerIDname and Hosted Settings code ###
|
||||||
### get system_settings
|
### get system_settings and hosted_settings
|
||||||
$stmtA = "SELECT opensips_cid_name FROM system_settings";
|
$stmtA = "SELECT opensips_cid_name,hosted_settings FROM system_settings";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -780,9 +781,10 @@ sub process_request
|
|||||||
{
|
{
|
||||||
@aryA = $sthA->fetchrow_array;
|
@aryA = $sthA->fetchrow_array;
|
||||||
$opensips_cid_name = $aryA[0];
|
$opensips_cid_name = $aryA[0];
|
||||||
|
$hosted_settings = $aryA[1];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
if ($AGILOG) {$agi_string = "$stmtA|$opensips_cid_name"; &agi_output;}
|
if ($AGILOG) {$agi_string = "$stmtA|$opensips_cid_name|$hosted_settings"; &agi_output;}
|
||||||
|
|
||||||
### opensips_cid_name is active
|
### opensips_cid_name is active
|
||||||
if ( $opensips_cid_name == 1)
|
if ( $opensips_cid_name == 1)
|
||||||
@@ -808,7 +810,15 @@ sub process_request
|
|||||||
$AGI->exec("EXEC SIPAddHeader(\"$header\")");
|
$AGI->exec("EXEC SIPAddHeader(\"$header\")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
### END OpenSIPs CallerIDname code ###
|
|
||||||
|
### if hosted_settings has a value, set a dialplan variable
|
||||||
|
if ( length($hosted_settings) > 0 )
|
||||||
|
{
|
||||||
|
$AGI->exec("EXEC Set(_HOSTEDSETTINGS=$hosted_settings)");
|
||||||
|
if ($AGILOG) {$agi_string = "|HOSTEDSETTINGS: $hosted_settings|$callerid|"; &agi_output;}
|
||||||
|
}
|
||||||
|
|
||||||
|
### END OpenSIPs CallerIDname and Hosted Settings code ###
|
||||||
|
|
||||||
if ($AGILOG) {$agi_string = "|KHOMP $amd_type|$HVcauses|$extension|$campaign_vdad_exten"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|KHOMP $amd_type|$HVcauses|$extension|$campaign_vdad_exten"; &agi_output;}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user