Closed tmzt closed 7 years ago
Hello I'm having this problem right now. (I have a demo account and getPhoneNumber is failing)
Do you have a patch at all?
Hey, willis, I have one in my tree http://github.com/tmzt/node-twilio You use getOutgoingPhoneNumber instead of getPhoneNumber let me know if it works I'm on #twilio as tmzt if you need me.
Is this why I can't run the example from the blog post? I cloned tmzt's repo and change to getOutgoingPhoneNumber and I still get the same error with the sandbox number. :(
Hey jamescarr clone the one from my repo. It should work. Let me know if it doesn't
thanks
This library is deprecated in favor of the official library - https://github.com/twilio/twilio-node
Demo accounts (free credit on twilio.com) are not allocated OutgoingNumbers, so client.getPhoneNumber() fails even though there are numbers registered which work for outgoing calls with the REST api, this also means that the registration of incoming events not associated with outgoing calls is automatic which may not be desired.
Proposed fix: add a getOutgoingNumber() call to match getPhoneNumber() which does not register the incoming number callbacks, other wise the API would be unchanged. This may require an additional parameter to the PhoneNumber constructor which is an internal object and not exported.