What is the third number in subscription of Topic in Service Bus Explorer - subscription

I am using Azure Service Bus Explorer,
What is the third number of Subscription in Service Bus Explorer,
For Example,
topicname
- Subscriptions
- SubscriptinName(12,13,0),
the first one(12) is the number of the messages
the second number(13) is the number of the messages in dead letter queue,
what is the third number 0?

Looks like the answer is here.
It looks like it displays the TransferDeadLetterMessageCount.

Related

Efficiently get sender of e-mail from GMail API

I want to get the sender of all first messages in each thread in my G-mail inbox. To do so, it looks like I need to list all threads, fetch the thread itself with all of it's, get the first message, and then loop through its headers. Is there a more efficient way to do this?
Get sender mail in gmail-api
I've implemented the above and it works, but for 100 threads, it makes 1 List threads request + 100 Get thread requests.
There is no way to do this as of now.
You could however submit a Feature Request in the Google Issue Tracker and ask that the Gmail.Users.threads:list method get an option to retrieve the first message of each thread.

Problem with dialog nodes and intents in Watson Assistent

I'm using IBM Watson Assistant for creating a chatbot. I'm using the web interface with the intents, entities and dialog flow|tree (I don't know how it is called, I'm just calling it web interface). I have four problems and hope that someone can help with it.
I have created two intens: #how_are_you with an example "How are you?" and intent #feeling_good with example "I'm good". Of course I have much more examples for these two intents. In the dialog I have now a parent node looking for #feeling_good and a child node looking for #how_are_you (skipping user input in-between). When a user now inputs the sentence "I'm good. How are you?" then only #feeling_good is triggered but not #how_are_you. How can I trigger both intents with only one user input?
I would like to have one node in the dialog which waits for say 100s and then sends another message to the user. Waiting is no problem (using pause) but how can I do it that only a message is sent after the 100s if the user did not send another message during the waiting period? That means when the user sends a message the waiting node should be canceled.
I have a node which checks for a certain intent. When the intent does not match I'm jumping back to the parent node. The problem is that the text from the parent node is repeated each time. How can I prevent this repetition when jumping back?
The last question is perhaps a bit more tricky. I would like to define an array of the numbers [1,2,3,4,5]. Then one node should sample a random number without replacement from that array (e.g. 2), i.e. the remaining array is then [1,3,4,5]. After some time another node should pick another number at random from the array (say 4). And so on. How can this be implemented? I know about variables (e.g. $var) but I don't know how to represent arrays and sample random numbers.
Thank you so much for your answers in advance. And happy new year to everybody.
1) In Watson Assistant always the intent with the highest confidence is used first. Hence processing multiple intents triggered by one sentence is tricky. The "best" solution is to use composite intent - #HELLO_HOW_ARE_YOU. Alternatively you can create conditions that would check if the first two intents returned are a comination of #HELLO and #HOW_ARE_YOU
2) Waiting and sending messages due to inactivity should be ideally handled by the client implementing the chat console in your interface. WA is not well suited for these types of operations, while there is some support, better way how to handle these is get your client application - when inactivity detected - to send something that will be mapped to #INACTIVITY_INTENT and WA will respond with your message coupled with that intent.
3) Don't jump to the node but jump to the first child of that node and use wait for user input.
4) This is possible. WA expression language supports getting random number, getting the size of an array and removing elements from the array.
E.g. <? $array.remove(new Random().nextInt(3))?>

registration process in sip protocol

I am new to sip protocol,i went through the basics and have these following doubts
1)In registering process when i captured using wireshark,i figured out that from and to headers are same when i read rfc 3261,it says that "to" header indicates whose registration is to be done and from" indicates person responsible for registration.The to and from fields are same unless it is a third party registration.it is not clear to me,how can it both be same and what is a third party registration.
2)Does sip have any keep alive mechanism,in zoiper we have the option of giving expiry time (3600 default),but for registration it is 70,for subscribe it is 60 and for invite it is 3600. how these values are automatically selected?
3)The user agent finds registrars using configuration.dns look up and multi-casting.In what case multi casting is preferred,pls explain the method also
what i did was ,installed an asterisk server ,zoiper applicationregister msg capture is attached,created a zoiper account,captured using wireshark in loop back mode.attaching screenshots of captures.Thanks in Advance
Regarding to and from fields in REGISTER:
The "from" field here is just a logical field which should not be checked. If differs from the "to" field that means that "from" registers in name of "to".
But I can't think of any scenario when this should be checked (maybe it can be used for something -app specific- in some complicated scenario). You should just follow the usual authentication process (digest auth or other) and skip this field.
Regarding point 2 (expiry time):
Your mentioned settings in Zoiper are just arbitrary.
Low values (below 200) can be used if client or server doesn't support NAT keep alive (via NOTIFY or simple \r\n\r\n messages). In this case the REGISTER message will keep alive the UDP binding in NAT routers.
Higher values can save some server side processing work and CPU resources
I usually recommend a 600 sec expire timer and 40 sec NAT keep-alive messages.
For INVITE the expire field actually means maximum ring time and it is rarely used.
Regarding point 3 (finding registrars):
The SIP server (registrar server) is usually entered manually in client configuration or set by auto-provisioning. If the server is on the same LAN, then you might be also to detect it also by multicast but this is rarely used.
Here is a good tutorial.

IMAP - JavaMail - How to know which messages to process?

What I want to achieve:
I am coding a Java program that uses IMAP to connect to some gmail accounts every 5 minutes and extract information from some messages.
I want to check all the messages (incoming and outgoing) and take only the ones I have not processed. By "processed" I do not mean only "read" or "seen" messages. My application does not care whether or not another user has accessed that account and read a message. My application needs to keep track of which was the last message it processed and, the next time it goes through the messages, start with the first non-processed message.
I do not want to change anything in the messages. I do not want to mark them as seen or read.
What I have implemented:
Establish IMAP connection.
Open and access all messages in "[Gmail]/All Mail" folder.
What I have tried:
I have been reading about UID and message number, but I am not sure if any of them could help me achieve what I want. Maybe UID could, but: how do I retrieve it with JavaMail?
I found Folder.getMessages(int start, int end), but I think it refers to the index of the message in a folder, which I believe can easily change.
Can anyone provide some guidance at what is the best approach to take here?
Thanks!
IMAP UIDs are relative to the folder containing the message. I don't know how Gmail handles UIDs for messages in the "[Gmail]/All Mail" folder, but if it does the right thing you could use the UIDFolder interface to get the UIDs. And as described, once you've processed a certain UID, all the new messages will have larger UIDs, which can make processing more efficient.
The alternative is to use Message-IDs, which has a different set of problems...

Mobile Phone no. verification

I am designing a website.I want to validate the mobile no. entered by the user on the registration page, by sending a verification code to his mobile phone. Can anyone give me pointers to how should i proceed with it??
i Proudly recommend cognalys (note: I work for cognalys)
Because it provides an elegant API to verify international mobile numbers which can be integrated on any platform .
Step1 :
https://www.cognalys.com/api/v1/otp/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&mobile=MOBILE
it will generate a missed call to the requested mobile number . And return a keymatch (to authenticate step 2 ) and otp_start ( the first five digits of the missed call number )
Step 2 :
https://www.cognalys.com/api/v1/otp/confirm/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&keymatch=KEYMATCH&otp=OTP
Ask your user to enter the last five digit of the missed call number concatenate otp_start and last five digit for parameter otp and hit the API including keymatch
You are done ! . It uses a unique technique to verify mobile number
There are two options, depending on your budget.
Option 1 - buy an SMS gateway and install it on your server. You can then call an API from your server-side script that will send an SMS - you will need to supply the mobile phone number and the text content. This is the more expensive option unless you have a lot of volume.
Option 2 - use an SMS gateway service. In this case, someone else operates the gateway and you call their API to send messages. You normally buy "bundles" of texts to use this, so the cost depends on the number of texts you buy.
Uh, that really depends on what you're doing.
You can, for example, connect a phone to the server and send messages using a solution like gnokii or something like this. Or you can use one of email/www to SMS gates that are out there, on the internet.
On the other hand, you can reverse your usecase a bit. Instead of sending a confirmation code to the user (and, I guess, asking him to enter it back on your site) you can display a confirmation code to the user and ask to send a text message to the number you display.
This makes a user having to text you. First it lowers your expenses (if you pay for the message) and second, can prevent the evil users from trying to DOS your SMS system.
Probably the easiest solution is to use some webservice for sending SMSs.
For an example see this: http://www.codeproject.com/KB/cpp/SendSmsThroughWS.aspx

Resources