aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch_dev/disa.js
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-09-26 09:03:41 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-09-26 09:03:41 -0300
commit783721d42370b30de032d1a886506b69cf68f606 (patch)
tree2d1a2a8db832e1cc60db8ca3a5664787fe165abb /config/freeswitch_dev/disa.js
parent770bae54ed3453f2ed1b0039211deb177d9f7e0c (diff)
downloadpfsense-packages-783721d42370b30de032d1a886506b69cf68f606.tar.gz
pfsense-packages-783721d42370b30de032d1a886506b69cf68f606.tar.bz2
pfsense-packages-783721d42370b30de032d1a886506b69cf68f606.zip
Remove anyterm (it has closed binaries and bash inside), and also removed unmaintained freeswitch and freeswitch-dev (port was removed from FreeBSD ports tree)
Diffstat (limited to 'config/freeswitch_dev/disa.js')
-rw-r--r--config/freeswitch_dev/disa.js78
1 files changed, 0 insertions, 78 deletions
diff --git a/config/freeswitch_dev/disa.js b/config/freeswitch_dev/disa.js
deleted file mode 100644
index f705b79c..00000000
--- a/config/freeswitch_dev/disa.js
+++ /dev/null
@@ -1,78 +0,0 @@
-include("/usr/local/freeswitch/scripts/config.js");
-
- //var admin_pin = ""; //don't require a pin
- //if you choose not to require a pin then then you may want to add a dialplan condition for a specific caller id
- var predefined_destination = ""; //example: 9999
- //predefined_destination leave empty in most cases
- //Use this to define a single destination
- var digitmaxlength = 0;
- var timeoutpin = 7500;
- var timeouttransfer = 7500;
-
- function mycb( session, type, obj, arg ) {
- try {
- if ( type == "dtmf" ) {
- console_log( "info", "digit: "+obj.digit+"\n" );
- if ( obj.digit == "#" ) {
- //console_log( "info", "detected pound sign.\n" );
- exit = true;
- return( false );
- }
-
- dtmf.digits += obj.digit;
-
- if ( dtmf.digits.length >= digitmaxlength ) {
- exit = true;
- return( false );
- }
- }
- } catch (e) {
- console_log( "err", e+"\n" );
- }
- return( true );
- } //end function mycb
-
-
- //console_log( "info", "DISA Request\n" );
-
- var dtmf = new Object( );
- dtmf.digits = "";
-
- if ( session.ready( ) ) {
- session.answer( );
-
- if (admin_pin.length > 0) {
- digitmaxlength = 6;
- session.streamFile( "/usr/local/freeswitch/sounds/custom/8000/please_enter_the_pin_number.wav", mycb, "dtmf");
- session.collectInput( mycb, dtmf, timeoutpin );
- //console_log( "info", "DISA pin: " + dtmf.digits + "\n" );
- }
-
- if (dtmf.digits == admin_pin || admin_pin.length == 0) {
-
- //console_log( "info", "DISA pin is correct\n" );
-
- us_ring = session.getVariable("us-ring");
- session.execute("set", "ringback="+us_ring); //set to ringtone
- session.execute("set", "transfer_ringback="+us_ring); //set to ringtone
- session.execute("set", "hangup_after_bridge=true");
-
- if (predefined_destination.length == 0) {
- dtmf.digits = ""; //clear dtmf digits to prepare for next dtmf request
- digitmaxlength = 11;
- session.streamFile( "/usr/local/freeswitch/sounds/custom/8000/please_enter_the_phone_number.wav", mycb, "dtmf");
- session.collectInput( mycb, dtmf, timeouttransfer );
- console_log( "info", "DISA Transfer: " + dtmf.digits + "\n" );
- session.execute("transfer", dtmf.digits + " XML default");
- }
- else {
- session.execute("transfer", predefined_destination + " XML default");
- }
-
- }
- else {
- session.streamFile( "/usr/local/freeswitch/sounds/custom/8000/your_pin_number_is_incorect_goodbye.wav", mycb, "dtmf");
- console_log( "info", "DISA Pin: " + dtmf.digits + " is incorrect\n" );
- }
-
- }