Difference between revisions of "AlphaWeb Custom Scripts"
From Zenitel Wiki
m (→Test Scripts) |
(→Test Scripts) |
||
(10 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
These scripts will typically implement 'Click to Call' applications. | These scripts will typically implement 'Click to Call' applications. | ||
− | The Custom Scripts page is protected by a 'Custom Script User' which can only access the Custom Scripts page. On the ICX and AlphaCom software as from version 13.1.3.1, only the '''Custom Scripts - Security''' subpage will be visible, also see [[AlphaWeb_Custom_Scripts#Uploading_scripts|Uploading scripts]]. | + | The Custom Scripts page is protected by a 'Custom Script User' which can only access the Custom Scripts page. On the ICX-AlphaCom and AlphaCom XE software as from version 13.1.3.1, only the '''Custom Scripts - Security''' subpage will be visible, also see [[AlphaWeb_Custom_Scripts#Uploading_scripts|Uploading scripts]]. |
− | Default login: | + | Default login (ICX-AlphaCom): |
+ | *User: scripter | ||
+ | *Passwd: alphascripter | ||
− | + | Default login (AlphaCom XE): | |
− | + | *User: scripter | |
+ | *Passwd: alphascript | ||
[[File:CustomScripts.PNG|thumb|left|500px|Example: Custom Scripts]] | [[File:CustomScripts.PNG|thumb|left|500px|Example: Custom Scripts]] | ||
Line 16: | Line 19: | ||
== Uploading scripts == | == Uploading scripts == | ||
− | On ICX and on AlphaCom as from software version 13.1.3.1 it is no longer possible to upload scripts via the Custom Scripts page. Scripts can only be uploaded by using software like WinSCP, connected via port 22 to the ICX or AlphaCom. | + | On ICX-AlphaCom and on AlphaCom XE as '''''from software version 13.1.3.1 it is no longer possible''''' to upload scripts via the Custom Scripts page. Scripts can only be uploaded by using software like WinSCP, connected via port 22 to the ICX-AlphaCom or AlphaCom XE. Log in using WinSCP with the scripter credentials will bring you directly to the directory to which the scripts can be uploaded. Remember to open port 22 in the filter page before attempting to upload. It is advisable to disable port 22 again once finished with the upload process.<br> |
On older software versions, use the '''Upload file''' field, as depicted above, to upload the custom scripts. | On older software versions, use the '''Upload file''' field, as depicted above, to upload the custom scripts. | ||
== Test Scripts == | == Test Scripts == | ||
− | This paragraph is not relevant for ICX and AlphaCom >= 13.1.3.1. <br> | + | <b>This paragraph is not relevant for ICX-AlphaCom and AlphaCom XE >= 13.1.3.1.</br></b> |
A base script package is included by default. If you log on to the '''Custom Scripts''' menu in AlphaWeb, and do a '''select''' on the script, a description and list of all possible URI parameters will appear (this information is based on a header within the script). The script package includes the script '''call_handle.php''' which can be used to set up calls. | A base script package is included by default. If you log on to the '''Custom Scripts''' menu in AlphaWeb, and do a '''select''' on the script, a description and list of all possible URI parameters will appear (this information is based on a header within the script). The script package includes the script '''call_handle.php''' which can be used to set up calls. | ||
Line 76: | Line 79: | ||
Here are some examples on using the default '''call_handle.php''' script. From an internet browser, simply enter the following URL in the address field: | Here are some examples on using the default '''call_handle.php''' script. From an internet browser, simply enter the following URL in the address field: | ||
− | Set up a call from 101 to 102: | + | * '''Set up a call from 101 to 102''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&to=102</nowiki> |
− | + | * '''Press M-key on 101''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&mkey=PRESS</nowiki> | |
− | + | * '''Release M-key on 101''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&mkey=REL</nowiki> | |
− | Press M-key on 101: | + | * '''Press C-key on 101''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&ckey=PRESS</nowiki> |
− | + | * '''Activate DAK key 4 on 101''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&dial_dak=4</nowiki> | |
− | + | * '''Activate group call 85 from station 101''': <nowiki>http://10.9.101.30/cmd/call_handle.php?from=101&group=85</nowiki> | |
− | Release M-key on 101: | ||
− | |||
− | |||
− | Press C-key on 101: | ||
− | |||
− | |||
− | Activate DAK key 4 on 101: | ||
− | |||
− | |||
− | Activate group call 85 from station 101: | ||
− | |||
The AlphaCom IP address in these examples are 10.9.101.30. | The AlphaCom IP address in these examples are 10.9.101.30. |
Latest revision as of 12:43, 14 June 2024
The Custom Scripts allows end users to make and upload their own web pages and php scripts. These scripts will typically implement 'Click to Call' applications.
The Custom Scripts page is protected by a 'Custom Script User' which can only access the Custom Scripts page. On the ICX-AlphaCom and AlphaCom XE software as from version 13.1.3.1, only the Custom Scripts - Security subpage will be visible, also see Uploading scripts.
Default login (ICX-AlphaCom):
- User: scripter
- Passwd: alphascripter
Default login (AlphaCom XE):
- User: scripter
- Passwd: alphascript
Uploading scripts
On ICX-AlphaCom and on AlphaCom XE as from software version 13.1.3.1 it is no longer possible to upload scripts via the Custom Scripts page. Scripts can only be uploaded by using software like WinSCP, connected via port 22 to the ICX-AlphaCom or AlphaCom XE. Log in using WinSCP with the scripter credentials will bring you directly to the directory to which the scripts can be uploaded. Remember to open port 22 in the filter page before attempting to upload. It is advisable to disable port 22 again once finished with the upload process.
On older software versions, use the Upload file field, as depicted above, to upload the custom scripts.
Test Scripts
This paragraph is not relevant for ICX-AlphaCom and AlphaCom XE >= 13.1.3.1.
A base script package is included by default. If you log on to the Custom Scripts menu in AlphaWeb, and do a select on the script, a description and list of all possible URI parameters will appear (this information is based on a header within the script). The script package includes the script call_handle.php which can be used to set up calls.
The script call_handle.php will have the following URI:
http://{ip-address}/cmd/call_handle.php?{uri-params}
If enabled secure http transfer can be used_
https://{ip-address}/cmd/call_handle.php?{uri-params}
You can also upload/download your own scripts, html documents and pictures for the documents if needed.
All script uploaded will be placed in the webfolder /cmd/.
AlphaScript Header
This has to be put in the script within a comment block. AlphaWeb will parse this header and present the information when the script is selected. AlphaWeb will also generate a input form with all possible URI parametrs to help test the script.
Alphaweb will parse the text between '<-AlphaScriptComment-' and '-AlphaScriptComment->'. The comment '*' will be removed by AlphaWeb.
AlphaScriptComment Tags:
- --Description--
All text until next is presented a general description of the script. Html syntax can be included - --URI_PARAM_N name=xx opt=xx input=xx
All these will be put in input table form. name is the URI parameter name, opt tells if the field is required/optional, input is string describing the input value type. - --TEST_WINDOW width=nnn hight=nnn--
A test link will be generated from the URI input values. The test window will be open in a new browser window with width and height from this tag.
AlphaScriptComment Example:
/* <-AlphaScriptComment- * --Description-- * This script do call handling on a sub-station. * All operations targets one station addressed by its directory number. * * Syntax examples: * From station 101 to station 102: * call_handle.php?from=101&to=102
* From station 1001 in node 1 to station 1001 in node 2: * call_handle.php?from=(1)1001&to=(2)1001
* * --URI_PARAM_1 name=from opt=required input=INT-- * --URI_PARAM_2 name=to opt=optional input=INT-- * --URI_PARAM_3 name=conf opt=optional input=INT-- * --URI_PARAM_4 name=group opt=optional input=INT-- * --URI_PARAM_5 name=mkey opt=optional input={PRESS,REL}-- * --URI_PARAM_6 name=ckey opt=optional input=INT-- * --URI_PARAM_7 name=dial_digit opt=optional input=INT(*INT*INT)-- * --URI_PARAM_8 name=single_digit opt=optional input={P,R}INT(*INT*{P,R}INT)-- * --URI_PARAM_9 name=dial_dak opt=optional input=INT-- * --TEST_WINDOW width=600 hight=200-- * * -AlphaScriptComment-> */
Examples
Here are some examples on using the default call_handle.php script. From an internet browser, simply enter the following URL in the address field:
- Set up a call from 101 to 102: http://10.9.101.30/cmd/call_handle.php?from=101&to=102
- Press M-key on 101: http://10.9.101.30/cmd/call_handle.php?from=101&mkey=PRESS
- Release M-key on 101: http://10.9.101.30/cmd/call_handle.php?from=101&mkey=REL
- Press C-key on 101: http://10.9.101.30/cmd/call_handle.php?from=101&ckey=PRESS
- Activate DAK key 4 on 101: http://10.9.101.30/cmd/call_handle.php?from=101&dial_dak=4
- Activate group call 85 from station 101: http://10.9.101.30/cmd/call_handle.php?from=101&group=85
The AlphaCom IP address in these examples are 10.9.101.30.
Security Configuration
In AlphaWeb, go to Custom Scripts > Security. Here you can configure access rights for running scripts.
You can define if a username/password is required in order to run scripts, you can add a list of valid hosts that have access to run scripts.
Default credentials:
Login: script Passwd: script
Choose ACCESS Rule:
- Select allow to allow global access to the scripts
- Select deny and add specific hosts; Scripts can now only be started if the command originates from a host in the list
When adding hosts that are allowed access, you can choose a define a complete subnet, or individual hosts. Example:
- Enter 10.5.101, and all hosts on the 10.5.101.x subnet will have access
- Enter 10.5.101.134, and only this host wil have access