This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** | |
| * remotehintpoll.php | |
| * | |
| * Created by Lorne Gaetz lgaetz@sangoma.com | |
| * | |
| * Latest version: https://gist.github.com/lgaetz/8545099 | |
| * | |
| * Licensed under GNU GPL version 2 or any later verison. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; FreePBX Feature code prefix to allow spy/whisper/barge on | |
| ; the specified extension. | |
| ; | |
| ; Latest version: | |
| ; https://gist.github.com/lgaetz/78c4e114952e79596c1ed4123559d3d3 | |
| ; | |
| ; Usage: | |
| ; Dialplan goes in the file: | |
| ; /etc/asterisk/extensions_custom.conf | |
| ; Dial local extension with 556 prefix to spy. While spying on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; FreePBX dialplan to schedule a call for future using Asterisk call file. | |
| ; | |
| ; License: GNU GPL3+ | |
| ; latest version: https://gist.github.com/lgaetz/ec3509da8d989a00064337f194b9d58e | |
| ; | |
| ; Asterisk diaplan sub requires 3 arguments | |
| ; ARG1 = dialstring for first leg of call | |
| ; ARG2 = dialstring for second leg of call | |
| ; ARG3 = how many minutes in the future to schedule the call | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [send-sip-response-code] | |
| ; Context to send a specific SIP response code and terminate the channel | |
| ; Create Custom Destination in FreePBX with a dial string of the format | |
| ; send-sip-response-code,404,1 | |
| ; substitute the appropriate response code in place of the 404 | |
| ; Reference: https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings | |
| ; | |
| ; IMPORTANT: This dialplan is superseded by the native Asterisk applicaton PJSIPHangup | |
| ; | |
| ; latest version: https://gist.github.com/lgaetz/480582a1827cc98db1ee539c249f074b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # sendmail-bluemix | |
| # current verison of this script: https://gist.github.com/lgaetz/2cd9c54fb1714e0d509f5f8215b3f5e6 | |
| # | |
| # | |
| # Original source created by N. Bernaerts: https://github.com/NicolasBernaerts/debian-scripts/tree/master/asterisk | |
| # modified per: https://jrklein.com/2015/08/17/asterisk-voicemail-transcription-via-ibm-bluemix-speech-to-text-api/ | |
| # | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| if (!isset($argv[2])){ | |
| echo " | |
| ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** | |
| * | |
| * Script: lgaetz-dnd.php | |
| * | |
| * Latest version: https://gist.github.com/lgaetz/b350b9fa9ac18730150b387a1525aa4e | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Purpose | |
| ; FreePBX custom in-call feautre code framework that allows a caller to initiate an action that will be performed on hangup by | |
| ; pressing #9 during a call. Sets up feature code that adds a hangup handler to the channel, and the hangup handler can be used | |
| ; to record to the CDR userfield or perform some other action Possible uses are for flagging calls with audio issues. | |
| ; | |
| ; Latest version: https://gist.github.com/lgaetz/feaedc65a2f255bb4027e2b52efa8947 | |
| ; | |
| ; License GNU GPL3+ | |
| ; | |
| ; History 2021-11-03 First Commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php | |
| <?php | |
| // script requires a command - echo help and exit if arg1 | |
| if (!isset($argv[1])) { | |
| echo " | |
| *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
| * | |
| * Script: lgaetz-tctoggle.php | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| //test edit | |
| if((@include '/etc/freepbx.conf') === false){ | |
| echo "Failed to include configuration\r\n"; | |
| return; | |
| } | |
| $ariuser = \FreePBX::Config()->get('FPBX_ARI_USER'); | |
| $aripass = \FreePBX::Config()->get('FPBX_ARI_PASSWORD'); | |
| $ari = new Pest('http://localhost:8088/ari'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Asterisk dialplan sub that takes an Asterisk channel name and returns the matching FreePBX AMPUSER or null if no matching user | |
| ; | |
| ; License GNU/GPL3+ | |
| ; | |
| ; Latest Version: https://gist.github.com/lgaetz/1d75bab3c975f0b6b54071a7c7c07d6d | |
| ; | |
| ; Usage: When writing asterisk dialplan for fpbx, reference the subroutine and pass the channel name as ARG1 | |
| ; Channel name format follows something like PJSIP/4002-0000004f | |
| ; Example dialplan: | |
| ; exten => s,n,Gosub(get-AMPUSER-from-asterisk-channel,s,1(${DYNAMIC_WHO_ACTIVATED})) |
NewerOlder