aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-07-07 05:14:12 -0600
committermcrane <mctch@yahoo.com>2009-07-07 05:16:31 -0600
commitbf75aa092f50d5f4a0a0d67bfbefd2b071b027d4 (patch)
tree9da84c3030efa7926018b46d0d4caa121944af0f
parent4bed57a45df0abe17293c9f2bd0ce38f4dc06556 (diff)
downloadpfsense-packages-bf75aa092f50d5f4a0a0d67bfbefd2b071b027d4.tar.gz
pfsense-packages-bf75aa092f50d5f4a0a0d67bfbefd2b071b027d4.tar.bz2
pfsense-packages-bf75aa092f50d5f4a0a0d67bfbefd2b071b027d4.zip
FreeSWITCH fix voicemail access from the auto attendant. *98 now detects voicemail id automatically so the user doesn't have to type in the id everytime they go to voicemail, *4000 still works as a general voicemail number.
-rw-r--r--config/freeswitch/dialplan.default.xml13
-rw-r--r--config/freeswitch/freeswitch.inc134
-rw-r--r--config/freeswitch/freeswitch.xml2
3 files changed, 111 insertions, 38 deletions
diff --git a/config/freeswitch/dialplan.default.xml b/config/freeswitch/dialplan.default.xml
index fae1ae2c..93ecff16 100644
--- a/config/freeswitch/dialplan.default.xml
+++ b/config/freeswitch/dialplan.default.xml
@@ -242,10 +242,19 @@
<!-- voicemail main extension -->
<extension name="vmain">
- <condition field="destination_number" expression="^vmain|\*4000|\*98$">
+ <condition field="destination_number" expression="^vmain|\*98$">
<action application="answer"/>
<action application="sleep" data="1000"/>
- <action application="voicemail" data="check default ${domain_name}"/>
+ <action application="voicemail" data="check default ${domain_name} ${sip_from_user}"/>
+ </condition>
+ </extension>
+
+ <!-- voicemail main2 extension -->
+ <extension name="vmain2">
+ <condition field="destination_number" expression="^vmain2|\*4000">
+ <action application="answer"/>
+ <action application="sleep" data="1000"/>
+ <action application="voicemail" data="check default ${domain_name}"/>
</condition>
</extension>
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index 3e39d417..6e54d577 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1922,12 +1922,20 @@ function sync_package_freeswitch_ivr()
if ($actiondirecttype == "extension") {
$tmp .= " sofia_contact_".$actiondirectdest." = get_sofia_contact(\"".$actiondirectdest."\",domain_name, \"".$actiondirectprofile."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$actiondirectdest."); //".$actiondirectdest."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$actiondirectdest." XML default\");\n";
- //$tmp .= " session.execute(\"transfer\", \"".$actiondirectdest." XML default\"); //".$actiondirectdest."\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondirectdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondirectdest."\");\n";
+ }
}
if ($actiondirecttype == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$actiondirectdest." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$actiondirectdest."\");\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondirectdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondirectdest."\");\n";
+ }
}
if ($actiondirecttype == "sip uri") {
$tmp .= " session.execute(\"bridge\", \"".$actiondirectdest."\"); //".$actiondirectdest."\n";
@@ -1969,14 +1977,22 @@ function sync_package_freeswitch_ivr()
if ($row['optiontype'] == "extension") {
$tmp .= " sofia_contact_".$row['optiondest']." = get_sofia_contact(\"".$row['optiondest']."\",domain_name, \"".$row['optionprofile']."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$row['optiondest']."); //".$row['optiondescr']."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
}
if ($row['optiontype'] == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
- }
+ if ($row['optionprofile'] == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ }
if ($row['optiontype'] == "sip uri") {
- //$tmp .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n";
$tmp .= " session.execute(\"bridge\", \"".$row['optiondest']."\"); //".$row['optiondescr']."\n";
}
}
@@ -2047,14 +2063,22 @@ function sync_package_freeswitch_ivr()
if ($row['optiontype'] == "extension") {
$tmpaction .= " sofia_contact_".$row['optiondest']." = get_sofia_contact(\"".$row['optiondest']."\",domain_name, \"".$row['optionprofile']."\");\n";
$tmpaction .= " session.execute(\"bridge\", sofia_contact_".$row['optiondest']."); //".$row['optiondescr']."\n";
- $tmpaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmpaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
+ else {
+ $tmpaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
}
if ($row['optiontype'] == "voicemail") {
- //$tmpaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
- $tmpaction .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmpaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ else {
+ $tmpaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
}
if ($row['optiontype'] == "sip uri") {
- //$tmpaction .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n";
$tmpaction .= " session.execute(\"bridge\", \"".$row['optiondest']."\"); //".$row['optiondescr']."\n";
}
@@ -2085,12 +2109,20 @@ function sync_package_freeswitch_ivr()
if ($actiondefaulttype == "extension") {
$tmp .= " sofia_contact_".$actiondefaultdest." = get_sofia_contact(\"".$actiondefaultdest."\",domain_name, \"".$actiondirectprofile."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$actiondefaultdest."); //".$actiondefaultdest."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$actiondefaultdest." XML default\");\n";
- //$tmp .= " session.execute(\"transfer\", \"".$actiondefaultdest." XML default\"); //".$actiondefaultdest."\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondefaultdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondefaultdest."\");\n";
+ }
}
if ($actiondefaulttype == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$actiondefaultdest." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$actiondefaultdest."\");\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondefaultdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$actiondefaultdest."\");\n";
+ }
}
if ($actiondefaulttype == "sip uri") {
$tmp .= " session.execute(\"bridge\", \"".$actiondefaultdest."\"); //".$actiondefaultdest."\n";
@@ -2153,12 +2185,20 @@ function sync_package_freeswitch_ivr()
if ($antiactiondirecttype == "extension") {
$tmp .= " sofia_contact_".$antiactiondirectdest." = get_sofia_contact(\"".$antiactiondirectdest."\",domain_name, \"".$antiactiondirectprofile."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$antiactiondirectdest."); //".$antiactiondirectdest."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$antiactiondirectdest." XML default\");\n";
- //$tmp .= " session.execute(\"transfer\", \"".$antiactiondirectdest." XML default\"); //".$antiactiondirectdest."\n";
+ if ($antiactiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondirectdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondirectdest."\");\n";
+ }
}
if ($antiactiondirecttype == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$antiactiondirectdest." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$antiactiondirectdest."\");\n";
+ if ($antiactiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondirectdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondirectdest."\");\n";
+ }
}
if ($antiactiondirecttype == "sip uri") {
$tmp .= " session.execute(\"bridge\", \"".$antiactiondirectdest."\"); //".$antiactiondirectdest."\n";
@@ -2196,14 +2236,22 @@ function sync_package_freeswitch_ivr()
if ($row['optiontype'] == "extension") {
$tmp .= " sofia_contact_".$row['optiondest']." = get_sofia_contact(\"".$row['optiondest']."\",domain_name, \"".$row['optionprofile']."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$row['optiondest']."); //".$row['optiondescr']."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
}
if ($row['optiontype'] == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
}
if ($row['optiontype'] == "sip uri") {
- //$tmp .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n";
$tmp .= " session.execute(\"bridge\", \"".$row['optiondest']."\"); //".$row['optiondescr']."\n";
}
}
@@ -2274,14 +2322,22 @@ function sync_package_freeswitch_ivr()
if ($row['optiontype'] == "extension") {
$tmpantiaction .= " sofia_contact_".$row['optiondest']." = get_sofia_contact(\"".$row['optiondest']."\",domain_name, \"".$row['optionprofile']."\");\n";
$tmpantiaction .= " session.execute(\"bridge\", sofia_contact_".$row['optiondest']."); //".$row['optiondescr']."\n";
- $tmpantiaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
+ if ($row['optionprofile'] == "auto") {
+ $tmpantiaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
+ else {
+ $tmpantiaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\");\n";
+ }
}
if ($row['optiontype'] == "voicemail") {
- //$tmpantiaction .= " session.execute(\"voicemail\", \"".$row['optiondest']." XML default\");\n";
- $tmpantiaction .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
- }
+ if ($row['optionprofile'] == "auto") {
+ $tmpantiaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ else {
+ $tmpantiaction .= " session.execute(\"voicemail\", \"default \${domain} ".$row['optiondest']."\"); //".$row['optiondescr']."\n";
+ }
+ }
if ($row['optiontype'] == "sip uri") {
- //$tmpantiaction .= " session.execute(\"transfer\", \"".$row['optiondest']." XML default\"); //".$row['optiondescr']."\n";
$tmpantiaction .= " session.execute(\"bridge\", \"".$row['optiondest']."\"); //".$row['optiondescr']."\n";
}
$tmpantiaction .= " }\n";
@@ -2312,12 +2368,20 @@ function sync_package_freeswitch_ivr()
if ($antiactiondefaulttype == "extension") {
$tmp .= " sofia_contact_".$antiactiondefaultdest." = get_sofia_contact(\"".$antiactiondefaultdest."\",domain_name, \"".$actiondirectprofile."\");\n";
$tmp .= " session.execute(\"bridge\", sofia_contact_".$antiactiondefaultdest."); //".$antiactiondefaultdest."\n";
- $tmp .= " session.execute(\"voicemail\", \"".$antiactiondefaultdest." XML default\");\n";
- //$tmp .= " session.execute(\"transfer\", \"".$antiactiondefaultdest." XML default\"); //".$antiactiondefaultdest."\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondefaultdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondefaultdest."\");\n";
+ }
}
if ($antiactiondefaulttype == "voicemail") {
- //$tmp .= " session.execute(\"voicemail\", \"".$antiactiondefaultdest." XML default\");\n";
- $tmp .= " session.execute(\"voicemail\", \"default \"+domain+\" ".$antiactiondefaultdest."\");\n";
+ if ($actiondirectprofile == "auto") {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondefaultdest."\");\n";
+ }
+ else {
+ $tmp .= " session.execute(\"voicemail\", \"default \${domain} ".$antiactiondefaultdest."\");\n";
+ }
}
if ($antiactiondefaulttype == "sip uri") {
$tmp .= " session.execute(\"bridge\", \"".$antiactiondefaultdest."\"); //".$antiactiondefaultdest."\n";
@@ -2644,7 +2708,7 @@ function sync_package_freeswitch()
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.9.4.1";
+ $freeswitch_package_version = "0.9.4.2";
$freeswitch_build_version = "1.0.4 pre 8";
$freeswitch_build_revision = "13784";
diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml
index d9fb2346..ba414415 100644
--- a/config/freeswitch/freeswitch.xml
+++ b/config/freeswitch/freeswitch.xml
@@ -44,7 +44,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>FreeSWITCH Settings</name>
- <version>0.9.4.1</version>
+ <version>0.9.4.2</version>
<title>FreeSWITCH: Settings</title>
<include_file>/usr/local/pkg/freeswitch.inc</include_file>
<menu>