I was given a task to create a conference in Asterisk using ARI with Node.js. The objective is create a conference room and send email invitations so people can click and enter de conference room. I also need a admin web interface to show who's talking, mute and some other things.
I don't have any experience in Asterisk. So I need some start point. Innitally I have to create a Channel and then add some SIP to it.
So taking this page as a base: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API
I have a configured test server and a sip number (852001). So I opened up Insomnia and create a POST request like this:
http://<serverip>:8088/ari/channels/400?endpoint=852001&extension=400
But allocation failed. So I thought that before I continue with this I have to make some concepts clear:
What do I need to create a conference room ? It's just create a channel or I have to create a bridge first ? What should be the right values in endpoint, extension or app fields ?
Is ARI URLs the best approach or it's better to use node.js's ari-client module ? I'm using urls because I couldn't get any working example on creating a conference with ari-client.
Any code examples on how I could do this would be greatly appreciated. Thanks.
Read Orelly's "Asterisk the future of telephony" as starting point.
ps but do it via ARI only seams like impossible even for expert. Anyway you need some dialplan.
Related
I am writing service for messaging between rooms using Hangouts chatbot. Is it possible to create a room with Hangouts chatbot?
https://developers.google.com/hangouts/chat/concepts
If it were generally possible to create a new room programmaticaly with the Hangous API, you could do it with the chatbot.
For example, if you implement the chatbox with Apps Script, you can create a function onMessage(event) and establish was will to happen in case of a certain event.message.text (e.g. create a new chat room if the message text contains the string create new room.
However, for the moment it is not possible to create a new chat room programmatically.
There is a feature request asking for this functionality, but given the potential of abuse, it is controversial either it will be implemented.
See comment #2:
Hello, thank you for the feature request! At the moment rooms cannot
be created via the API to prevent abuse such as a bot or script
spamming room creation. However, this kind of feature has been
discussed internally and may be coming in the future (with
limitations). I will update this issue if more information is
released.
And comment #25:
Thanks for the input. It's great to see some real life use cases. We
fully acknowledge the importance of a CreateRoom(DM) API and we are
actively looking into the right permission model to allow bots to do
so. Please continue to follow this bug as we will post updates here
when appropriate.
I have created watson chat bot which answers users FAQ's using Node js as a middle ware. but how can i transfer the conversation from bot to any human agent.
In this case, you need to know: Watson Conversation Service is one endpoint API, so, you can call the service and creates one condition in your backend for identifying if the user wants to be attended for one's Human Agents or anything that you want to do with yours application.
For example, you can see the Project by IBM Developer's inside Watson Developer Cloud called conversation-simple using Node.js.
You can simply create one #intent condition in your chatbot likes:
if bot recognizes #wantsHumanAgent
response: Do you want to talk with one Professional?
And creates one #entity with the values: yes or no, after it, try to create one child node with the condition:
if bot recognizes #yesOrNo:yes
response: Please wait! I'll pass you on to an attendant.
Or you can add the link for the user's talks with the Attendant too, like:
if bot recognizes #yesOrNo:yes
response: The link to talk with one Attendent is <a target="_blank" href="https://yourlink.com">Talk to one Professional!</a>.<br/><br/>
Obs.: You can add one custom code to creates your functions or do something in your application using this example as a base, and creates one custom code for what you want: Add in your chat one option to talk with Human Agents.
Note.: This is just some's suggestions to use based on good practices. You need to guide your user in your Virtual Assistant for one better Attendance.
See more examples to build with Watson Conversation Service.
just getting started with Assistant features in RPi and I am able to successfully implement upto this point and wondering few thing.
Scenario:
user: hey google "please turn on my living room Lights"
List item my code in horword.py : has a function to perform same action based on ON_RECOGNIZING_SPEACH_FINISHED
RPi/google home: I am not sure how respond to that
I was able to capture the request query asked by user using ON_RECOGNIZING_SPEACH_FINISHED = Args.text(str) and use it in my logic to perform the task. However, at the same time, "ok google" is responding with this answer.
to mitigate this problem, I created an google-actions, now it understands my query and respond with intention from api.ai. However, didn't acts on turn lights ON. So, wondering how can I read response from google home/api.ai in text and change code to act on it locally.
appreciate it.
You will not get response as text.
For getting response to client app use webhook in API.AI and send message using fcm to client app.
Read the fcm message in client app and do the corresponding actions.
finally was able to figure out multiple ways. answered this in other stack question. find more details in this post.
Multiple ways to handle this since google doesn't gives voices transcript and we let google say our transcript which is kind off solution for now.
The exact point being, that I've created a bot that can take inputs from users in free form text and return relevant web links. Now the problem being, that in case the bot is not able to understand the user query, the control of the conversation has to be passed on to the human executive.
I've researched for over 2 days but could not find any such implementations. The closest I came was third party applications like ChatFuel, letsclap.io provide such a provision. So, there should be a way only that I am not able to find such a thing.
Any help on this would be appreciated.
one possible way is you can make a bridge, idea is as follow:
user send something that the bot cannot reply (conv-1)
make a new conversation with your human executive (conv-2)
forward user message to conv-2
human executive replied to the bot (conv-2)
capture the message and forward back to (conv-1)
See this link on how to start a new conversation:
https://docs.botframework.com/en-us/csharp/builder/sdkreference/routing.html#sendtoconversation
Hope it helps,
Maybe you can create some APIs in a WebApplication that will be used by your bot.
If the LUIS Intent "None" is called, you make a call to that API and start a new conversation with a human.
You can use this same process to manage all conversations in a WebApplication Chat Control
I'm trying to implement some click to dial functionality as follows:
A user finds a number on a webpage (say employee extension)
Clicking that extension will dial a phone number that I've picked
Upon answering that call, I am immediately "conferenced" into
calling the number I actualy wanted to dial.
I've done something very similar using a Twilio API but want to use our corporate Cisco Call Manager capabilities instead of paying per minute for this functionality.
The WebDialerSOAP doesn't seem to be able to give me this functionality. I think doing a conference would work but can't find anything to do that. Possibly an open source call manager wrapper?
why not a FreeSWITCH server alongside the CUCM? It can set up conferences, and it's one of themost programmable products with as much control over API as you want.
It has also an RTMP module, so you can actually run a Flash-based softphone out of your browser
Use TAPI3 or JTAPI
Connect the code using TSP, and Application user
use CreateCall function to the number from HTML page with implementing the trigger.
use CreateCall to the other phone.
use Finish(FINISH_MODE.FM_ASCONFERENCE) to complete conference.