Pass CALLER_ID to a URL once getting Call on Avaya - avaya

Whenever we get a call on Avaya, I need Avaya or 3rd party App to call a URL / API and pass the CALLER_ID AND EXT_ID to that API. e.g,
myCRM.com/{CALLER_ID}/{EXT_ID}
myCRM.com/01132899470/777

You did not reveal too much detail about your setup.
If you have AES server then you can write a TSAPI/JTAPI/DMCC client application that can monitor the stations/VDNs and call the URL with relevant parameters wherever it is appropriate for you (DELIVERED, ESTABLISHED events).
You can read about AES if you are not familiar with it:
https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/overview/index.gsp
Here you can read about the interfaces AES provide:
https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/interfaces/index.gsp

Related

Google Cloud Storage Transfer - Python method for getting status of TransferOperation

There does not appear to be any method in the Python client API for Google's storage transfer service that checks the status of an ongoing transfer operation. There is get_transfer_job, which shows the status of a transfer job itself (and gives the latest operation name). But I can't find any way of getting the status of an actual operation, which is critical.
I know other languages' client APIs (including at least Go and node.js) have this functionality. It may be possible to use a naked REST API request, but we're running into authentication issues. Is there any other way that I'm missing? Any way to call the TransferOperation type directly (such as client.TransferOperation(<transfer_operation_name>)?
There is method available for the same which you can use in the following manner.
GetTransferJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Reference Link - Class GetTransferJobRequest

Best practice: Is it better to receive data via doPost(e) or google.script.run.someFunction(data)?

I'm making an application that can pass form from a web page to a Google spreadsheet. I've found a two basic ways how to do that:
1) I submit a form on a web page and then I process an event via doPost(e) -> JSON.stringify(e). (This is in "code.gs".)
or
2) I make a function i.e. "writeToCellA1()" and call it as follows google.script.run.writeToCellA1(someData). (This is in "index.html")
The question is: Is there some background of those two possible ways of writing data to Google spradsheet that suggests that one of them is superior? Safer, more raliable, more promising future functions developement etc....
If you use doPost, you have to determine what actual function to call by inspecting the payload, since all input from the client is going to this single entry point. All function parameters have to be object-based (i.e. named). Unless you use asynchronous methods to connect, you will block your client code. Further, any response you receive will be either ContentService or HtmlService.
If you use the google.script.run pattern, your calls can be directed to a specific server function, you can easily specify function parameters in traditional manners (i.e. both positional and object-based), your calls are guaranteed to be asynchronous, and you can return most serializable data types directly.
There is additionally an access argument - doPost is available to any sufficiently authorized client, perhaps even anonymous, per the settings of your published web app. This could be external code that you or others write, e.g. a php script. Calls made via google.script.run are only available from a page served by HtmlService (you can use the Apps Script API to target individual functions from external code). Note that you are not required to publish as a webapp to use google.script.run - i.e. you can use these in sidebars and modal dialogs, too.
There is also the manner of error / response handling. If you want to add success and failure callbacks for these calls to doPost, you will need to do more work than if you want to do the same for calls with google.script.run - the latter supports easily adding these with two methods, withSuccessHandler and withFailureHandler.
Regardless, you should review the official documentation for these topics:
doPost
web apps
Client-server communication

Is it possible to send twiml content rather than pointing to a URI when initiating a Twilio call

When i make a call as voice content to that call, can i send a dynamically generated twiml message rather pointing to a URI that contains twiml message ?
If not is there a a workaround to accomplish this , cause I see DIAL and SAY APIs which get used during call response, so would it be possible to make use of those when creating a new call and passing twiml messages using these APIs ?
https://www.twilio.com/docs/api/twiml/dial
https://www.twilio.com/docs/api/twiml/say
Twilio evangelist here.
Its not possible to send TwiML to the REST API. If you don't want to host the TwiML on your own URL there are a few options:
Use TwiML Bins which lets you host relatively static (there is some templating support) TwiML on Twilios servers.
Use Twilio Functions which let you write, store and execute Node on Twilios servers
Use Twilio Studio to define your call flow. A flow in studio can be triggered via an HTTP request to it, so you can take the flows URL and pass it to the REST API when you start your outbound call.
Hope that helps.

What is the difference between using Action.async and WS

I suppose both Action.async and WS (for web services) in Play Framework are based on HTTP and are used to receive HTTP requests and send HTTP responses. Both I suppose are asynchronous and can accept/reply JSON. Action.async could probably send back HTML as well in Response.
So are the two interchangeable if I want to create a micro-service (or a REST API)? Could I use either of them? I saw an example in which a user was added using Action but the list of user’s friends was retrieved using WS.
From Play documentation, it seems WS should be used when calling a HTTP from within the play application. Not sure why though.
‘Sometimes we would like to call other HTTP services from within a Play application. Play supports this via its WS library, which provides a way to make asynchronous HTTP calls through a WSClient instance.’

get referring url from my rest api

I am building a rest api in mvc. When consuming the API, I need to be able to get the referring URL that is calling the service. I have tried Request.UrlReferer and it comes back null. How can I get the url that is consuming the service?
Are you sure you don't mean in the consumer you need to know the referer of the client making the REST call?
If this is the case what you need to do is look at the request header and extract from it the Referer.

Resources