Call STT based on customer response - asterisk

I am placing calls to the customers using my own custom Asterisk Dialer,
When the customer picks up the call and starts speaking with us, the following are the cases.
The first response of customer has of the length of 3 seconds, the system responds
The second response of customer has of the length of 10 seconds, the system responds
Ideally, the system should call first STT API after 3 seconds when customers take a pause after completion of his sentence/response and second STT API after 10 seconds when customers take a pause after completion of his sentence/response
How do we achieve this? Our current dialer is calling STT API after a fixed interval of 3 seconds after the customers receive the call.

Related

Is signal R async in its networking (not in its calls)

We are using signal r to fetch data for 20 tiles.
We call FetchData() on all 20 tiles at the same time, it then fires of a message on signal r to request that data. (each tile has subscribed to get the answers)
We find that each tile will populate its data one at a time, as if the signal r only fetches the next tiles response after the first tile has been completed?
I know this is super high level, but in my mind, it worked like an AJAX request. Where if I fired off 20 requests in a row, they would all randomly return out of order?
By default, SignalR only allows a single execution from a client at a time. So if you fire of 20 concurrent calls to invoke a hub method, it'll run those in sequence (there are exceptions to this rule but that's the idea). This article talks about some of the configuration https://learn.microsoft.com/en-us/aspnet/core/signalr/configuration?view=aspnetcore-6.0&tabs=dotnet#configure-server-options. You'd want to increase MaximumParallelInvocationsPerClient so something other than 1.

When the deadline starts to count down?

I have a question about when the deadline starts to count down? Does the deadline start to count down when arguments are marshaled and waiting to be sent, or after the arguments are sent out?
A deadline refers to a specific moment in time, usually in the future. It's like an alarm for a specific time, rather than a timer for a specific amount of time. So, for example, if you set a deadline of now + 1 second, it is by definition counting 1 second from when you performed that calculation. If you set the deadline to 4:30 PM today, it doesn't matter when you start counting, because that doesn't change when the deadline will be reached.
The client converts the deadline to a duration when sending it to the server, and then the server counts from when it receives it. Those calculations do not account for the transit time, so that timer will have a slight delay added. However, he deadline on the server is just for determining when it is no longer useful to continue processing a request, so it doesn't need to be precise.

Get time since Call start in AGI

When I have call request in AGI script, is it possible to get time since call was created? For example, if it was routed sequentially through several softswitches can I get whole time sinse first softswitch or since generation in remote softphone ?
SIP only is used.
I also use AMI, and in CDR event I see that (Duration - BillableSeconds) is sometimes longer (for 10-20 seconds) then time from AGI request to Up, so duration may be already includes some time before call passed to my Asterisk.
No, there are no way determine any history of call before it go your switch unless other switch inform you about by special headers.
No, CDR(duration) is counted from time when call arived to asterisk. CDR(billsec) always less or equal to duration.

gcm how many devices can receive a push message at a time

I have about 1500 registration ID, i tried to send 1 push notification. But it didn't. Is it GCM does not allow sending to more than 1000 registration ID per message ?
That's correct. A single request to GCM can contain up to 1000 Registration IDs. You'll have to split your 1500 IDs into two separate requests.
Quoting from Google Docs:
GCM is support for up to 1,000 recipients for a single message. This capability makes it much easier to send out important messages to your entire user base. For instance, let's say you had a message that needed to be sent to 1,000,000 of your users, and your server could handle sending out about 500 messages per second. If you send each message with only a single recipient, it would take 1,000,000/500 = 2,000 seconds, or around half an hour. However, attaching 1,000 recipients to each message, the total time required to send a message out to 1,000,000 recipients becomes (1,000,000/1,000) / 500 = 2 seconds. This is not only useful, but important for timely data, such as natural disaster alerts or sports scores, where a 30 minute interval might render the information useless.
Taking advantage of this functionality is easy. If you're using the GCM helper library for Java, simply provide a List collection of registration IDs to the send or sendNoRetry method, instead of a single registration ID.

Omnet++: Simultaneously send messages from more than one node

I want to animate a node receiving messages from three different nodes in OMNET++. Right now the nodes send in a sequential manner. But, I want the nodes to send messages to the root node simultaneously. Root node is occupied with an array of input gates. Is it possible in Omnet?
You can configure the 3 nodes to send the messages at the same time by scheduling messages to be sent at the same time using the scheduleAt() function. The simulation will always show that they are transmitted sequentially, but check the T (event time) value in the simulation window. If the T value is the same every time any of the 3 messages are being sent, it means they are sent simultaneously.
The messages arriving to the root node can't be processed at the same time. Every node, including the root node, implements the handleMessage() function which will analyze each incoming message individually.
I hope this is the answer you were looking for.
You have to define parameter id in ned file. In initialize set the condition if(getIndex==id), send the message. Same message will be send to the node simultaneously.

Resources