How to set a number as block or spam in Ring central if a user press 0 - ringcentral

I want to set a number as spam if a RingCentral user gets an incoming call and he dials 0 form dial-pad It should set the number as Spam and from the next time that number should be in the block list.
Is there any way to do this using API and Webhooks in RingCentral.

I am not aware of any API to set a spam number. Looks like this is a good feature request.

Related

Building Alexa Skill that pushes an alarm

I'm trying to build an alexa skill that fires a custom alarm every set number of times per day (30 min intervals for example). I'm reading through their docs and not fulling understanding where to go to next.
Does anyone have some good Alexa skill apps that I can reference or an article? I couldn't find much online and it looks like it hasn't been an accessible feature for too long.
You cannot trigger Alexa to speak without user interaction. That means, the user has to say something to trigger your skill, which will in turn create a request to you skill's backend, and you can only respond (be it audio or speech) back to that request.
However, you can send Push Notifications.
Notification indicators inform end users that new content is available
from Alexa skills and domains. When a notification is delivered,
depending on what the product is capable of, the user is notified by
visual and audio indicators.
More on Push Notification here

How to edit the limit of attempts to change a password in AWS Cognito?

I have implemented a change password feature and now I would like to test it. But I face the limit of attempts.
What should I do to prevent this error?
Attempt limit exceeded, please try after some time
I am on the Cognito team. This is not configurable. We do have protection mechanisms to prevent users from abusing forgot password APIs which is probably what you are witnessing.
this is not the exact answer e.g. attempts limit is not configurable for sure.
but still, if you want to test multiple times, you can try different emails e.g.
if attempts limits exceed for your Email1, you can start attempting with Email2.
Also, note that you can receive the emails for Email1 and Email2 on a single email address e.g suppose your Email1= xyz#gmail.com you can register your Email2 =xyz+1#gmail.com
This way you can receive emails on xyz#gmail.com for both Email1 and Email2
Cognito allows 5 password reset/sign-in attempts.
After the allowed number is exceeded the service starts temporary lockouts with exponentially increasing times.
Here you can find more details on how it happens:
https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html
The default lockout behavior is as follows:
Users can attempt but fail to sign in correctly five times before
Amazon Cognito temporarily locks them out. Lockout time starts at one
second and increases exponentially, doubling after each subsequent
failed attempt, up to about 15 minutes. Amazon Cognito ignores
attempts to log in during a temporary lockout period, and these
attempts don't initiate a new lockout period. After a user waits 15
minutes, Amazon Cognito resets the temporary lockout. This behavior is
subject to change.
https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html
Workaround solution:
If resetting password using email , you can use something like guerrillamail to get many new temporary emails to work around the limitExceeded exception.
If resseting password using phone , try using a virtual phone number provider like google voice to get at least 2 phone-#'s to work around the limitExceeded exception.
The workaround I have used (while testing user confirmation flow) is: once the limit is reached, make sure to complete a correct flow to reset the exponential backoff , then delete account and continue testing after re-creating the account.

Blockcypher Webhooks

I am working on building a page to check whether is there any confirmed transaction for all the address in my wallet that i created.
$webHook->setUrl("https://requestb.in/r0dspfr0");
$webHook->setEvent('confirmed-tx');
$webHook->setToken('my_token');
$webHook->setWalletName('andy');
The problem here is i only want it to callback to that url whenever a transction had six confirmations.
I had tried to set the event to tx-confirmation or others, it cant work as what i want, it will always callback when there is only one confirmation, after that it stop.
Are u using the Java sdk?
You can try "tx-confirmation" and only process the transactions with 6 confirmations
confirmed-tx Triggered for every new transaction making it into a new block; in other words, for every first transaction confirmation. This is equivalent to listening to the new-block event and fetching each transaction in the new Block. The payload is a confirmed TX.
tx-confirmation Simplifies listening to confirmations on all transactions for a given address up to a provided threshold. Sends first the unconfirmed transaction and then the transaction for each confirmation. Use the confirmations property within the Event to manually specify the number of confirmations desired (maximum 10, defaults to 6). The payload is a TX.

Sending SMS and email to 100000 members in django-mysql envrionment

I am having a real headache on how to handle this one. Basically, the application got members that are projected to reach one million at the end of the year. It relies heavily on USSD but also have email. Actually for now, I would prefer to send the SMS first.
The issue is this: the members have groups based on their activities and a single member can have multiple groups. Currently, the highest number of members in a group is 17,000.00. The group can basically send SMS to those 17,000 members. The group leaders specify paramters ("All Members","Females","Age 24-28" etc) and send the SMS, which must save a copy in the database. Currently, there are 5 active groups but they will certainly increase in the future and they can all request to broadcast SMS to members at once.
The phone numbers of members is kept in:
class Profile(model.Models):
user=models.ForeignKey(User)
phone=models.CharField(max_length=13)
Similarly, the app should basically scan the member profiles to send them period notifications. For now, I am following the following:
Select the phone numbers of all members that satisfy the criteria
Create an id for the broadcast and wait for previously stacked SMS requests to finish. Then add the selected phones to a secondary table referencing to the broadcast
Loop through each phone and send one by one. Once finished, mark the broadcast as finished
class BroadCast(models.Model):
code=models.CharField(max_length=50) #rand generated
group=models.ForeignKey(Corporate)
finished=models.IntegerField(default=0)
message=models.CharField(max_length=200)
class Phone(models.Model):
broadcast=models.ForeignKey(BroadCast)
But am disappointed by its performance especially for multiple requests. What can i do to improve it?
I am using twilio paid SMS.
tele=models.CharField(max_length=13)
I had an sms application before that had scaled and slowed down when the user base was large, to fix that we used queue for the sms sending task. Worked wonders and should also work perfectly in your case.

How to send mass mail in Django and get status for every message?

I'm creating a web app for handling various surveys. An admin can create his own survey and ask users to fill it up. Users are defined by target groups assigned to the survey (so only user in survey's target group can fill the survey).
One of methods to define a target group is a "Token target group". An admin can decide to generate e.g. 25 tokens. After that, the survey can be accessed by anyone who uses a special link (containing the token of course).
So now to the main question:
Every token might have an e-mail address associated with itself. How can I safely send e-mails containing the access link for the survey? I might need to send a few thousand e-mails (max. 10 000 I believe). This is an extreme example and such huge mailings would be needed only occasionally.
But I also would like to be able to keep track of the e-mail message status (was it send or was there any error?). I would also like to make sure that the SMTP server doesn't block this mailing. It would also be nice if the application remained responsive :) (The task should run in background).
What is the best way to handle that problem?
As far as I'm concerned, the standard Django mailing feature won't be much help here. People report that setting up a connection and looping through messages calling send() on them takes forever. It wouldn't run "in background", so I believe that this could have negative impact on the application responsiveness, right?
I read about django-mailer, but as far as I understood the docs - it doesn't allow to keep track of the message status. Or does it?
What are my other options?
Not sure about the rest, but regardless for backgrounding the task (no matter how you eventually do it) you'll want to look for Celery
The key here is to reuse connection and to not open it again for each email. Here is a documentation on the subject.