Tips and tricks for working with Scripts? Can they be popup?

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Tips and tricks for working with Scripts? Can they be popup?

Postby njr » Mon Feb 12, 2024 4:55 pm

(For those short on time, skip down to the bold text Main Question.)

After reading through both manuals, searching for every related forum comment, and trying to find youtube videos showing how a script normally functions in vicidial, I have come to the conclusion that I am definitely not sure what the intended/expected behavior is when it comes to the script tab.

For context, my (meaning management's) goal is to have the script pop up and for the agent to stay on the main agent screen.

The agent manual says
If it is set up by your manager, the SCRIPT tab may pop up
when a call comes to you, otherwise you can get to the SCRIPT tab by just clicking on the tab portion
at the top of your screen and you can go back to the main VICIdial screen by clicking on the VICIdial
tab at the top to the left of the SCRIPT tab.


To me this means that it will pop up in a new window. However, that is not the observed behavior and the script tab just becomes the active tab, meaning the main agent screen is no longer visible.
Is it supposed to be a pop up and I have messed with code somewhere else that prevents this, or is switching to the script tab the expected behavior?
I'm leaning toward the latter as this seems to coincide with what the manager manual states, where it is an "auto-switch".
This menu allows you to choose whether you want to auto-launch either of the
web-form pages in a separate window, auto-switch to the SCRIPT or FORM tabs, or do nothing


So, assuming that Get Call Launch - SCRIPT isn't the way to get me where I want to go, what other options are there? I mean I know I can just modify the agent screen to show the script as well, but that seems inconvenient in the case of future upgrades, etc.
I know I could write my own script page as well and launch it as a webform, but I was hoping to keep the script adding/editing that is already in vicidial so that others could add/change/delete scripts as needed.

I saw one mention in the forum, and found on the server, vdc_script_display.php which seems promising, but I couldn't find any documentation on which variables are required for it to function correctly (and it takes a lot of parameters, potentially, just browsing the code.) I tried sticking it in webformtwo and launching with a timer action after 1 second, which didn't seem to actually launch it. Clicking the button for webformtwo does as does setting Get Call Launch to webformtwo, but it is missing credentials by default. Both user and pass are blank in the params sent to the webform. I know there's the option to enable them in options.php, but if there is a way to avoid slinging passwords around in plaintext, that would be optimal.

Main Question
I can get the script to launch as a popup by setting web form two to
Code: Select all
VARhttps://myserver.com/agc/vdc_script_display.php?user=--A--user--B--&pass=--A--pass--B--&SCRIPTin_script=--A--in_script--B--
but it just shows the text, no background color, and generally is pretty ugly. I assume I can pass window sizes manually which may make it a bit better, I'm not sure yet.

Is this the way to do this? Am I using it wrong? Better yet, are there docs somewhere I just missed? I feel like I must be missing something.
Vicibox 11 from .iso installed/set up by Vicidial | Vicidial 2.14-900a Build: 231115-1636 | Asterisk 16.30.0-vici | 10-server cluster (1 primary DB, 1 primary web, 8 asterisk) in Colo DC | OpenSIPS on web as LB | 10x Dell R740XD
njr
 
Posts: 14
Joined: Fri Dec 08, 2023 1:41 pm

Re: Tips and tricks for working with Scripts? Can they be po

Postby RBecker » Wed Mar 27, 2024 7:42 am

Short answer: no. The script functionality works exactly as you've described, which is that it will change the tab of the agent screen to the Script tab when configured to do so. If your concern is agents needing info from the customer tab while also viewing the script, you can include any lead variable in the script itself using the --A--/--B-- parameters like you did for the URL. This also appears in the script editor in a drop down menu for fields you can use.
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 42
Joined: Mon Aug 30, 2021 3:05 pm

Re: Tips and tricks for working with Scripts? Can they be po

Postby njr » Thu Mar 28, 2024 2:11 pm

Thanks for the response! Glad to confirm things do indeed work the way I was thinking.
We ended up just making a customization.
Image
Vicibox 11 from .iso installed/set up by Vicidial | Vicidial 2.14-900a Build: 231115-1636 | Asterisk 16.30.0-vici | 10-server cluster (1 primary DB, 1 primary web, 8 asterisk) in Colo DC | OpenSIPS on web as LB | 10x Dell R740XD
njr
 
Posts: 14
Joined: Fri Dec 08, 2023 1:41 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 211 guests