 |
WSDL entry point : http://www.phoneconfirm.com/soap/Jobs.asmx?wsdl Jobs object: http://www.phoneconfirm.com/soap/Jobs.asmx
AddJob- starts new confirmation request. It is an async function and returns immediately.
Parameters: |
 |
UserGuid - this is your personal ID that is generated during account sign-up. You must keep this ID private. |
Number - Phone Number to call. |
Text - This is a message to be delivered. The text can contain the following variables:
 |
@PIN specifies the place where pin will be spoken; |
@File=<filename> - allows to play a file previously uploaded to the web site. |
@VoiceConfirmation - allows to record a user voice reply only for Notification message type. The size is limited by 1 min and a user can stop recording pressing "#" sign. The url to this recorded file will be included in the Response in VoiceLink parameter. |
|
PIN - Transaction confirmation code that either spoken to a user if it is a notification call or waited to be pressed by user if it is confirmation call. Optional. If it is null PhoneConfirm Service will generate 5 char sequence. |
TransactionID - Unique client specified ID that is returned unchanged in a response. |
JobType - enum. There are 2 types availible:
 |
- Notification. Means that user will receive a phone call and message will be played without waiting for PIN. |
- Confirmation. Means that text is played and then we wait for user to input PIN. |
|
Result: |
 |
If the function succeeds the result value is a unique job descriptor. It is a parameter for GetJobStatus function. |
SendConfirmation- starts new confirmation request. It is a sync function and returns immediately.
Parameters: |
 |
UserGuid - this is your personal ID that is generated during account sign-up. You must keep this ID private. |
Number - Phone Number to call. |
Text - This is a message to be delivered. |
PIN - Transaction confirmation code that either spoken to a user if it is a notification call or waited to be pressed by user if it is confirmation call. Optional. If it is null PhoneConfirm Service will generate 5 char sequence. |
TransactionID - Unique client specified ID that is returned unchanged in a response. |
JobType - enum. There are 2 types availible:
 |
- Notification. Means that user will receive a phone call and message will be played without waiting for PIN. |
- Confirmation. Means that text is played and then we wait for user to input PIN. |
|
Result: |
 |
If the function succeeds, the result value will be an instance of JobStatus type. |
AddJobEx- starts new confirmation request. It is an async function and returns immediately.
Parameters: |
 |
UserGuid - this is your personal ID that is generated during account sign-up. You must keep this ID private. |
Number - Phone Number to call. |
Text - This is a message to be delivered. |
PIN - Transaction confirmation code that either spoken to a user if it is a notification call or waited to be pressed by user if it is confirmation call. Optional. If it is null PhoneConfirm Service will generate 5 char sequence. |
JobType - enum. There are 2 types availible:
 |
- Notification. Means that user will receive a phone call and message will be played without waiting for PIN. |
- Confirmation. Means that text is played and then we wait for user to input PIN. |
|
JobDetails - Additional settings:
 |
TransactionID - Unique client specified ID that is returned unchanged in a response. |
ReplyEmail - specifies a email account where an opetation result will be duplicated. |
ThankYouFile - a file that will be played at the end of the message. If this parameter is omitted, the default Thank you file will be played. |
Extension - Phone extension to be dialed after connect. |
ExtensionDelay - Delay in secs to wait until dialing phone extention. |
MaxCallDuration - Maximum duration of a call. |
SingleDigitMode - Waiting for one press. |
NotificationType - enum. There are 2 types availible:
 |
- Phone. Means that user will receive a phone call. |
- SMS. Means that user will receive a sms message. |
|
Result: |
 |
If the function succeeds the result value is a unique job descriptor. It is a parameter for GetJobStatus function. |
SendConfirmationEx- starts new confirmation request. It is a sync function and returns immediately.
Parameters: |
 |
UserGuid - this is your personal ID that is generated during account sign-up. You must keep this ID private. |
Number - Phone Number to call. |
Text - This is a message to be delivered. |
PIN - Transaction confirmation code that either spoken to a user if it is a notification call or waited to be pressed by user if it is confirmation call. Optional. If it is null PhoneConfirm Service will generate 5 char sequence. |
JobType - enum. There are 2 types availible:
 |
- Notification. Means that user will receive a phone call and message will be played without waiting for PIN. |
- Confirmation. Means that text is played and then we wait for user to input PIN. |
|
JobDetails - Additional settings:
 |
TransactionID - Unique client specified ID that is returned unchanged in a response. |
ReplyEmail - specifies a email account where an opetation result will be duplicated. |
ThankYouFile - a file that will be played at the end of the message. If this parameter is omitted, the default Thank you file will be played. |
Extension - Phone extension to be dialed after connect. |
ExtensionDelay - Delay in secs to wait until dialing phone extention. |
MaxCallDuration - Maximum duration of a call. |
SingleDigitMode - Waiting for one press. |
|
Result: |
 |
If the function succeeds, the result value will be an instance of JobStatus type. |
GetJobStatus
- returns a job status;
Parameters: |
 |
JobGuid - unique job descriptor returned by AddJob function. |
Result: |
 |
If the function succeeds the result value is JobStatus instance. |
JobStatus instance:
 |
ProcessingStage - enum. There 4 processing stages: Waiting, Processing, Processed, Failed; |
ConfirmationResult - Must be used only if ProcessingStage is Processed; Can be true only if:
 |
- it has been a Confirmation call and user pressed correct PIN; |
- it has been a Notification call and has heard PIN. |
|
TransactionID - Unique client specified ID that is returned unchanged in a response. |
VoiceLink - provides an URL to a recorded Voice Confirmation file. |
PIN - pin code used during the call. |
PinOut - actual pin entered. |
ErrorCode - Error Code. |
ErrorDesc - Error Description. |
|
Example:
using System;
using System.Threading;
using System.Web.Services.Protocols;
using Sample.JobsRef;
namespace Sample
{
class PHCSample
{
[STAThread]
static void Main(string[]
args)
{
Jobs jobs = new Jobs();
//
Starting new confirmation request.
string jobGuid
= jobs.AddJob( "5a1543bb3fcc40a7b96e32eh0c8434c7", "016529318807", "@File=welcome.wav This is the sample message. Please press @PIN", null/*Pin
will be autogenerated*/, null, JobType.Confirmation
);
Console.WriteLine( "Job
has been created sucessfully. Guid: " + jobGuid );
do
{
//Receiving
current status
JobStatus
status = jobs.GetJobStatus( jobGuid );
//Anlysing
status
if(
status.ProcessingStage != ProcessingStage.Processed && status.ProcessingStage
!= ProcessingStage.Failed )
{
Console.WriteLine( "Current
status: " + status.ProcessingStage + ". Pin: " +
status.PIN );
Thread.Sleep(
TimeSpan.FromSeconds( 15 ));
continue;
}
else
{
if(
status.ProcessingStage == ProcessingStage.Processed )
Console.WriteLine( "Final
status: " + status.ProcessingStage + " Result = " +
status.ConfirmationResult );
else
Console.WriteLine( "Final
status: " + status.ProcessingStage );
break;
}
}
while( true );
Console.WriteLine( "Sample
completed." );
Console.ReadLine();
}
}
}
|
|
|