New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

conversation-api-function

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conversation-api-function - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

2

bin/conversation-api-function.js

@@ -5,3 +5,3 @@ #!/usr/bin/env node

const supportdVersion = '13.14.0'.split('.')
if (nodeVer[0] < supportdVersion[0] || nodeVer[1] < supportdVersion[1] ) {
if (nodeVer[0] < supportdVersion[0] || ( nodeVer[0] === supportdVersion[0] && nodeVer[1] < supportdVersion[1] ) ) {
console.log("Unsupported node version. version required: >=v13.14.0. Please update your node installation")

@@ -8,0 +8,0 @@ process.exit(1)

{
"name": "conversation-api-function",
"version": "0.0.15",
"version": "0.0.16",
"description": "conversation-api-function is an opnionated tool to start using vonage conversation api https://developer.nexmo.com/conversation ",

@@ -5,0 +5,0 @@ "scripts": {

@@ -70,2 +70,10 @@ # conversation-service-functions

## how to write a function
when you start a new project, there's documentation in the example. If you are curious, take.a look here:
https://github.com/jurgob/conversation-api-function/blob/main/template/index.js
## Examples

@@ -118,5 +126,97 @@

- **NCCO websocket echo repeat**
git_repo: https://github.com/dimitrisniras/websocket-echo-repeat
description: Simple Vonage Voice API demo that connects to a websocket endpoint and echoes audio back to caller
tags: ncco, phone-call, pstn, websocket-call, text-to-speech
- **NCCO input of DTMF and Speech**
git_repo: https://github.com/JohnPeters7116/capi-fn_ncco_dtmf
description: Simple Vonage Voice API demo that takes dtmf input from customer and sends to customers event url
tags: ncco, phone-call, pstn, dtmf, speech, text-to-speech
- **Conversations API And facebook messages inbound**
git_repo: https://github.com/bilalkabat/conversation-messages-inbound-example
description: Let your customer write a message to your facebook page and store them in conversation api
tags: conversataion-api, messages-api, facebook-messages, ip-messages,
- **Conversations API, facebook messages and SMS, both inbound and outbound**
git_repo: https://github.com/andradaioanabogoi/conversation-messages-outbound-example
description: Store inbound facebook (and whatsapp, viber, sms message) in a conversation. Also respond to them via api (aka outbound messages)
tags: conversataion-api, messages-api, facebook-messages, ip-messages, whatsapp, facebook messenger, sms, viber
- **Hangup incomming phone calls but send back an SMS**
git_repo: https://github.com/jurgob/capi-fn-hangup-call-and-send-messages
description: every phone called received to your LVN are gonna automatically hanged up, but the caller will receive
tags: conversataion-api, phone-call, pstn, custom-data, text-to-speech
- **Phone call authenication for IP calls using conversation custom data**
git_repo: https://github.com/jurgob/capi-fn-pstn-call-authentication
description: someone is calling your nexmo number (LVN), he will be asked to say his/her name, The agent on the browser will se the incomming call and the name of the caller.
tags: conversataion-service, phone call, pstn, custom-data, text-to-speech
- **Record a leg or a conversation**
git_repo (example 1, record by leg): https://github.com/jurgob/capi-fn_record_leg
git_repo (example 2, record by conversation): https://github.com/JohnPeters7116/capi-fn_record_conversation
description: the call in conversations follow the MCU model (https://bloggeek.me/webrtc-multiparty-video-alternatives/). In a nutshell, there's a mixer (in our case the conversations) where every leg (aka every call partecipant) are mixed togheter.
If you want to record the call from a leg point of view, that's the example 1 is gonna show how to do it. if you are interested in record all the leg, then check the example 2.
question: what 's the difference between recording a leg or a converstion?. Immagine leg a is earmuffing leg b. in the leg recording, you will not have the record of the leg b, while in the conversaion record you will have both the legs in the recoring
- **Conversations API And facebook messages with events using Vonage Client JS SDK**
git_repo: https://github.com/dimitrisniras/inbound-message-chat
description: Let your customer write a message to your facebook page and store them in conversation api and see all the events that are coming through.
tags: conversataion-api, messages-api, facebook-messages, ip-messages
- **Inbound PSTN call using Vonage Client JS SDK**
git_repo: https://github.com/dimitrisniras/inbound-call-example
description: Perform an inbound PSTN call, calling your nexmo number (LVN) and then connect to an `app` user, transmitting audio and using the JS SDK.
tags: conversataion-service, phone call, pstn, client sdks
- **Outbound PSTN call using Vonage Client JS SDK**
git_repo: https://github.com/dimitrisniras/outbound-call-example
description: Perform an outbound PSTN call to a number, using the JS SDK.
tags: conversataion-service, phone call, pstn, client sdks
- **Websocket audio phone**
git_repo: https://github.com/jurgob/wsphone
description: receive a phone call and respond using your computer microphone via websocket.
- **Outbound phone call with NCCO**
git_repo: https://github.com/jurgob/phone_outbound_call_ncco
description: call a phone number from your application (you could as instance do an automatic phone marketing campaign with this) .
## Use a Real Redis

@@ -123,0 +223,0 @@

/**
what's in this file:
In this file you specify a JS module with some callbacks. Basically those callbacks get calls when you receive an event from the vonage backend. There's also a
special route function that is called on your conversation function start up allowing your to expose new local http endpoint
the event you can interract here are the same you can specify in your application: https://developer.nexmo.com/application/overview
event callbacks for rtc:
- rtcEvent (event, context)
event callbacks for anything else (those one are just standard express middleware access req.nexmo to get the context):
voice callbacks
- voiceEvent (req, res, next)
- voiceAnswer (req, res, next)
messages callbacks (if you specifiy one of thise, you need to declare both of them, those one are just standard express middleware access req.nexmo ):
- messagesInbound (req, res, next)
- messagesStatus (req, res, next)
route(app) // app is an express app
nexmo context:

@@ -135,2 +161,2 @@ you can find this as the second parameter of rtcEvent funciton or as part or the request in req.nexmo in every request received by the handler

route
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc