Plivo getting UUID of call recording - plivo

I'm using the following code to dial out and record the call.
<Response>
<Record action="http://foo.com/get_recording/" startOnDialAnswer="true" redirect="false" />
<Dial>
<Number>15551234567</Number>
</Dial>
However, the action url http://foo.com/get_recording/ receives only the following parameters, which does not include the UUID of the call. So I do not know which uuid does the call recording file belong to.
callbackUrl Request Parameters
The following parameters are sent to the callbackUrl
Parameter Description
RecordUrl Complete path to the recorded file URL.
RecordingDuration Duration of recording in seconds.
RecordingDurationMs Duration of recording in milliseconds.
RecordingStartMs When the recording started (epoch time UTC) in milliseconds.
RecordingEndMs When the recording ended (epoch time UTC) in milliseconds.
RecordingID Recording ID of the file.
Any help on associating uuid with record_id would be appreciated. Tried writing to support but still awaiting an answer.

A simple trick!
Before you return the Dial XML, try capturing the callUUID in the request param you receive and append it with record action URL like a GET param dynamically. make your action method as GET
<Response>
<Record action="http://foo.com/get_recording/?callUUID=<uuid>" startOnDialAnswer="true" redirect="false" />
<Dial>
<Number>15551234567</Number>
</Dial>

Plivo Sales Engineer here.
Call UUID is present in the Answer URL that returns your XML (Record and Dial) and the Recording ID is present in the Record action and Record callback URL. You could use the Get Recording API to link a Call UUID to a Recording ID.

Related

My test works in Jmeter but not in Azure Load Testing

I've defined a test on Jmeter which works correctly on Jmeter on my pc, but it doesn't work when I run it Azure Load Testing.
My test is very simple: it performs a POST request towards Azure AD (https://login.microsoftonline.com/TenantID/oauth2/token?api-version=1.0) with a body like the following one in order to retrieve a token:
"grant_type" = "client_credentials";
"resource" = "$resource";
"client_id" = "$APPID";
"client_secret" = "$ClientSecret"
JMeter parameters for the POST call
When I perform the call from my PC, it works and I'm then able to use the token to perform some other calls (not relevant here).
When I perform this single call on Azure Load Testing with my jmx file, the calls fails with a 400 (Bad request), as if my request was malformed.
When I download the results of the test, I get the following csv:
timeStamp elapsed label responseCode responseMessage threadName dataType success failureMessage bytes sentBytes grpThreads allThreads URL Latency IdleTime Connect
1.67602E+12 147 Get token 400 Bad Request 172.18.19.5-Setup Authentication 1-1 text FALSE 925 1119 1 1 https://login.microsoft.com/*tenantID*/oauth2/v2.0/token 144 0 107
where tenantID reflects the actual tenant ID.
In order to troubleshoot it, I've tried to replace the values of the tenand id with the values of client id, scope and secret and they show up correctly in the log file when I execute the test.
Also, in my AAD logs I don't see my login attempts, probably because of the 400 - Bad request code, as if my request was somehow malformed, so it doesn't get logged.
I've no idea how I could troubleshoot this further (e.g. can I somehow trace the parameters of the POST call Azure Load Testing is doing?). Any suggestions?
thanks for your help,
Marco

Not Receiving Response Data (Body or Header) in ISO 8583 using JMeter

I am trying to send ISO 8583 Message Request through JMeter and getting
(channel/HOSTNAME:POST) [receive] In: 1210 000001 in JMeter Logs
I have left all the fields empty for Response Validation like Timeout and Success Response Field so that no validation rule is applied on response.
But I am not receiving anything in the Response Body or Header through Listener.
Any Idea how can I get the response in Response Body Also.
JMeter doesn't display response because it doesn't receive the response and we are not telepathic enough to guess why doesn't JMeter receive the response with the limited amount of information you're giving to us, please refer How do I ask a good question for details
You can use a sniffer tool like Wireshark to see what actually happens with the request and if there is any response.
It's also possible to increase JMeter's logging verbosity for the ISO 8583 sampler by adding the next line to log4j2.xml file:
<Logger name="nz.co.breakpoint.jmeter.iso8583" level="debug" />
then inspect jmeter.log file and look for messages related to iso8583 and other suspicious entries
I was getting (channel/HOSTNAME:POST) [receive] In: 1210 *STAN Number(field 11) *Identifier (field 41) in my JMeter logs (with increased logging verbosity for ISO 8583 Messages) but could not see any thing in my View Results Tree's Response Data.
Answer:
Field 11 and Field 41 needs to be same in request as well as in
response. Once I matched both I was able to get response data in
JMeter successfully.

Slack : Slack Web API Method :conversations. history method not working as expected when using Latest and oldest options

I am writing an slack app for reading the messages from private channel and writing to database.
I use method conversation.history for this purpose.
My approach is
Call the Slack api with parameters limit=100,channelId ,bot token and
store the messages in database along with the timestamp ts for
message
Fetch next 100 by calling method with prams as
limit=100,channelid,bot token,oldest= ts (timestamp of oldest record inserted
in database
By the API documentation it says latest is default to value now .
In this case I should get next 100 records but I am getting nothing .
And I don't know how usually convert a date time like 12 Dec 2020
5:40:00 (12/03/2020) to timestamp like 1607017252.113300
I am using C# language for doing this whole work.
You should be passing the oldest timestamp as the latest parameter in the next API call. (The Slack API would benefit from renaming "latest" to "newest".)
First call:
https://slack.com/api/conversations.history?token=TOKEN&channel=CHANNEL_ID&limit=100
Second call:
https://slack.com/api/conversations.history?token=TOKEN&channel=CHANNEL_ID&limit=100&latest=PREVIOUS_OLDEST_TS

TO check response of particular id should be diff through jmeter

MY response for api is:-
"data":{"shortId":"lu131559"}}
Now i wants to check short id is different for every virtual user.
mns if second hit gone response data is
lu131560
So i want to validate that after 1000 request from virtual user every time i am getting diff id.
If you know the "current" value of the shortId and expect it to be incremented by 1 each time you call your API you can go for Response Assertion and use __intSum() and __counter() functions combination in the pattern like:
lu${__intSum(131559,${__counter(,)},)}
Each time the Assertion will be called it will expect the value to be incremented by one, i.e.
lu131560 - for 1st user or iteration
lu131561 - for 2nd user or iteration
lu131562 - for 3rd user or iteration
etc.
More information: Apache JMeter Functions - An Introduction

Quickbooks POS AddOn Sales Reciept TxnID

I am creating my first AddOn using Quickbooks POS AddOn Dev Kit v10.
I have created a button in the receipts side buttons panel.
Now what I want is the current sales receipt.
For that, what I am trying to do is to get TxnID and query request processor, with that TxnID to get the whole receipt.
I have managed to get information like Qty, Desc1, ItemNum etc. I have also get the Receipt Schema.
https://idnforums.intuit.com/messageview.aspx?catid=49&threadid=16722
From above url, it says DocSID is the TxnID, but I cant get the field value through DocSID.
How can I get the TxnID or is there a better way to do it for getting the current sales reciept?
Thanks in Advance.
After working on it for 2-3 days, I came to know that TxnID will be created after the sales receipt is saved in QB POS through the IPOSService ProcessQBPOSXMLRequest method.
ProcessQBPOSXMLRequest only takes and repond in XML format. I created the receipt request in XML and send it ProcessQBPOSXMLRequest for processing.
I was avoding creatingg the XML request, since it was a long and tedious work, but I did similar work while creating another application with QBPOS SDK v3, with QBPOSFC3 library. I copied the code and add reference to QBPOSFC3.dll, and created xml from IMsgSetRequest interface which send request to POS request processor and convert the request in XML format.

Resources