C# Code for VoiceScriptCreateRequest
Comments
-
Sara
All you need to do if everything is in place is the Submit.
try
{
VoiceScriptCreate_Result = PC.VoiceScriptCreate(VoiceScriptCreate_Request);
}
catch (Exception ex)
{
System.Console.WriteLine(ex.Message);
System.Console.Read();
return;
}The VoiceScriptCreate_Request is the object you have put together.
If you provide your code I will take a look at it.
Tom
0 -
Hi Tom,
Thanks for your reply.
I put my code here please check it
void CreateVoiceScript()
{
PGIVoiceCreate.VoiceScriptCreateRequest vsc = new PGICallPreparation.PGIVoiceCreate.VoiceScriptCreateRequest();
vsc.SubmitId = "99";
vsc.ObjectStore = "ACSTesting";
vsc.ReplaceExisting = true;
PGIVoiceCreate.StoredObjectIdType so = new PGICallPreparation.PGIVoiceCreate.StoredObjectIdType();
so.objKind = "vscript";
so.ownership = PGICallPreparation.PGIVoiceCreate.StoredObjectLevelType.customer;
so.groupName = "Wellient";
so.groupNo = 1;
so.groupNoSpecified = true;
so.b64charset = "unspec";
vsc.VoiceScriptId = so;
PGIVoiceCreate.TransactionInfoType trans = new PGICallPreparation.PGIVoiceCreate.TransactionInfoType();
PGIVoiceCreate.TransactionInfoTypeTransaction[] MyTrans = new PGICallPreparation.PGIVoiceCreate.TransactionInfoTypeTransaction[1];
MyTrans[0] = new PGICallPreparation.PGIVoiceCreate.TransactionInfoTypeTransaction();
MyTrans[0].transactionID = uint.Parse("99");
MyTrans[0].TransactionName = "MyTrans1";
MyTrans[0].transactionIDSpecified = true;
PGIVoiceCreate.ExactMatchInfoType[] exact = new PGICallPreparation.PGIVoiceCreate.ExactMatchInfoType[1];
exact[0] = new PGICallPreparation.PGIVoiceCreate.ExactMatchInfoType();
PGIVoiceCreate.ExactMatchInfoTypeResponseRange eRes = new PGICallPreparation.PGIVoiceCreate.ExactMatchInfoTypeResponseRange();
eRes.InsertId = uint.Parse("123");
eRes.NumOfAttempts = uint.Parse("2");
exact[0].ResponseRange = eRes;
//PromptAttachement
PGIVoiceCreate.DocumentInfoType doc = new PGICallPreparation.PGIVoiceCreate.DocumentInfoType();
doc.DocType = "WAV";
// Setup Document - TTS Template to be used
PGIVoiceCreate.SosObjectIdType sosObject = new PGIVoiceCreate.SosObjectIdType();
sosObject.ownershipLevel = PGIVoiceCreate.OwnershipLevelType.user;
sosObject.ownershipLevelSpecified = true;
sosObject.sosType = "tts";
sosObject.Value = "tts_insert";
doc.Item = sosObject;
exact[0].PromptAttachment = doc;
//ResponseAttachment
PGIVoiceCreate.DocumentInfoType Res = new PGICallPreparation.PGIVoiceCreate.DocumentInfoType();
Res.DocType = "WAV";
PGIVoiceCreate.DocumentType ResDoc = new PGIVoiceCreate.DocumentType();
// Setup Document - TTS Template to be used
PGIVoiceCreate.SosObjectIdType ResSosObject = new PGIVoiceCreate.SosObjectIdType();
ResSosObject.ownershipLevel = PGIVoiceCreate.OwnershipLevelType.user;
ResSosObject.ownershipLevelSpecified = true;
ResSosObject.sosType = "tts";
ResSosObject.Value = "tts_insert1";
Res.Item = ResSosObject;
exact[0].ResponseAttachment = Res;
MyTrans[0].Item = exact[0];
trans.Transaction = MyTrans;
vsc.TransactionInfo = trans;
PGIVoiceCreate.XOA pc = new PGICallPreparation.PGIVoiceCreate.XOA();
PGIVoiceCreate.Authentication PCAuthentication = new PGIVoiceCreate.Authentication();
PGIVoiceCreate.XDDSAuthType XDDSAuth = new PGIVoiceCreate.XDDSAuthType();
// init Authentication objects
XDDSAuth.Password = "Password";
XDDSAuth.RequesterID = "UserID";
PCAuthentication.XDDSAuth = XDDSAuth;
PGIVoiceCreate.Request req = new PGICallPreparation.PGIVoiceCreate.Request();
PGIVoiceCreate.Response Response = new PGIVoiceCreate.Response();
pc.Url = "http://xoa.pt.premiereglobal.com/soap/sync";
req.ReceiverKey = "http://xoa.pt.premiereglobal.com/soap/sync";
req.Authentication = PCAuthentication;
req.ResultRequired = PGIVoiceCreate.RequiredType.yes;
req.ResponseRequiredSpecified = true;
pc.RequestValue = req;
pc.ResponseValue = Response;
PGIVoiceCreate.VoiceScriptCreateResult result = pc.VoiceScriptCreate(vsc);
if (result != null)
{
if (result.Status != null)
{
lblResponse.Text = result.Status.StatusCode + ":" + result.Status.StatusMessage;
}
}
else
{
MessageBox.Show("Failiure to create voice script");
}
}I have written this code using the VoiceScriptCreate API Manual.
Regars
Sara0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax