Fixes the status showing from started to complete
https://developer.vonage.com/api/voice
sorbet
signature to fix issue with T.nilable(T.untyped)
. See issue #200 and PR #199. Thanks to @KaanOzkan and @vinistock
#Fixes
Fixing an issue caused by the usage of a non thread safe Dictionary.
type
is now set to unicode
, developers now have the option to set to text
if they wish by using the setType()
method on the SMS or OutboundMessage class.
Minor changes to clarify the prices are estimates.
roaming
from standard response as it is not supposed to be returnedoriginal_carrier
was not marked as nullable
The limit for account names has changed from 24 to 80 characters. The original limit was never documented here.
The POST /{api_key}/subaccounts
endpoint now supports a name
property that is up to 80 characters long
true
, the from number will be randomly selected from the pool of numbers available to the application making the call.
FromRandomNumber
to true
, to pull a random available to your application. If FromRandomNumber
is set to true, the From
endpoint must not be set.
sub
should now generate properly under newer PHP versions
New VAPI feature added - the ability to use random from
number, selected from one of the phone numbers assigned to the application.
random_from_number
parameter to POST /v1/calls request;from
in POST /v1/calls request is not mandatory now.
NOTE: VOICE-FAILED has retention of only 7 days (all other ones have 13 months)
EntityId
and ContentId
fields to SMS Requests to compile with India's DLT
Detail
field to call status webhooks to provide more granular detail of certain inbound webhooks.
Channels
parameter would serialize to 0 when not initialized in RecordAction
- the parameter is now properly ignored.
request_id
or request_ids
is required when searching for verify request.
New, simplified method for sending SMS messages.
To send an SMS simply use the Sms client's SendAnSms
function
var smsResponse = smsClient.SendAnSms(FROM_NUMBER, TO_NUMBER, TEXT);
New, simplified method for sending SMS messages.
To send an SMS simply use the Sms client's SendAnSms
function
var smsResponse = smsClient.SendAnSms(FROM_NUMBER, TO_NUMBER, TEXT);
voiceName
parameter as deprecated
To make sure that our APIs meet new regulations, we're adding two new fields to the send-sms endpoint. These are entity-id
and content-id
. The first of these regulations is DLT, which is an Indian regulation. For more information on DLT please go to: https://help.nexmo.com/hc/en-us/articles/204017423-India-Features-Restrictions .
connection_timeout
and socket_timeout
.
language
and style
parameters for text-to-speech. E.g.var talkAction = new TalkAction() { Text = "Hei dette er en tekst-til-tale-samtale fra vonage " + extraText, Language="no-NO" };
VoiceName
parameter has been deprecated.
POST
requests had left nameless objects in the API definition and this trips up some codegen tooling.ip_address
fields that we no longer use.
Added connection_timeout
and socket_timeout
to voice
capabilities - webhooks.
Don't be scared off by this large release! Most of it is under-the-hood syntax cleanup. Thank you to everyone during Hacktoberfest for the cleanup and help with the SDK!
The big addition was we added support for VAPI Language and Style (https://developer.nexmo.com/voice/voice-api/guides/text-to-speech), and fixed a bug when manually setting the Verify code length.
examples/
directory as the code snippets repo is much more up-to-date
name
parameter to ModifySubaccountRequest
Async
to the end of the old method name - e.g. SendAnSmsAsync
CreateCall
has two new overloads which support either two phone numbers (to and from) and an NCCO, or a to endpoint and from number and NCCO
Changed Nexmo references to Vonage.
When the recommended TTS fields changed from voice_name
to language
and style
, we completely removed the voice_name
from the API description but it's still supported in the API itself. A more accurate way to describe the API would be to include the field but clearly mark it as deprecated.
(see also: an open issue to have our docs mark this more clearly. Other platforms should do it though https://github.com/Nexmo/nexmo-oas-renderer/issues/87)
A special thanks to all of the Hacktoberfest contributions. Your work is appreciated!
ocramius/package-versions
for composer/package-versions-deprecated
to work with Composer 2
beta
and beta2
paths to v0.1
and v0.2
respectively.
beta
and beta2
paths to v0.1
and v0.2
respectively.
nexmo-jwt
gem dependency to v0.1.2. Fixes the ACL path parameter formation in JWT creation.
New report type and corresponding product
value supported: WEBSOCKET-CALL
.
\Vonage\Numbers\Client::searchAvailable()
now correctly handles filters using FilterInterface
Refreshing the Olympus OAS spec so that it can be a bit more usable then it is now. Making all channel/messageType permutations tabbable. Also made whatsapp
node a required part of a WhatsApp message for MTM messages.
Example:
NewMessage
operationwhatsapp
node a required field for MTM
While working with the Number Insights API I found a couple of really minor things so I fixed them.
error_text
field to the async response of Number Insight APIremaining_balance
data type to be a string everywhere on Number Insight API
This release includes a minimum version bump to PHP 7.2, as 7.1 is nearing full EOL. This also better allows us to support Guzzle 7 out of the box.
This version serves as the change from the Nexmo namespace to the Vonage namespace. The module now resides on NPM as
@vonage/server-sdk
. Prior versions under the Nexmo namespace will remain in maintenance mode for the next 12 months and recieve bug and security fixes. All new functionality will only be added to the @vonage namespace.
nexmo
to @vonage/server-sdk
eventUrl
was being set as a string, changed to single element array of strings
\Vonage\Client\MapFactory::make()
to always instantiate new objects
5.3.0 switches all naming in the SDK from Nexmo -> Vonage. And marks the first release of the new Vonage nuget package.
The Nexmo namespace is preserved but all classes within it are marked as deprecated as they will be removed in the next major release (6.0).
This release contains a major milestone where all the code is now under the \Vonage
namespace! Do not worry though, any existing code using the \Nexmo
namespace will still continue to work thanks to a new vonage/nexmo-bridge
package which will translate between the two namespaces. The next time you update your Nexmo client to this or any subsequent 2.x releases, your code will continue to work with no changes.
It is recommended to start using the \Vonage
namespace in any new code you create, but even new features added (like our PSD2 feature in this release) will work under either namespace. Developers will be able to update at their own pace.
vonage/nexmo-bridge
as a dependency so \Nexmo
namespaced code works with the new \Vonage
namespace\Vonage\Client\APIResource
can now specify headers for individual requests\Nexmo
to \Vonage
for all classes, interfaces, and traits
country
as a search option for Nexmo\Numbers\Client::searchOwned()
target_api_key
parameter for the number.buy()
and number.cancel()
methods.\n
with newlines for easier usage in environment variables.
app
as possible endpoint types for a create call request
New talk operation parameters added: language
and style
Adds new utility methods for parsing inbound webhooks from Vonage Fixes bug with parsing multi-input event webhooks.
Minor bugfix release based on feedback:
This release focuses on deprecation of dead and old code, and preps many internal changes in regards to v3.0.0. Where possible upcoming v3.0.0 changes were backported where backward-compatibility could be maintained.
$client->voice()
and $client->sms()
, respectivelyNexmo\Client
"show_deprecations" config option. This can help devs update in preparation in v3.0.0, and will be utilized in the future as things are deprecated.toArray()
serialization method, to discourage direct use of jsonSerialize()
fromArray()
hydration methodNexmo\Client\APIResource
and Nexmo\Entity\IterableAPICollection
Nexmo\Client\Factory\MapFactory
is now PSR-11 compliant, and can use factoriesNexmo\Verify\Request
for starting new Verification requestsFor a detailed list of things that may impact an application, enable the show_deprecations
Nexmo\Client
option to see deprecation notices for specific code flows.
$client->messages($filter)
to search has been deprecated in favor of bespoke search methodsNexmo\Verify\Verification
objects full functionality has been deprecated, and will be used only as a value object for search requests in the futureNexmo\Conversations
and Nexmo\User
have been deprecated and will be removed in the future as the feature is in Beta status and has diverged from this implementationNexmo\Voice\Call
and Nexmo\Voice\Message
have been deprecated and will be removed in the future as the TTS API is deprecatedNexmo\Client\Exception\ThrottleException
and has been implemented in SMS and the Numbers APINexmo\SMS\Client::send()
as it now returns a fully hydrated collection object as a response, however this needs to be updated in Laravel itself via an update to nexmo/laravel
and laravel/nexmo-notification-channel
Nexmo\SMS\Client::send()
as it now returns a fully hydrated collection object that is much more up-front it is not a single objectNexmo\SMS\Webhook\InboundSMS
th-th
) and Yue Chinese (yue-cn
) languages
nexmo-jwt
gem.app_id
in the Numbers API with the SDK.
transfer
action
length_timer
description to match an actual VAPI call state, which is answered
.
This new version of the .NET Nexmo SDK Introduces the new PSD2 feature for the Vonage Verify API.
For more details about using this feature see its code snippets. And its API Reference
POST /calls
in to a oneOf for answer_url
and ncco
optionsPUT /calls/:id
in to a oneOf for transfer
with answer_url
and ncco
options, plus hangup
, mute
, unmute
, earmuff
, unearmuff
dtmfAnswer
from the from
option when placing a callncco
, event_url
and answer_url
POST /calls
in to a oneOf for answer_url
and ncco
optionsPUT /calls/:id
in to a oneOf for transfer
with answer_url
and ncco
options, plus hangup
, mute
, unmute
, earmuff
, unearmuff
dtmfAnswer
from the from
option when placing a callncco
, event_url
and answer_url
/account/get-balance
/account/top-up
numbers
key from Create Conversationevent_url
example
GET /v1/calls
endpoint returns a different data structure than we describe in the spec. Spec says: array of objects with "from" and "number" properties. In reality we get just get one of those objects, no array.
We've added a few new features to the .NET SDK, here's an enumeration of them.
Older iterations of the SDK didn't feel very ".NET", this release fixes that.
We've abstracted all API Calls behind interfaces allowing easy substitution via dependency injection for your testing. For example, the Legacy SDKs SMS class is replaced by the ISmsClient
interface, which you can speak through or replace on your own.
All of the new structures and APIs are now compliant with .NET naming conventions. Additionally, we've introduced many new enums to remove some open string fields. We preserved the legacy structures but marked them as obsolete as a gentle reminder to update the latest version as this will make upgrading easier.
A new means of logging has been added to the SDK built around Microsoft.Extensions.Logging. Thus you can configure the logging of the SDK to use whatever logging format you want; you can make it as compliant to your own logs as you'd like, and there's no need to log our SDKs outputs to your log files. See my explainer about how this is structured and how you can get up and logging with your own logs!
The SDK now comes with a summary docs file to make it easier for you to determine how to go about building your applications.
All API calls will throw an exception containing a best-effort description of what went wrong if they encounter an error. This includes all 4xx, 5xx responses, and errors from the SMS, Numbers, Number Insight, and Verify APIs that might respond with a 200 OK response and an error code. All of these exceptions will be of the type NexmoException
(SubTypes NexmoSmsResponseException
, NexmoNumberInsightResponseException
, NexmoNumberResponseException
, NexmoVerifyResponseException
) or NexmoHttpRequestException
.
There are similar errors that will be thrown for the legacy APIs as well.
We've also made some significant enhancements under the hood that will be less relevant to interacting with the API but might still be interesting.
We've refactored all of the internal ApiRequest
methods to make them more user friendly and generic. You can have a look here.
Note: These methods are not considered part of the public API of the SDK and are subject to change without notice.
We've added a whole new suite of unit tests to prevent things from breaking on their way out the door. Unit test coverage went from 33% in 4.4.0 to 87% in 5.0. Virtually everything that is not tested is either legacy or a third party file previously incorporated into the SDK.
We've done our best to ensure that the upgrade path to 5.0 will be as seamless as possible. The new structures should not affect current users of the SDK though I would encourage everyone to heed the obsolescence warnings. That said, there are a couple of breaking changes between 4.x and 5.x that you should be aware of.
We've removed LibLog, thus without action on the developer's part logs will cease to be intermingled with developer's logs.
New exceptions will be thrown in the case of any error being encountered on an API call, this includes 200 responses with error codes.
If anyone encounters any issues please open an issue in the Github repo
/search
returns the status 101 response
apiKey
and apiSecret
optional when applicationId
and privateKey
are present in Nexmo constructor.
Adding new Automatic Speech Recognition (ASR) action to NCCO Action set. To start an asr input you will construct a MultiInputAction and return it from your answer webhook:
[HttpGet("/webhooks/answer")]
public string Answer([FromQuery]Answer request)
{
var host = Request.Host.ToString();
//Uncomment the next line if using ngrok with --host-header option
//host = Request.Headers["X-Original-Host"];
var eventUrl = $"{Request.Scheme}://{host}/webhooks/asr";
var speechSettings = new SpeechSettings {Language="en-US", EndOnSilence=1, Uuid = new[] { request.Uuid } };
var inputAction = new MultiInputAction { Speech = speechSettings, EventUrl = new[] { eventUrl } };
var talkAction = new TalkAction { Text = "Please speak now" };
var ncco = new Ncco(talkAction, inputAction);
return ncco.ToString();
}
This will allow a user to perform inputs with speech. After the end conditions are met for the voice input you will then get a webhook returned to you containing an ordered list of guesses for what speech your user said on the EventUrl
that you passed through the MultiInputAction. That can be handled like so:
[HttpPost("/webhooks/asr")]
public string OnInput()
{
MultiInput input;
using (StreamReader reader = new StreamReader(Request.Body, Encoding.UTF8))
{
var result = reader.ReadToEndAsync().Result;
input = JsonConvert.DeserializeObject<MultiInput>(result);
}
var talkAction = new TalkAction();
talkAction.Text = input.Speech.SpeechResults[0].Text;
var ncco = new Ncco(talkAction);
return ncco.ToString();
}
event_url
parameter is only required for creating a call request when it is not previously set at the application level.
voice_name
parameter of PUT /v1/calls/{uuid}/talk
operation.
id
not message_id
id
.
fallback
policy from whatsapp
locale configurationfallback
is sent
number
attribute of the EndpointPhone
object as required.{"type":400,"title":"Bad Request","invalid_parameters":[{"reason":"part of phone type and cannot be empty or NULL","name":"number"}]}
mms
number type
to
number is a string but was displaying as number in response examples.
client_ref
request parameter to the event callback data
headers
type from a string to an object - the string type was injecting escape charecters into the headers object payload.
messages_id
parameter to id
app_id
parametermessagesCallbackType
and messagesCallbackValue
voiceCallbackValue
with type app
/v2/reports/records
endpoint for fetching data records synchronously
api-key
field to Inbound SMS request body.
start_time
to include detail that it is only provided for completed
calls
ip_address
field isn't expected/used
apiHost
& restHost
Adding workflows 6, SMS, and 7, TTS to the SDK's enumerated values.
'"()&%UXkI(9912)
fallback
policy from Jan 2020.
EventType
in NexmoConversation.getEvents
NexmoConversation myConversation
//Get all text event for a specifc conversation
myConversation.getEvents(10, NexmoPageOrderDesc, "text", new NexmoRequestListener<NexmoEventsPage> {
void onError(@NonNull NexmoApiError error){
}
void onSuccess(@Nullable NexmoEventsPage result){
Collection<NexmoEvent> textEvents = result.getData()
}
});
//Get all member event for a specifc conversation
myConversation.getEvents(10, NexmoPageOrderDesc, "member:*", new NexmoRequestListener<NexmoEventsPage> {
void onError(@NonNull NexmoApiError error){
}
void onSuccess(@Nullable NexmoEventsPage result){
Collection<NexmoEvent> memberEvents = result.getData()
}
});
didReceiveCall
and didReceiveConversation
being called only once for the same call or conversation.pushKit
or userNotification
token.NXMClientConfig
region URLs.NXMConnectionStatusReasonUserNotFound
.armv7
and armv7s
.
NXMClientConfig *config = [[NXMClientConfig alloc] initWithApiUrl:restUrl
websocketUrl:wsUrl
ipsUrl:ipsUrl
iceServerUrls:iceUrls];
[NXMClient setConfiguration:config]
This configuration is optional and a default will be set if not specified.
Note: setConfiguration
should be used before accessing NXMClient.shared
.
Corrected nil values for fromMember
for NXMConversation
events.
applicationId
anymore.
target_api_key
field when buying or cancelling a number using Numbers API
iceServerUrls
parameters to NexmoClient.Builder
NXMClient
's getConversationsPageWithSize:order:completionHandler:
method to get conversations with paging.
NXMConversationsPage
, which represents the retrieved page, provides the following instance methods
hasNextPage
/ hasPreviousPage
to check if forward/backward page retrieval is possible andnextPage:
/ previousPage:
to asynchronously retrieve the next/previous page.NXMClient
's getConversationWithUUid:completionHandler:
method's name typo (now called getConversationWithUuid:completionHandler:
).
req_id
to empty string in /verify
endpoint.
use_primary_account_balance
is true.
NXMClientConfig
object in order to change data center configuration. How to use:
[NXMClient setConfiguration:NXMClientConfig.DC]
NXMClient setConfiguration
is optional, configuration will set to a default value.
Note: you most call setConfiguration
method before using NXMClient.shared
.
api_key
(authentication) and account_id
(target of the report)
NexmoClient.login()
, remove NexmoRequestListener<NexmoUser>
parameternexmoClient = new NexmoClient.Builder().build(context);
nexmoClient.setConnectionListener(new NexmoConnectionListener() {
@Override
public void onConnectionStatusChange(ConnectionStatus connectionStatus, ConnectionStatusReason connectionStatusReason) {
switch (connectionStatus){
case CONNECTED:
//the client is connected to the server - the login successed
case DISCONNECTED:
case CONNECTING:
case UNKNOWN:
//the client is not connected to the server - the login failed/not yet successed
}
});
NexmoClient.login("MY_AUTH_TOKEN")
NexmoConversation.sendAttachment
bugNexmoAttachmentEvent
received from backend
conversation.invite()
to not include empty user_id
or user_name
fields within the requests
ip_match
parameter for Advanced NI, and remove the ip
object from the response. IP matching is no longer supported due to this information being unreliable globally.
NXMConversationDelegate
did receive DTMF event method:
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveDTMFEvent:(nullable NXMDTMFEvent *)event;
NXMClient
- client enable push notifications method changed.
param pushKitToken
- only for VoIP push (incoming calls).
param userNotificationToken
- all push types:
- (void)enablePushNotificationsWithPushKitToken:(nullable NSData *)pushKitToken
userNotificationToken:(nullable NSData *)userNotificationToken
isSandbox:(BOOL)isSandbox
completionHandler:(void(^_Nullable)(NSError * _Nullable error))completionHandler;
/v1/redact/transaction
endpoint uses basic auth, not key and secret in the query string
country
code parameter
termination_status
to status
voiceCallbackType
parameter
messagesCallbackType
to enable messaging capabilityThe . Specify app
in voiceCallbackType
instead. messagesCallbackType
and messagesCallbackValue
parameters are still supported, but we discourage their use.
debug
, info
,
This release contains a few quality of life changes for the SDK. We have added support for sending a Workflow ID to our Verify API, as well as the ability to search your existing numbers for ones that are attached to an application or not, or for all the numbers attached to a specific application.
has_application
and application_id
Added support for verification workflow id add transfer to NCCO support Remove unnecessary declarations of throwing of IOExceptions.
url
to download_report
and put it under _links
field.trace_id
from ip_voice
.ip_voice
to conversations
and made ip_voice
it's subtype.msisdn
to number
for hlr
reports.
/record
endpoint to be the correct endpoint for this service.
Release 4.1.2 Fixes hash / HMAC signing and validation of signed messages for an example of how to manage signing / validation of signed messages visit https://developer.nexmo.com/concepts/guides/signing-messages/dotnet
action
as required body field for recordConversation
uuid
of the leg, not of the call
date_finalized
to the outbound SMS CSV reportdate_end
example
Numbers API has new filters to make it easier to find numbers that are (or are not!) associated with applications
Added new has_application
and application_id
filters to the Numbers API
media.record()
functionconversations
in login, when sync
is lite
or full
This release contains a few under-the-hood changes. The largest is the bump to PHP 7.1, which may affect some customers. If you are on an older version of PHP, you will be limited to SDK v1.8.1 or lower.
We have also renamed this package into nexmo/client-core
and added a new wrapper package to replace nexmo/client
. For most customers this process should be seamless, and composer should automatically handle the change. This change is made to remove a collision between our package and others that may supply Guzzle themselves.
If you use the SDK to search for numbers, please be advised that we did change the response for when no numbers are found. It will now return an empty array instead of throwing an exception. Other searches are not affected and will continue to throw their original exceptions.
Exceptions will now support an additional getEntity()
method that returns additional information about what happened. In many cases this is the response from the server, to make it easier to understand the API error message. Exceptions continue to return error codes and messages like before, but the getEntity()
method can be used for better context during error handling.
Please check the rest of the changelog for a full list of changes.
getEntity()
method to get more information during errorsnexmo/client-core
nexmo/client
v4.1 Fixes the structure of the application update API. This changed structure may require some code changes as the previous implementation created an erroneous structure for performing the update and start request. Use something along the lines of the following to create the request for the update / create:
var request = new AppRequest()
{
Name = name,
Capabilities = new Capabilities()
{
Messages = new MessagesWebhook(
new Webhook() { Address = "https://example.com/webhooks/inbound", HttpMethod = "POST" },
new Webhook() { Address = "https://example.com/webhooks/status", HttpMethod = "POST" }),
Rtc = new RtcWebhook(
new Webhook() { Address = "https://example.com/webhooks/event", HttpMethod = "POST" }),
Voice = new VoiceWebhook(
new Webhook() { Address = "https://example.com/webhooks/answer", HttpMethod = "GET" },
new Webhook() { Address = "https://example.com/webhooks/event", HttpMethod = "POST" }),
Vbc = new VbcWebhook()
}
};
v4.1 Fixes the Redact API, this can be invoked like so:
var result = client.Redact.RedactTransaction(redactRequest: new Redact.RedactRequest(NEXMO_REDACT_ID, NEXMO_REDACT_PRODUCT));
v4.1 Adds support for retrieving voice recordings using the GetRecording API invoke like so:
var response = client.Call.GetRecording(recordingUrl);
ConversationsPage
object// iterate through conversations before
application
.getConversations()
.then((conversations) => {
conversations.forEach(conversation => {
render(conversation);
})
});
// iterate through conversations after
application
.getConversations({ page_size: 20 })
.then((conversations_page) => {
conversations_page.items.forEach(conversation => {
render(conversation);
})
});
EventsPage
object// iterate through events before
conversation
.getEvents()
.then((events) => {
events.forEach(conversation => {
render(conversation);
})
});
// iterate through events after
conversation
.getEvents({ event_type: 'member:*' })
.then((events_page) => {
events_page.items.forEach(event => {
render(event);
})
});
application.callPhone
to application.callServer
application.call
to application.inAppCall
call.createPhoneCall
to call.createServerCall
Call
to NXMCall
ConversationClient
to NexmoClient
ConversationClientError
to NexmoClientError
conversationClient.js
and conversationClient.min.js
to nexmoClient.js
and nexmoClient.min.js
member:call:state
event (use instead member:call:status
)//sending a custom event type to a conversation
conversation
.sendCustomEvent({type: 'my_custom_event', body: { enabled: true }})
.then((custom_event) => {
console.log(event.body);
});
//listening for a custom event type
conversation.on('my_custom_event', (from, event) => {
console.log(event.body);
});
PageConfig
class for configuring settings for paginated requestsPage
class to wrap results of paginated requests:*
(eg. event_type: member:*
)new NexmoClient({
conversations_page_config: {
page_size: 25,
order: 'asc'
cursor: 'abc'
},
events_page_config: {
page_size: 50,
event_type: 'member:*'
}
})
ConversationsPage
& EventsPage
which extend Page
class to wrap results of paginated requests for conversations and eventsConversationsPage
& EventsPage
objects to fetch previous and next pages of conversations & eventsapplication.conversations_page_last
.getNext((conversations_page) => {
conversations_page.items.forEach(conversation => {
render(conversation)
})
})
conversation.events_page_last
.getPrev((events_page) => {
events_page.items.forEach(event => {
render(event)
})
})
callServer
function// IP-IP call scenario
application
.callServer('username', 'app')
.then((nxmCall) => {
// console.log(nxmCall);
});
// IP-PSTN call scenario
application
.callServer('07400000000')
.then((nxmCall) => {
// console.log(nxmCall);
});
reason
object to receive reason.reason_text
and reason.reason_code
fieldsEvent
class to NXMEvent
event:delivered
text:delivered
image:delivered
event:seen
text:seen
image:seen
conversation:events
audio:play
conversation:delete
conversation:invite
text
text:typing:on
text:typing:off
new:conversation
conversation:get
user:conversations
user:get
conversation:join
audio:say
audio:earmuff:on
audio:earmuff:off
audio:dtmf
audio:record
audio:play
conversation:member:delete
event:delete
audio:ringing:start
audio:ringing:stop
audio:mute:on
audio:mute:off
image
rtc:new
rtc:answer
rtc:terminate
knocking:new
knocking:delete
Added workflow_id to verify_request
This release contains a few under-the-hood changes. The largest is the bump to PHP 7.1, which may affect some customers. If you are on an older version of PHP, you will be limited to SDK v1.8.1 or lower.
We have also renamed this package into nexmo/client-core
and added a new wrapper package to replace nexmo/client
. For most customers this process should be seamless, and composer should automatically handle the change. This change is made to remove a collision between our package and others that may supply Guzzle themselves.
If you use the SDK to search for numbers, please be advised that we did change the response for when no numbers are found. It will now return an empty array instead of throwing an exception. Other searches are not affected and will continue to throw their original exceptions.
Exceptions will now support an additional getEntity()
method that returns additional information about what happened. In many cases this is the response from the server, to make it easier to understand the API error message. Exceptions continue to return error codes and messages like before, but the getEntity()
method can be used for better context during error handling.
Please check the rest of the changelog for a full list of changes.
getEntity()
method to get more information during errorsnexmo/client-core
nexmo/client
Nexmo.generateSignature
to verify signed messages
NexmoClient
when disconnected returns error callback for all function.CallMember
status calculated by the current leg status.CallMember
supports failed, busy, timeout and canceled statuses.Conversation
has media methods.NexmoClient
is now singleton.NexmoClient
delegate methods renamed.NXMConversation myConversation;
[myConversation enableMedia]; // my media will be enabled
[myConversation disableMedia]; // my media will be disabled
Added invite member:
NXMConversation myConversation;
[myConversation inviteMemberWithUsername:@"someUsername"
completion:myCompletionBlock];
NXMMember *member = someMember;
NSDictionary<NSValue *, NXMInitiator *> *initiators = member.initiators;
NXMInitiator leftStateInitiator = initiators[NXMMemberStateLeft];
leftStateInitiator.isSystem;
leftStateInitiator.userId;
leftStateInitiator.memberId;
leftStateInitiator.time;
Added NXMConversationUpdateDelegate
to notify on member updates like media,leg, and state.
Added updatesDelegate
property to NXMConversation
:
@property (nonatomic, weak, nullable) id <NXMConversationUpdateDelegate> updatesDelegate;
Example:
@interface MyClass() <NXMConversationUpdateDelegate>
@implementation MyClass
- (void)setConversation:(NXMConversation *conversation) {
conversation.updatesDelegate(self); // register to conversation updatesDelegate
}
- (void)conversation:(nonnull NXMConversation *)conversation didUpdateMember:(nonnull NXMMember *)member withType:(NXMMemberUpdateType)type {
if (type == NXMMemberUpdateTypeState) {
// the member state changed
}
if (type == NXMMemberUpdateTypeMedia) {
// the member media changed
}
}
@end
NXMClient
is now a singleton:NXMClient.shared // the shared instance of NXMClient
Renamed:
@property (nonatomic, readonly, nullable, getter=getToken) NSString *authToken; // was token
// was - (void)login;
- (void)loginWithAuthToken:(NSString *)authToken;
// was - (void)refreshAuthToken:(nonnull NSString *)authToken;
- (void)updateAuthToken:(nonnull NSString *)authToken;
// was callees array
- (void)call:(nonnull NSString *)callee
callHandler:(NXMCallHandler)callHandler
delegate:(nullable id<NXMCallDelegate>)delegate
completion:(void(^_Nullable)(NSError * _Nullable error, NXMCall * _Nullable call))completion;
completionHandler:(void(^_Nullable)(NSError * _Nullable error, NXMCall * _Nullable call))completionHandler;
NXMClientDelegate
renamed:@protocol NXMClientDelegate <NSObject>
// was - (void)connectionStatusChanged:(NXMConnectionStatus)status reason:(NXMConnectionStatusReason)reason;
- (void)client:(nonnull NXMClient *)client didChangeConnectionStatus:(NXMConnectionStatus)status reason:(NXMConnectionStatusReason)reason;
// was - (void)incomingCall:(nonnull NXMCall *)call;
- (void)client:(nonnull NXMClient *)client didReceiveCall:(nonnull NXMCall *)call;
// was - (void)incomingConversation:(nonnull NXMConversation *)conversation;
- (void)client:(nonnull NXMClient *)client didReceiveConversation:(nonnull NXMConversation *)conversation;
@end
NXMConversation
otherMembers
property renamed to allMembers
:NXMConversation myConversation = someConversation;
NSArray<NXMMember *> * allMembers = myConversation.allMembers // return the all conversation members
- (void)joinMemberWithUsername:(nonnull NSString *)username // username instead of userId
NXMConversationDelegate
renamed methods:// was - (void)customEvent:(nonnull NXMCustomEvent *)customEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveCustomEvent:(nonnull NXMCustomEvent *)event;
// was - (void)textEvent:(nonnull NXMMessageEvent *)textEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveTextEvent:(nonnull NXMTextEvent *)event;
// was - (void)attachmentEvent:(nonnull NXMMessageEvent *)attachmentEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveImageEvent:(nonnull NXMImageEvent *)event;
// - (void)messageStatusEvent:(nonnull NXMMessageStatusEvent *)messageStatusEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMessageStatusEvent:(nonnull NXMMessageStatusEvent *)event;
// was - (void)typingEvent:(nonnull NXMTextTypingEvent *)typingEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveTypingEvent:(nonnull NXMTextTypingEvent *)event;
// was - (void)memberEvent:(nonnull NXMMemberEvent *)memberEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMemberEvent:(nonnull NXMMemberEvent *)event;
// was - (void)legStatusEvent:(nonnull NXMLegStatusEvent *)legStatusEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveLegStatusEvent:(nonnull NXMLegStatusEvent *)event;
// was - (void)mediaEvent:(nonnull NXMEvent *)mediaEvent;
- (void)conversation:(nonnull NXMConversation *)conversation didReceiveMediaEvent:(nonnull NXMMediaEvent *)event;
Use username
instead of userId
.
NXMCallDelegate
renamed:
// was - (void)statusChanged:(nonnull NXMCallMember *)callMember;
- (void)didUpdate:(nonnull NXMCallMember *)callMember status:(NXMCallMemberStatus)status;
- (void)didUpdate:(nonnull NXMCallMember *)callMember muted:(BOOL)muted;
// was - (void)DTMFReceived:(nonnull NSString *)dtmf callMember:(nonnull NXMCallMember *)callMember;
- (void)didReceive:(nonnull NSString *)dtmf fromCallMember:(nonnull NXMCallMember *)callMember;
NXMEvent
and NXMMemberEvent
add member object instead of memberId
:
@property (nonatomic, readonly, nonnull) NXMMember *member;
NXMImageInfo
renamed properties:
@property NSInteger sizeInBytes; // was size
@property NXMImageSize size; // was type
NXMMessageStatusEvent
renamed property:
@property NSInteger referenceEventId; // was refEventId
NexmoClient
logger exposed - NXMLogger
object:
[NXMLogger setLogLevel:NXMLoggerLevelDebug];
NSArray *logNames = [NXMLogger getLogFileNames];
NXMLoggerDelegate
:NXMClient myClient
[myClient setLoggerDelegate:LoggerDelegate];
/conversations/{conversation_id}/record
endpoint for REST start/stop Conversation recording
Version 1 of the application API has been deprecated. It will continue to work for the foreseeable future, and any shutdown will be communicated to all customers before it happens.
Please use version 2 of the Applications API to manage your applications going forwards. Applications created with version 1 of the API can also be managed with version 2
Version 2 of the Application API is no longer in beta! Production tests of this new major version have been successful and we recommend that all consumers update to using version 2 at their earliest convenience
async
and callback
on the AdvancedInsightRequest
object.ringback
support to the onAnswer
part of the PhoneEndpoint
.com.nexmo.client.applications
package to com.nexmo.client.application
ApplicationClient
now supports the Applications v2 API. This change has resulted in some backwards incompatibility.NexmoClientException
is now a RuntimeException
. The various sub client methods will still declare that it is being thrown, but it is no longer a requirement to catch the exception. Additionally, the IOException
that was being thrown in each method has been converted to a NexmoResponseParseException
to more accurately reflect when it is thrown. This is also an unchecked exception and catching is no longer required.NexmoUnacceptableAuthException
will now add which parameters are missing instead of which internal auth methods.
Add the new estimated_price_messages_sent
field to the search endpoint.
This field was already returned by the check/
endpoint but has now been added to the search as well.
messages
application type and examples
This adds the 401 and 404 HTTP responses for a PUT
request to /calls/:call_id
.