0

I want to initiate an audio call to users by triggering through API or by a link. I've tried doing it like below but it doesn't call the user.

var connector = new calling.CallConnector({
    callbackUrl: my_callback_url,
    appId: my_app_id,
    appPassword: my_app_password
});

var bot = new calling.UniversalCallBot(connector);
bot.set('storage', new builder.MemoryBotStorage());
app.post('/api/calls', connector.listen());

var msg = new builder.Message().address(
conversation: 
{ 
    id
},
serviceUrl: 'https://smba.trafficmanager.net/apis/' );
msg.text('Hello');
bot.send(msg);

The bottom code works when i'm using ChatConnector to send text message, I'm trying to use the same method to initiate a call.

kurapika
  • 166
  • 1
  • 12
  • @StevenKanberg Thanks for the reply! I would like to reconfirm that bot-initiated conversation by text actually works, but then audio call will not be possible at all without using any other third-party services? – kurapika Jun 18 '19 at 06:03

1 Answers1

0

There is a v3 Node SDK example (located here) that you can reference. However, you should know that this bot is designed for user-initiated calls to the bot.

In general, bot-initiated conversations are dis-allowed due to the possibility for abuse (i.e. spam bots). One possible option is to connect your bot using a service like Twilio. That would require you to know something about the targeted user, tho.

Another note, the Bot Framework team is planning to end support for the v3 SDKs in the near future. You should consider developing your bought using the v4 Node SDK, instead. You can learn more about v4 here.

Hope of help!

Steven Kanberg
  • 6,078
  • 2
  • 16
  • 35