Comments (14)
It's the application API might not be in the public docs yet, @leggetter
should be able to point you in the right direction or if he's not sure ask
Roland
On Friday, 6 May 2016, Cristiano Betta [email protected] wrote:
@sammachin https://github.com/sammachin could you clarify what API call
you see this mapping too? I'm having difficulty determining this.From the doc:
Setup Number
nexmo number:setup $number [app|sms|voicefwd|voicexml]
[app]
-name [$name|$appid]
[sms]
-url $url
[voicefwd]
-address [$e164Num|$sipuri]
-statusurl $statusCallbackURL *optional
[voicexml]
-url $URLofVXML
-statusurl $statusCallbackURL *optionalSets up the number for either app usage or legacy SMS or Voice service, voice has the option of forwarding to a number/sip URI or to a VoiceXML application.
Note, currently you can setup a number for both app which will configure voice to goto VAPI and then legacy SMS to a URL, however app|voicexml|voicefwd are mutually exclusive—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9
from nexmo-cli.
@leggetter would love some clarification on this. The docs (https://docs.nexmo.com/tools/application-api) only show the basic CRUD as far as I can see.
from nexmo-cli.
See the section with the para:
Use the following code examples to make a POST request with Developer API and associate the application_id with your virtual number.
https://docs.nexmo.com/tools/application-api#apps_quickstart
Is that what you're after?
from nexmo-cli.
@leggetter Not really. Isn't that the app:create function in the CLI docs?
from nexmo-cli.
Use the following code examples to make a POST request with Developer API and associate the application_id with your virtual number.
#!/bin/bash
base_url='https://rest.nexmo.com'
version=''
action='/number/update'
application_id='APPLICATION_ID'
key='API_KEY'
secret='API_SECRET'
country='XX'
msisdn='441632960960'
curl -X POST $base_url$version$action \
-d api_key=$key \
-d api_secret=$secret \
-d country=$country \
-d msisdn=$msisdn \
-d voiceCallbackType='app' \
-d voiceCallbackValue=$application_id
As per the text, this is used to associate a number with an app. Isn't that what we're trying to do here?
from nexmo-cli.
@leggetter I think I'm starting to get it. All of the number:setup
calls reflect the number->update
API.
https://docs.nexmo.com/tools/developer-api/number-update
So let's rewrite this:
nexmo number:setup $number [app|sms|voicefwd|voicexml]
[app]
-name [$name|$appid]
[sms]
-url $url
[voicefwd]
-address [$e164Num|$sipuri]
-statusurl $statusCallbackURL *optional
[voicexml]
-url $URLofVXML
-statusurl $statusCallbackURL *optional
As:
nexmo number:update app <number> <app_id>
nexmo number:update sip <???>
nexmo number:update tel <???>
nexmo number:update vxml <???>
As I'm not quite familiar yet with Nexmo, can someone explain to me what the relevant params are for the sip
, tel
, and vxml
types? I've read the docs but it's not made things clearer. It's hard to tell what's required for which type.
from nexmo-cli.
Do we assign a number to an app or an app to a number?
To me it feels like you have a number and you then assign it to an application.
nexmo app:add-number <app_id> <number>
But... A number can only be associated with one app. In fact, we have an idea of number pools where you can create number pools and assign a pool to a number. But there is still some work going on in this space.
from nexmo-cli.
@leggetter honestly no idea. You're the expert :). I'd say a number can be assigned to a few things. This is what the API suggests. So specifying what the number belongs to on the number level might make more sense (and is what the API does, I think). Honestly it's all up to you and what you want. I'd be happy to do either but need some clarity.
from nexmo-cli.
I'm certainly no expert.
Based on a conversation from just over a week ago the docs stating application_type
is actually wrong. Apps (will) have different capabilities
. A voice
is the the only capability right now.
Apps can then have number pools (groups of numbers) associated with them. Or you could say that an app has number pools associated with it. I don't believe we expose number pools right now. So associating single numbers is the best we can do, and I think that's fine for now.
So both
app:add-number <app_id> <number>
number:update <number> <app_id>
may be valid.
My vote would be for 1. @sammachin - what do you think?
from nexmo-cli.
@sammachin thoughts on this?
from nexmo-cli.
I've been thinking:
nexmo link <number> <app_id>
nexmo unlink <number>
That seems the most elegant way to me for now. Does that work?
from nexmo-cli.
Down the line we can make this backwards compatible like this:
nexmo link <number> <xid> --type <type>
Where type is by default app
?
from nexmo-cli.
@leggetter @sammachin I got the nexmo link
working using the updateNumber()
API. Any idea how to unlink
an app from a number? I tried setting voiceCallbackType
to null or a blank string but no luck.
from nexmo-cli.
Ok @sammachin confirmed this is probably not possible yet.
Have release this for now as a simple nexmo link <number> <app_id>
.
from nexmo-cli.
Related Issues (20)
- "exp" should be a number of seconds when generating JWTs
- Recreating a user with the same name returns an irrelevant error message.
- Better error message for failed app link HOT 1
- Support partial app IDs HOT 4
- Display App Names in Verbose Numbers List
- npm `prepublish` scripts are deprecated
- Support host overriding for both api.nexmo and rest.nexmo
- nexmo ml <conversation-id> doesn't show member id HOT 1
- nexmo cc cli issue HOT 1
- [Feature] list users in a nexmo application
- Returns empty list of members in a conversation when there are actual members HOT 2
- Error when creating messages applications HOT 2
- Prompt when creating a new app in a folder already hosting a .nexmo-app
- Define nexmo setup structure in error message HOT 1
- price:country fails HOT 2
- Windows Powershell - "running scripts is disabled on this system" when running `nexmo`
- Creation of application fails when only messages capability is needed. HOT 2
- Hide API_SECRET by default HOT 1
- Error in Validator.Response : Method Failed HOT 2
- nexmo-2.9.1.tgz: 8 vulnerabilities (highest severity is: 9.8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexmo-cli.