Start a new topic
Answered

API Question

Hi Guys, 


I have had to log a dev question for Lan Logix. we did some custom dev for them to put our platform in their app. They have the following questions. 


This is a technical question which I hope you or a Euphoria resource will be able to answer.

You allow multiple lines to be handled by the soft phone. This is the case, for instance, when one call is on hold while the user is busy talking on another line. In this scenario, the user should be able to hang up or put on hold the ongoing call, or put off hold the other call. However, Euphoria’s Javascript AgentWorkspace JS API does not provide operations that allow us to put on hold, put off hold or hang up a specific line.

- To hang up a call we usePhone.HangUpCall()
- To Put a call on hold we usePhone.HoldCall()
- To put a call off holdPhone.UnHoldCall()
I would appreciate it if you could assist us finding out how one can change the active/current line so that the operations above can be executed on the line of our choice.

Thanks in advance for your help.


Best Answer

Hi Paul!


The AttendedTransfer method can accept the following arguments:

Phone.AttendedTransfer(destinationNumber, callLine);

The callLine argument is the callLine Object which contains all the variables related to a call as described in the documentation.

You can get this callLine object either by calling Phone.GetCurrentLine(); which will return the object for the latest or current call.

However in your case you might want to use Phone.FindLineByID(callId);, to get the object by the callId.

The AttendedTransfer method of course returns an object on which you can just call Confirm() or Cancel() as per the documentation.


I really do apologize for the poor documentation. This library was originally only written for ourselves, but we have it on the cards to improve this library as well as the documentation.

But feel free to ask if you have any more questions.


Chiao!


Answer

Hi Paul!


The AttendedTransfer method can accept the following arguments:

Phone.AttendedTransfer(destinationNumber, callLine);

The callLine argument is the callLine Object which contains all the variables related to a call as described in the documentation.

You can get this callLine object either by calling Phone.GetCurrentLine(); which will return the object for the latest or current call.

However in your case you might want to use Phone.FindLineByID(callId);, to get the object by the callId.

The AttendedTransfer method of course returns an object on which you can just call Confirm() or Cancel() as per the documentation.


I really do apologize for the poor documentation. This library was originally only written for ourselves, but we have it on the cards to improve this library as well as the documentation.

But feel free to ask if you have any more questions.


Chiao!

Hi Pieter, please see below follow-up query:


The below works perfectly, thanks. 

I have a follow-up question which doesn’t seem to have been covered here. The function below is the one used to launch an attended transfer. As you can see, per the documentation we were provided, it only accepts the new extension as a parameter. Can we also pass in the call ID as well to transfer a specific call? If not what means can we used to specify what call we would like to transfer?

 

Phone.AttendedTransfer(newExtension)

 

We ventured to add a line id to the function call to no avail (see below).
attendedTransfer = Phone.AttendedTransfer(newExtension, lineId);


Many thanks for your assistance.

Hi Aidan!

A lot of these methods allow the passing of an ID in order to perform the operation on a specific call/line.
Each call gets stored as an object. This object contains a lot of information related to the call such as id, destination number, status, duration, active, etc.
After making or accepting a call, you can get this object by calling the following method to get the latest call details:
Phone.GetCurrentLine()
In order to get a list of current or historic(limited) call objects use the following method:
Phone.GetCallLines()

Here are the examples of the methods mentioned:
Phone.HangUpCall(callId)
Phone.HoldCall(callId)
Phone.UnHoldCall(callId, dontBuildActiveTab, holdOtherCalls). Note: The second argument should be true by default. This argument will fall away at some point. The 3rd argument will in most cases also need to be set to  true in order to place the remaining active calls on hold.


Hope this helps.
Chiao!

Login or Signup to post a comment