Created
June 14, 2018 02:03
-
-
Save gitlarryf/90f793330a9c98bd35ecedee5238c948 to your computer and use it in GitHub Desktop.
3CX Phone system Command Line Controller
This file contains 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
@ECHO OFF | |
SETLOCAL | |
SET TCX="C:\ProgramData\3CXPhone for Windows\PhoneApp\CallTriggerCmd.exe" | |
SET Away=561 | |
SET Custom1=562 | |
SET Available=563 | |
SET Exceptions=564 | |
SET CustomHours=565 | |
SET Custom2=566 | |
SET OutOfOffice=567 | |
IF /I "%1"=="lunch" GOTO:Lunch | |
IF /I "%1"=="ready" GOTO:Ready | |
IF /I "%1"=="logout" GOTO:Logout | |
IF /I "%1"=="login" GOTO:Login | |
IF /I "%1"=="queue" Call:Queue 1 | |
IF /I "%1"=="dial" Call:Dial %1 %2 %3 %4 %5 | |
:Unknown | |
echo. | |
echo %1 is an unknown or invalid 3CX command! | |
echo. | |
goto:End | |
:End | |
ENDLOCAL | |
goto:eof | |
:Lunch | |
%TCX% --set-active-profile=%Away% | |
goto:end | |
:Ready | |
%TCX% --set-active-profile=%Available% | |
goto:end | |
:Logout | |
Call:Queue 0 | |
%TCX% --set-active-profile=%OutOfOffice% | |
goto:end | |
:Login | |
Call:Queue 1 | |
goto:Ready | |
:Queue | |
%TCX% --queue=%1 | |
goto:End | |
:Dial | |
shift | |
%TCX% --call="%1 %2 %3 %4 %5 %6 %7 %8 %9" | |
goto:End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment