1.1. Sending a VMS

Function (sendVMS)

Sends a voice mail (VMS) to one or more recipients.

Configure the list of recipients by selecting it from the contacts or contact groups saved at your agenda or by inserting the phone numbers manually one by one. Customize the speech and the language of the speech, the date for the sending and the number of attempts.

Example of the request

https://sms.nvia.com/services/sendVMS.php?user=myuser&pass=mypass&
countryID=es&phones=660111222&locutionText=Bienvenido%20al%20servi
cio%20de%20voz&callID=618123123
Copy

This request will make the phone number +34660111222 receive a phone call with the speech “Bienvenido al servicio de voz” from phone number +34618123123.

Parameters of the request

To send the SMS, partners must use the following parameters in the base URL:

PARAMETER DESCRIPTION DEFAULT VALUE REQUIRED
user (urlencode) User’s alias at the panel (calling party) Yes
pass (urlencode) Password of the user at the panel Yes
countryID Alphabetic country code (e.g PT, ES, FR) Yes
phones Phone number/s without the call prefix that will receive the VMS, separated by commas (,) Optional*
contactIDs List of contact identifiers separated by commas (,) Optional*
groupIDs List of group identifiers separated by commas (,) Optional*
callID Phone number without the call prefix that sends the VMS Yes
locutionID Speech identifier Optional**
locutionText Text to turn to speech Optional***
locutionLang Alphabetic code for the language of the speech (spa, eng, etc.) SPA-ESP (Spanish from Spain) Optional
locutionGender Gender of the speech’s voice; values “female” (by default) or “male” Female Optional
campaignName (urlencode) Name of the campaign “Campaign:" + date Optional
startDate (urlencode) Date of the sending formatted Y-m-d H:i:s Current date Y-m-d H:i:s Optional
hangDelay (int) Time interval between dialing and aborting the call if there is no answer, in seconds 30 Optional
retryAttempts (int) Number of redial attempts if the first call wasn’t answered 0 Optional
retryDelay (int) Number of redial attempts if the first call wasn’t answered 0 Optional

*Configure the recipient list as you like by combining contacts from your agenda, groups of contacts from your agenda, or adding numbers manually.

** You can specify the speech ID and text from a previous speech or create a new speech.

***If you wish the voice to spell a word or a code, introduce spaces or points between characters or digits. For example, for a voice to spell the PIN code in the speec Your PIN is 2468 we recommend the following string: Your PIN is "2"."4"."6"."8".

Example of the answer

{ 
status: “OK”, 
campaignID: 1234, 
campaignName: “Campaign: 2018-01-01 12:00:00”, 
campaignCost: 10, 
numCalls: 1, 
locutionID: 87 
}
Copy

Parameters of the answer

PARAMETER DESCRIPTION VALUE
status Action completed correctly OK
status Error in the completion of the action KO
errorMessage Describes the error when status is KO (string)
inputParams Returns a list with compulsory parameters when status is KO (string)
campaignID Unique campaign identifier (int)
campaignName Name of the campaign (string)
campaignCost Cost of the campaign in credits (int)
locutionID Unique speech identifier (int)
numCalls Number of VMS sent correctly (int)
invalidCalls Number of VMS sent in which an error occurred (int)
invalidPhones List of phone numbers that couldn’t be added to the recipient’s list (array)
invalidContactIDs List of contact identifiers that couldn’t be added to the recipient’s list (array)
invalidGroupIDs List of group identifiers that couldn’t be added to the recipient’s list (array)
recipientsInBlackList List of phone numbers that couldn’t be added to the recipient’s list because they belong to a blacklist (array)