Getting the chat ID from call ID with the Skype API - c#

I'm writing a simple conference host in C# for the Skype API. When the program is notified that a call has ended, I want it to send the "/golive" command to the group chat associated with the call that just ended. I can do everything except retrieve the chat ID from the call, or even vice versa.
It appears from the API documentation, that there is no link between the chat and the call, but this makes no sense as you can only have one call per chat, and Skype gives you a "join call" button at the top of the chat, so Skype MUST link between the Chat and the call. Any ideas how to get at that information?

go to the group chat profile, copy conversation link -> it will look like skype?chat&blob=
delete that part then the api command is CHAT CREATEUSINGBLOB
after that you get a #thisisyourchatid and you just chat to that address (including the #)

In addition to previous answer you can use "/get uri" or "/get blob" chat command in a group chat to get blob.

Related

How to execute a function(may contain SQL query or programming logic) on certain message received from user

I want to make my chatbot dynamic. I have static knowledge base for my bot but my bot should process some dynamic functions.
Like,
on message of "today" Bot responds : 9th September 2019 , Saturday
10:47 UTC
On message of "my IP" Bot should respond : Your ip is 192.168.xxx.xx
(which is users local ip)
On message of "is my network printer working" bot should ping , check
and respond with a status :
: Your printer is down right now and maintenance is going on.
I have tried searching some blogs about functions in bot and i got one :
Blog
but it "open bot in azure function " is not there that is showed in blog
image of "open bot in azure function option"
If you want to your bot service could understand your input intention and then call the corresponding method to handle users' requests , using Azure LUIS service will be the proper way to implement to do it .
To be brief, LUIS service is used for getting natural language/text from user and reply them as an intent so that you can handle users' intents by different methods in your code.
The blog you provided just indicated a simple way to demo how to use LUIS with azure bot . Azure function is not a necessary service here.What's more, seems this way is not available anymore.
This demo which integrated with LUIS and QnA maker will be helpful for you to meet your requirement . You can refer to my previous post about how to run this demo .
If you have anything unclear , pls feel free to let me know : )

MS Teams outgoing webhook application

I have built a bot in Visual Studio using C#, which I have registered with the Bot framework. Its a test bot at the moment, which merely scans the incoming text and returns a message on how many characters are in the message. However, what I want to do is to hook this bot up to a Teams channel and use some sort of trigger (similar to slash commands in Slack) and then take the text from the message and send that to my bot, which will then run some code to forward that data on to an external URL, which would then reply back to the bot and then forward that data into the Teams channel. Does anyone know if something like this is possible? At the least all I need to know is whether I can get some functionality similar to slash commands in Slack, which I can then work with and get the desired outcome from this bot.
Firstly, the issue with Microsoft Teams bots that you either need to talk to them in 101 or mentioned them in a group conversation.
Secondly, the Slack-like commands are not supported and you need to understand the intent of a person. You can use buttons on cards instead.
It can be done in a few ways. The main idea is the following.
Bot: Hello, my name is Pradeep Patel. You can use me like "#pradeep launch ", where what is a parameter for launch command.
User: #pradeep launch rocket
Bot: User, the rocket has been launched.
User: #pradeep try jump
Bot: Sorry, I don't have the command "try" implemented. Please type "help" to find out more information.
You can use multiple tools to recognize intents:
RegEx
Google Api.ai
Microsoft LUIS

How can I have my bot start in a different dialog depending on user

Basically, I want to have my bot on different pages using iframes and Bot Framework Web Chat.
Depending on what page the user opens the bot, a different dialog is called.
Without Direct Line, this is as simple as adding a query parameter to api/messages and adjust the controller. But with Direct Line, I can only specify one endpoint in the portal.
I tried to change user.id in the JavaScript BotChat.App call to a different identifier and then select the correct dialog in my MessagesController based on that.
BUT: my custom id doesn't seem to be available as early as the activity "ConversationUpdate" occures where I send my welcome message. I need to send a dialog-specific welcome message though (so I need to navigate there as soon as possible and not only when the user types his first message).
Take a look at the backchannel. In your scenario you can pass a parameter from the Javascript via the back channel to set some value in UserData. Now your parameter will exist in state (in this case the IDataBag UserData) when your user first hits the bot.
Here is a C# sample of a 2-way backchannel
another C# sample using a 1 way backchannel

Facebook SDK - Handling application invites?

With the Facebook SDK it seems like they allow you to invite your friends to join the application through the AppRequest section of the SDK. However I don't see anywhere in the SDK where you can reward users for inviting friends. I know this is possible because it's been done so many times, so how it can be done?
For example, lets say:
1. User A invites User B to use the application.
2. User B downloads the application.
3. User A receives 100 coins for inviting User B.
I'm completely lost here, examples using any SDK, regardless of language, would be appreciated.
Since Facebook app invites are based on AppLinks, that is where you need to look for a solution. I will explain this by using an Android example scenario.
When constructing an app invite (using the dialog), you are specifying an AppLinks URL. This URL can be unique to each user that sends out invites, or even to each individual invite. E.g.: https://www.example.com/invite_applink?invite_id=12345. By creating one AppLink url for e.g. each user who invites others, you embed invite-sender attribution (which is what you are saying you want) into your AppLinks URL.
The way the Facebook app figures out how to open your app from the "app invites" section, is by following the AppLinks specification.
This specification states that in the <head> section of the HTML document that lives at https://www.example.com/invite_applink, there has to be appropriate <meta> data that describes how your app can be opened/deep-linked into. One part of that is the al:android:url property, which could be used like this: <meta property="al:android:url" content="example://invite_from_fb?invite_id=12345" />
Observe how the url contains a parameter invite_id=12345, where 12345 is the same value as the one used in the invite_id parameter of the AppLinks URL above.
When the invited user now opens the app from the deep-linking URI example://invite_from_fb?invite_id=12345, the app will be opened from an intent that contains this information.
When your app's Activity opens you can grab the Intent that opened the Activity, and get from it the Uri that was used to open the app: Intent.getData(). More on this on the Android docs on "Allowing other Apps to Start Your Activity"
At this point, the ID that attributes an app invite to a user has made from the sender into the running app of the recipient. Now the app on the recipient's device needs to call your server and let it know which invite_id was used to open it. To avoid that multiple such attributions originate from one user (who may have received invites from multiple people), you could hold off on sending this attribution data until the user has performed some sort of login (e.g. Facebook Login) and you are able to ignore e.g. all attributions after the first one.

Cellular/Network SMS integration for Quiz application

I tried with google but no success, what i want to do is to make sms poll/quiz type of thing where user can send sms to "7766" and get response like "Welcome to ABC. reply with 1 to get you new question, 2 with help, and 3 to view your result " . this will be a a two way communication and on sending any sms will cost $10 .
Here are my question:
How can i do that?
Do i need to ask sim [provider for tht Number (7766)
This should work from some specific country only.
I need to charge amount on entering the QUIZ.
Well as new to this, i dont see any starting point from wher i can start. I need reference or some one already did that or like this thn kindly share that.
Perhaps you can have an ecommerce solution on your website (Paypal for example) and then once your user has paid, they have access to a portion of your site that uses an HTTP SMS API. An example of a provider of such a service would be http://www.bulksms.co.uk/w/eapi-sms-gateway.htm
These APIs allow you to send messages, receive delivery reports and receive replies (amongst other things).
It's quite a wide-ranging question though.

Categories

Resources