Page 1 of 1
Soundboard in the FORM tab (resolved)
Posted:
Fri May 11, 2018 7:04 am
by thephaseusa
When I prepopulate values in a script they show properly:
JOHN PUBLIC
1234 Main St.
Apt. 3
CHICAGO IL33760
7275551212
When I prepolulate values in a script where an iframe exists, + signs pop up in values:
JOHN PUBLIC
1234+Main+St.
Apt.+3
CHICAGO IL33760
7275551212
Is there a way to correct this? One way I see is to make another iframe that will display the customer info in a script.
Another way I could solve what I'm trying to do would be to put a soundboard iframe into a custom field list. I see the instructions say you can put elements of an iframe in a custom field. I tried the standard soundboard iframe language, ie :
<iframe src="./vdc_soundboard_display.php?user=--A--user--B--&pass=--A--pass--B--&bcrypt=OFF&soundboard_id=test" style="background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" width="100%" height="500"> </iframe>
How would I change this code to make it work in a custom field?
What I am trying to do is get a script and soundboard working on the same tab, whether it’s the script tab or the form tab. Form would be ideal because the sale info gets filled out on that tab.
Thanks
John M
Re: Script & Soundboard Iframe
Posted:
Fri May 11, 2018 4:00 pm
by mflorell
This is a known issue, parsing the contents of a SCRIPT to only make the portions within an IFRAME declaration is complex and will take a lot of troubleshooting, and since we have not had a client sponsor that time yet, it hasn't been prioritized.
Re: Script & Soundboard Iframe
Posted:
Fri May 11, 2018 4:12 pm
by williamconley
thephaseusa wrote:When I prepopulate values in a script they show properly:
JOHN PUBLIC
1234 Main St.
Apt. 3
CHICAGO IL33760
7275551212
When I prepolulate values in a script where an iframe exists, + signs pop up in values:
JOHN PUBLIC
1234+Main+St.
Apt.+3
CHICAGO IL33760
7275551212
I'm a bit unclear: Where is this showing? In a web page in an iframe or in the iframe itself?
Note that you can always put a php page in the iframe, and put ANOTHER iframe inside that iframe which gives you full control over how that data is transferred, independently of the original iframe page. Then you have to do the work instead of waiting for The Vicidial Group to do it, but you can do it NOW in a way that will survive any later edits by TVG.
Re: Script & Soundboard Iframe
Posted:
Fri May 11, 2018 9:12 pm
by thephaseusa
So far what i’ve done is 1. Put a php script at the top of the page which displays the call by querying asterisk. 2. Under it I typed the sales pitch which displays fine, and 3. At the bottom is a script with a sound board. My idea was to have a couple of avatar audio files an agent could use during a call.
Still the best solution for me would be to have that soundboard at the bottom of the FORM tab, where we generally sit on our calls, and can enter sales info for customers. So far I haven’t been able to get a field in the form to display a soundboard, asterisk says unable to exectute. I have 1 script in all my custom list fields in the FORM tab, which uses a php page to display customer payment history. That’s an iframe too and a script. But it seems the soundboard iframe script wont add as a custom field. Is this possible?
JOhn
Re: Script & Soundboard Iframe
Posted:
Fri May 11, 2018 9:48 pm
by williamconley
I don't think that's possible yet without modifying the PHP form being called or modifying Vicidial.php to add a 2nd iframe beneath the form iframe within the same div.
Re: Script & Soundboard Iframe
Posted:
Sat May 12, 2018 5:08 am
by thephaseusa
Thanks. Still I was able to accomplish what I wanted.
Instead of having a tab, the Script Tab, where only a soundboard was visible, I added a php script at the top of the page to show the customer info for the current call, under that the language of the sales script, and at the bottom of the page a soundboard.
Just have to switch from Script to Form to write sales. Which is no big deal at all. But, have you heard the stories from agents about what happens to them when they attempt to move from tab to tab? Strange and incredible wonders occur))))
For example, “well I tried to click on the Form Tab, and all of a sudden....................”.
JM
Re: Script & Soundboard Iframe
Posted:
Sat May 12, 2018 6:10 am
by blackbird2306
Sure it's possible to add the soundboard into form tab without changes or only slight changes. Go this way:
1. add a new custom field with your wished field rank
2. field type --> script
3. field options (copy this and change width and soundboard_id to fit):
- Code: Select all
<iframe src='./vdc_soundboard_display.php?user=--A--user--B--&pass=--A--pass--B--&bcrypt=OFF&soundboard_id=TEST1' style='background-color:transparent;' scrolling='auto' frameborder='0' allowtransparency='true' width='90%' height='500'></iframe>
4. The "--A--pass--B--" variable is empty and not present, because it's not global in a called function. To make it global change "functions.php" in "srv/www/htdocs/agc" directory and add one line (about line 324 newest code):
- Code: Select all
##### BEGIN custom_list_fields_values - gather values for display of custom list fields for a lead #####
function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id,$did_id,$did_extension,$did_pattern,$did_description,$dialed_number,$dialed_label)
{
global $pass; // add this line
$STARTtime = date("U");
...
5. If you don't want to make changes in the code, then replace "--A--user--B--" and "--A--pass--B--" with a universal predefined user and password
Re: Script & Soundboard Iframe
Posted:
Sat May 12, 2018 6:45 am
by thephaseusa
Hey that’s what I was looking for! Thank you very much! I’ll give it a try this morning.
And it worked! When I added the global $pass line the soundboard complained about an empty password, but when I added a user pass directly into the soundboard iframe script it worked. Funny, the only difference between your code and the standard code for soundboard iframes was you used single quotes instead of double quotes. Thank you very much Blackbird!
By the way your fix for the dtmf button works like a charm, and I added it to the issue tracker.
John
Re: Script & Soundboard Iframe
Posted:
Thu May 17, 2018 10:30 am
by thephaseusa
Hi Blackbird,
I spoke too soon. I got the soundboard working in the FORM tab using a specific user/pass. When I tried changing the functions.php file, i get a blank password error. And when I use the specific user/pass it works for that user, but for other users the board is there, but the sound doesnt play.
When you wrote a universally predefined user/pass I assumed that would be an administrator with all permissions enabled. Is there a different way to set a predefined universal user/pass?
My bad! I changed the functions.php file on the sound server, and not on the web server. Changed it on the web server, soundboard works perfectly on the FORM tab.
Thanks Blackbird! You're good!
Thanks again,
John Merritt
http://www.leaveyourbody.com