Comments (12)
@sammachin can't be used for what?
from nexmo-cli.
So the following doesnt work:
➜ ~ nexmo ns NL --sms
3197010240036
➜ ~ nexmo nb NL 3197010240036
Buying 3197010240036. This operation will charge your account.
Please type "confirm" to continue: confirm
Invalid request :: Not valid number format detected [ 3197010240036 ]
from nexmo-cli.
So the problem with this is in the API, not the CLI. We have a ticket on Jira to look into this.
It would be nice if we could replace the country lookup the country code from a static file (libphonenumber?) if NI fails.
from nexmo-cli.
Still an issue.
from nexmo-cli.
The response I got from Eng. was that we just expose libphonenumber in NI basic and there's an on-going debate there about adding M2M numbers https://github.com/googlei18n/libphonenumber/issues/680
from nexmo-cli.
I think we might have to put some sort of local workaround in the CLI to catch these dutch numbers so that the CLI can be used with them
from nexmo-cli.
@sammachin so what would that look like?
from nexmo-cli.
basically a regex thats checked before the NI call and locally returns the country. at the moment its just the dutch M2M numbers which are +31 970 XXXX XXXX so I think the regex would be ^31970\d{8}$
So some sort of function in the code that checks if the number matches the regex and returns NL first and if there's no match falls through to doing an NI check.
Ideally structure it such that we can add more regex's for weird country scenarios in the future if we need to
from nexmo-cli.
That sounds straightforward. I'll have a look at it.
from nexmo-cli.
We have a similar issue thats just arisen with using the CLI to set up linking for shortcodes, (eg 61234) There isn't a pattern that we can use to determine the shortcode as potentially the same shortcode could exist in 2 countries as a different address.
As a workaround for thie and the NL issue along with any other 'invald' number formats could we look to see if the number starts with 2 alpha characters and if so skip the NI lookup and force the country code to whatever the letters are, so entering the number as NL31970XXXXXXXX
would set to NL, similarly entering US61234
would set the country to US and the number to 61234
This needs to work on the link:sms as well as the number buy functions
from nexmo-cli.
thinking a bit more about this I think just providing an optional --country_code
flag on the number:buy
and link:x
functions would be the best option, we already have that flag on buy but it doesn't seem to skip the insight function at the moment
from nexmo-cli.
@sammachin agreed, that seems to be the way to go.
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.