02-10-2021 10:22 PM - last edited on 02-11-2021 08:49 AM by dekwan
Hey can you help me I am getting problem to code transfer call action i tried to use https://github.com/CiscoDevNet/finesse-sample-code/tree/master/ClickToCallSampleGadget api but unfortunately it is a consult call api i want to directly transfer my call to a certain extension how do i code that ?
Solved! Go to Solution.
02-12-2021 02:01 PM
Hi,
I think you are misunderstanding what I am saying. In the HTML, you only need to pass in the from and the to. The onClick function finesse.modules.SampleGadget.initiateDirectTransfer is mapped to a method in the return clause of the js file, which you would have to add. You will also need to define an initiateDirectTransfer function up top that calls currentDialog.initiateDirectTransfer(mediaAddress, toAddress, handlers) with the appropriate handlers (success and error).
Thanx,
Denise
02-11-2021 08:52 AM
Hi,
Please create a new post rather than reply to an existing thread when it is a new topic. This helps users follow the discussion rather than being intertwined with another unrelated topic.
If you are trying to do a direct transfer, you want to use the direct transfer API which you can find here: https://developer.cisco.com/docs/finesse/#!rest-services-dialog/initiatedirecttransfermediaaddress-toaddress-handlers
Thanx,
Denise
02-11-2021 09:18 AM
Hey Sorry will definitely create a new discussion for the new topic next time.
Yes i saw this api still didnt got the idea of how to code as im new to this can you help me with the code im using uccx 11.6.
02-11-2021 11:52 AM
Hi,
I would recommend taking a look at the UpdateCallVariableSampleGadget (https://github.com/CiscoDevNet/finesse-sample-code/tree/master/UpdateCallVariableDataSampleGadget) instead because it shows how to use a dialog object which is what you need to use the initiateDirectTransfer method. You basically have to create a variable to keep track of the active call. Then call the initiateDirectTransfer method when the button is pushed.
Thanx,
Denise
02-11-2021 12:11 PM
How to keep track of the active call can you type the part that you trying to say it would be really helpful!
02-11-2021 01:56 PM
Hi,
Take a look at the currentDialog variable in the UpdateCallVariable sample gadget.
Thanx,
Denise
02-11-2021 05:56 PM
02-12-2021 08:47 AM
Hi,
The initiateDirectTransfer(mediaAddress, toAddress, handlers) method that I had linked (https://developer.cisco.com/docs/finesse/#!rest-services-dialog/initiatedirecttransfermediaaddress-toaddress-handlers) is part of the Finesse JavaScript library that handles the REST API request to do a single step transfer. This method is available as part of the dialog object, which needs to be called on the active dialog object.
You need to copy all the code from the UpdateCallVariableSampleGadget that pertains to the currentDialog being set. Then in your equivalent updateCallVariable method, you need to check that the currentDialog is set. If so, call currentDialog.initiateDirectTransfer(mediaAddress, toAddress, handlers)
I hope that helps.
Thanx,
Denise
02-12-2021 12:46 PM
Thanks denise i did what you say but it gives an error im wondering what to pass in as handlers in button this is what im doing
i need to innitiate the call from 2205 extenstion to 2207 extenstion
Uncaught ReferenceError: handlers is not defined
at HTMLButtonElement.onclick
02-12-2021 02:01 PM
Hi,
I think you are misunderstanding what I am saying. In the HTML, you only need to pass in the from and the to. The onClick function finesse.modules.SampleGadget.initiateDirectTransfer is mapped to a method in the return clause of the js file, which you would have to add. You will also need to define an initiateDirectTransfer function up top that calls currentDialog.initiateDirectTransfer(mediaAddress, toAddress, handlers) with the appropriate handlers (success and error).
Thanx,
Denise
02-13-2021 08:17 AM
Thanks alot it worked!
02-15-2021 08:58 AM
Great! I'm glad you were able to figure it out.
08-15-2022 04:18 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide