TwilioMagicValues.Calling (Twilio Magic Values v1.0.7) View Source
Wrapper for Twilio magic phone numbers used in tests making calls.
See: https://www.twilio.com/docs/iam/test-credentials#test-calls
Link to this section Summary
Functions
Returns the magic phone number which is BLACKLISTED such that your account cannot call it.
All other phone numbers will return an error when calling from them.
Returns the magic phone number which returns a GEO PERMISSION ERROR when called.
Returns the magic phone number which is INVALID to call from.
Returns the magic phone number which is INVALID to call.
All other recipient phone numbers are potentially valid and are verified normally.
Returns the magic phone number which is UNROUTABLE when called.
Returns the magic phone number which is VALID to call from.
Link to this section Functions
Returns the magic phone number which is BLACKLISTED such that your account cannot call it.
Expect the 21216 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.valid_caller_id(), to: TwilioMagicValues.Calling.blacklisted_recipient())
iex> Map.get(map, :code)
21216
All other phone numbers will return an error when calling from them.
(Other numbers are not verified for your account with your test credentials.)
Expect the 21210 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.from_other("+17148675308"), to: TwilioMagicValues.Calling.to_other("+17148675309"))
iex> Map.get(map, :code)
21210
Returns the magic phone number which returns a GEO PERMISSION ERROR when called.
Expect the 21215 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.valid_caller_id(), to: TwilioMagicValues.Calling.geo_blocked_recipient())
iex> Map.get(map, :code)
21215
Returns the magic phone number which is INVALID to call from.
Expect the 21212 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.invalid_caller_id(), to: TwilioMagicValues.Calling.to_other("+17148675309"))
iex> Map.get(map, :code)
21212
Returns the magic phone number which is INVALID to call.
Expect the 21217 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.valid_caller_id(), to: TwilioMagicValues.Calling.invalid_recipient())
iex> Map.get(map, :code)
21217
All other recipient phone numbers are potentially valid and are verified normally.
Errors are dependent on input.
Returns the magic phone number which is UNROUTABLE when called.
Expect the 21214 API error from Twilio.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.valid_caller_id(), to: TwilioMagicValues.Calling.unroutable_recipient())
iex> Map.get(map, :code)
21214
Returns the magic phone number which is VALID to call from.
Expect no error.
Example
iex> map = make_call(from: TwilioMagicValues.Calling.valid_caller_id(), to: TwilioMagicValues.Calling.to_other("+17148675309"))
iex> Map.get(map, :code, "There is no error code")
"There is no error code"
iex> Map.get(map, :from_formatted)
"(500) 555-0006"