Page 1 of 1

How to transfer a call from iframe?

PostPosted: Wed Sep 26, 2012 2:12 am
by pahonen
Hi,

I'm building a contact management system to be run in an iframe within ViciDial agent screen.

The idea is that an incoming call launches the contact management system which then fetches the needed data (answering phrase, relevant contact info, etc) by the ingroup the call was received to.

This works fine, now I need to make the call transfers to work in a way or another from my application.

Looking at the agc/vicidial.php, it seems that it could be possible to launch the javascript to open the "transfer conference functions" form and then fill the "number to call" field, but I'm not quite sure which javascript function(s) to call?

I gave a quick try to call the function custom_button_transfer(), it did not seem to do the trick..

Any ideas on this?

Thanks in advance!

Re: How to transfer a call from iframe?

PostPosted: Wed Sep 26, 2012 5:36 am
by mflorell
admin.php version and build?

Re: How to transfer a call from iframe?

PostPosted: Wed Sep 26, 2012 5:43 am
by pahonen
Ah, sorry.
VERSION: 2.6-375a
BUILD: 120831-1523

Re: How to transfer a call from iframe?

PostPosted: Wed Sep 26, 2012 8:16 am
by pahonen
Okay, now I checked this again, and it seems that the browser (Firefox 15 at least) blocks javascript calls from an external domain.
When I called custom_button_transfer() from an iframe which loaded its content from the same server everything worked just fine, the xfer form was opened and the number to call was filled for me.

I guess it's got something to do with preventing XSS attacks.. Now I just need to find a way around this.

Re: How to transfer a call from iframe?

PostPosted: Wed Sep 26, 2012 10:44 pm
by williamconley
or use the agent api ... does that have transfer capability yet? (writing a new api function isn't that difficult by comparison to what you are already doing ...)

Re: How to transfer a call from iframe?

PostPosted: Tue Nov 06, 2012 10:51 pm
by williamconley
Apparently it does. One of my clients is now using a non-Vicidial system which pops up in a script iframe specifically to transfer calls to the appropriate places. They have even had the hangup customer button removed from the agent screen so the agent must use their new interface. (The transfer-conf button still provides a measure of safety with the hangup all button, but now they want that logged to be sure it isn't abused ... which is where I come in.)