Soundboard in the FORM tab (resolved)

All installation and configuration problems and questions

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

Soundboard in the FORM tab (resolved)

Postby thephaseusa » Fri May 11, 2018 7:04 am

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
Last edited by thephaseusa on Thu May 17, 2018 4:36 pm, edited 1 time in total.
thephaseusa
 
Posts: 345
Joined: Tue May 16, 2017 2:23 pm

Re: Script & Soundboard Iframe

Postby mflorell » Fri May 11, 2018 4:00 pm

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.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Script & Soundboard Iframe

Postby williamconley » Fri May 11, 2018 4:12 pm

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. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Script & Soundboard Iframe

Postby thephaseusa » Fri May 11, 2018 9:12 pm

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
thephaseusa
 
Posts: 345
Joined: Tue May 16, 2017 2:23 pm

Re: Script & Soundboard Iframe

Postby williamconley » Fri May 11, 2018 9:48 pm

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.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Script & Soundboard Iframe

Postby thephaseusa » Sat May 12, 2018 5:08 am

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
thephaseusa
 
Posts: 345
Joined: Tue May 16, 2017 2:23 pm

Re: Script & Soundboard Iframe

Postby blackbird2306 » Sat May 12, 2018 6:10 am

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
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
blackbird2306
 
Posts: 409
Joined: Mon Jun 23, 2014 5:31 pm

Re: Script & Soundboard Iframe

Postby thephaseusa » Sat May 12, 2018 6:45 am

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
thephaseusa
 
Posts: 345
Joined: Tue May 16, 2017 2:23 pm

Re: Script & Soundboard Iframe

Postby thephaseusa » Thu May 17, 2018 10:30 am

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
thephaseusa
 
Posts: 345
Joined: Tue May 16, 2017 2:23 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 118 guests