Explorar el Código

由峰远发起的DYVMSAPI SDK自动发布, 版本号:1.12.5

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao hace 7 años
padre
commit
e836aa26db

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2018-05-23 Version: 1.12.5
+1, This is an example of release-log.
+2, Please strictly follow this format to edit in English.
+3, Format:Number + , + Space + Description
+
 2018-05-22 Version: 1.12.4
 1, add DescribeMigrateTasks,DescribeOssDownloads,CheckRecoveryConditions.
 2, modify DescribeDBInstanceAttribute.

+ 109 - 0
services/dyvmsapi/cancel_call.go

@@ -0,0 +1,109 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CancelCall invokes the dyvmsapi.CancelCall API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/cancelcall.html
+func (client *Client) CancelCall(request *CancelCallRequest) (response *CancelCallResponse, err error) {
+	response = CreateCancelCallResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CancelCallWithChan invokes the dyvmsapi.CancelCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/cancelcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CancelCallWithChan(request *CancelCallRequest) (<-chan *CancelCallResponse, <-chan error) {
+	responseChan := make(chan *CancelCallResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CancelCall(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CancelCallWithCallback invokes the dyvmsapi.CancelCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/cancelcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CancelCallWithCallback(request *CancelCallRequest, callback func(response *CancelCallResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CancelCallResponse
+		var err error
+		defer close(result)
+		response, err = client.CancelCall(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CancelCallRequest is the request struct for api CancelCall
+type CancelCallRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CallId               string           `position:"Query" name:"CallId"`
+}
+
+// CancelCallResponse is the response struct for api CancelCall
+type CancelCallResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Status    bool   `json:"Status" xml:"Status"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateCancelCallRequest creates a request to invoke CancelCall API
+func CreateCancelCallRequest() (request *CancelCallRequest) {
+	request = &CancelCallRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "CancelCall", "", "")
+	return
+}
+
+// CreateCancelCallResponse creates a response to parse from CancelCall response
+func CreateCancelCallResponse() (response *CancelCallResponse) {
+	response = &CancelCallResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 117 - 0
services/dyvmsapi/click_to_dial.go

@@ -0,0 +1,117 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ClickToDial invokes the dyvmsapi.ClickToDial API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/clicktodial.html
+func (client *Client) ClickToDial(request *ClickToDialRequest) (response *ClickToDialResponse, err error) {
+	response = CreateClickToDialResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ClickToDialWithChan invokes the dyvmsapi.ClickToDial API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/clicktodial.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ClickToDialWithChan(request *ClickToDialRequest) (<-chan *ClickToDialResponse, <-chan error) {
+	responseChan := make(chan *ClickToDialResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ClickToDial(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ClickToDialWithCallback invokes the dyvmsapi.ClickToDial API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/clicktodial.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ClickToDialWithCallback(request *ClickToDialRequest, callback func(response *ClickToDialResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ClickToDialResponse
+		var err error
+		defer close(result)
+		response, err = client.ClickToDial(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ClickToDialRequest is the request struct for api ClickToDial
+type ClickToDialRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CallerShowNumber     string           `position:"Query" name:"CallerShowNumber"`
+	CallerNumber         string           `position:"Query" name:"CallerNumber"`
+	CalledShowNumber     string           `position:"Query" name:"CalledShowNumber"`
+	CalledNumber         string           `position:"Query" name:"CalledNumber"`
+	RecordFlag           requests.Boolean `position:"Query" name:"RecordFlag"`
+	AsrFlag              requests.Boolean `position:"Query" name:"AsrFlag"`
+	SessionTimeout       requests.Integer `position:"Query" name:"SessionTimeout"`
+	AsrModelId           string           `position:"Query" name:"AsrModelId"`
+	OutId                string           `position:"Query" name:"OutId"`
+}
+
+// ClickToDialResponse is the response struct for api ClickToDial
+type ClickToDialResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CallId    string `json:"CallId" xml:"CallId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateClickToDialRequest creates a request to invoke ClickToDial API
+func CreateClickToDialRequest() (request *ClickToDialRequest) {
+	request = &ClickToDialRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "ClickToDial", "", "")
+	return
+}
+
+// CreateClickToDialResponse creates a response to parse from ClickToDial response
+func CreateClickToDialResponse() (response *ClickToDialResponse) {
+	response = &ClickToDialResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 81 - 0
services/dyvmsapi/client.go

@@ -0,0 +1,81 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://help.aliyun.com/document_detail/66217.html
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 125 - 0
services/dyvmsapi/ivr_call.go

@@ -0,0 +1,125 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// IvrCall invokes the dyvmsapi.IvrCall API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/ivrcall.html
+func (client *Client) IvrCall(request *IvrCallRequest) (response *IvrCallResponse, err error) {
+	response = CreateIvrCallResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// IvrCallWithChan invokes the dyvmsapi.IvrCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/ivrcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) IvrCallWithChan(request *IvrCallRequest) (<-chan *IvrCallResponse, <-chan error) {
+	responseChan := make(chan *IvrCallResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.IvrCall(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// IvrCallWithCallback invokes the dyvmsapi.IvrCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/ivrcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) IvrCallWithCallback(request *IvrCallRequest, callback func(response *IvrCallResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *IvrCallResponse
+		var err error
+		defer close(result)
+		response, err = client.IvrCall(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// IvrCallRequest is the request struct for api IvrCall
+type IvrCallRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer     `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string               `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer     `position:"Query" name:"ResourceOwnerId"`
+	CalledShowNumber     string               `position:"Query" name:"CalledShowNumber"`
+	CalledNumber         string               `position:"Query" name:"CalledNumber"`
+	StartCode            string               `position:"Query" name:"StartCode"`
+	StartTtsParams       string               `position:"Query" name:"StartTtsParams"`
+	MenuKeyMap           *[]IvrCallMenuKeyMap `position:"Query" name:"MenuKeyMap"  type:"Repeated"`
+	PlayTimes            requests.Integer     `position:"Query" name:"PlayTimes"`
+	ByeCode              string               `position:"Query" name:"ByeCode"`
+	ByeTtsParams         string               `position:"Query" name:"ByeTtsParams"`
+	Timeout              requests.Integer     `position:"Query" name:"Timeout"`
+	OutId                string               `position:"Query" name:"OutId"`
+}
+
+// IvrCallMenuKeyMap is a repeated param struct in IvrCallRequest
+type IvrCallMenuKeyMap struct {
+	Key       string `name:"Key"`
+	Code      string `name:"Code"`
+	TtsParams string `name:"TtsParams"`
+}
+
+// IvrCallResponse is the response struct for api IvrCall
+type IvrCallResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CallId    string `json:"CallId" xml:"CallId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateIvrCallRequest creates a request to invoke IvrCall API
+func CreateIvrCallRequest() (request *IvrCallRequest) {
+	request = &IvrCallRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "IvrCall", "", "")
+	return
+}
+
+// CreateIvrCallResponse creates a response to parse from IvrCall response
+func CreateIvrCallResponse() (response *IvrCallResponse) {
+	response = &IvrCallResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/dyvmsapi/query_call_detail_by_call_id.go

@@ -0,0 +1,111 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryCallDetailByCallId invokes the dyvmsapi.QueryCallDetailByCallId API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/querycalldetailbycallid.html
+func (client *Client) QueryCallDetailByCallId(request *QueryCallDetailByCallIdRequest) (response *QueryCallDetailByCallIdResponse, err error) {
+	response = CreateQueryCallDetailByCallIdResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryCallDetailByCallIdWithChan invokes the dyvmsapi.QueryCallDetailByCallId API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/querycalldetailbycallid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCallDetailByCallIdWithChan(request *QueryCallDetailByCallIdRequest) (<-chan *QueryCallDetailByCallIdResponse, <-chan error) {
+	responseChan := make(chan *QueryCallDetailByCallIdResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryCallDetailByCallId(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryCallDetailByCallIdWithCallback invokes the dyvmsapi.QueryCallDetailByCallId API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/querycalldetailbycallid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCallDetailByCallIdWithCallback(request *QueryCallDetailByCallIdRequest, callback func(response *QueryCallDetailByCallIdResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryCallDetailByCallIdResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryCallDetailByCallId(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryCallDetailByCallIdRequest is the request struct for api QueryCallDetailByCallId
+type QueryCallDetailByCallIdRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CallId               string           `position:"Query" name:"CallId"`
+	ProdId               requests.Integer `position:"Query" name:"ProdId"`
+	QueryDate            requests.Integer `position:"Query" name:"QueryDate"`
+}
+
+// QueryCallDetailByCallIdResponse is the response struct for api QueryCallDetailByCallId
+type QueryCallDetailByCallIdResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Data      string `json:"Data" xml:"Data"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateQueryCallDetailByCallIdRequest creates a request to invoke QueryCallDetailByCallId API
+func CreateQueryCallDetailByCallIdRequest() (request *QueryCallDetailByCallIdRequest) {
+	request = &QueryCallDetailByCallIdRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "QueryCallDetailByCallId", "", "")
+	return
+}
+
+// CreateQueryCallDetailByCallIdResponse creates a response to parse from QueryCallDetailByCallId response
+func CreateQueryCallDetailByCallIdResponse() (response *QueryCallDetailByCallIdResponse) {
+	response = &QueryCallDetailByCallIdResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/dyvmsapi/single_call_by_tts.go

@@ -0,0 +1,116 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SingleCallByTts invokes the dyvmsapi.SingleCallByTts API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbytts.html
+func (client *Client) SingleCallByTts(request *SingleCallByTtsRequest) (response *SingleCallByTtsResponse, err error) {
+	response = CreateSingleCallByTtsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SingleCallByTtsWithChan invokes the dyvmsapi.SingleCallByTts API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbytts.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SingleCallByTtsWithChan(request *SingleCallByTtsRequest) (<-chan *SingleCallByTtsResponse, <-chan error) {
+	responseChan := make(chan *SingleCallByTtsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SingleCallByTts(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SingleCallByTtsWithCallback invokes the dyvmsapi.SingleCallByTts API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbytts.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SingleCallByTtsWithCallback(request *SingleCallByTtsRequest, callback func(response *SingleCallByTtsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SingleCallByTtsResponse
+		var err error
+		defer close(result)
+		response, err = client.SingleCallByTts(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SingleCallByTtsRequest is the request struct for api SingleCallByTts
+type SingleCallByTtsRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CalledShowNumber     string           `position:"Query" name:"CalledShowNumber"`
+	CalledNumber         string           `position:"Query" name:"CalledNumber"`
+	TtsCode              string           `position:"Query" name:"TtsCode"`
+	TtsParam             string           `position:"Query" name:"TtsParam"`
+	PlayTimes            requests.Integer `position:"Query" name:"PlayTimes"`
+	Volume               requests.Integer `position:"Query" name:"Volume"`
+	Speed                requests.Integer `position:"Query" name:"Speed"`
+	OutId                string           `position:"Query" name:"OutId"`
+}
+
+// SingleCallByTtsResponse is the response struct for api SingleCallByTts
+type SingleCallByTtsResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CallId    string `json:"CallId" xml:"CallId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateSingleCallByTtsRequest creates a request to invoke SingleCallByTts API
+func CreateSingleCallByTtsRequest() (request *SingleCallByTtsRequest) {
+	request = &SingleCallByTtsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "SingleCallByTts", "", "")
+	return
+}
+
+// CreateSingleCallByTtsResponse creates a response to parse from SingleCallByTts response
+func CreateSingleCallByTtsResponse() (response *SingleCallByTtsResponse) {
+	response = &SingleCallByTtsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 115 - 0
services/dyvmsapi/single_call_by_voice.go

@@ -0,0 +1,115 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SingleCallByVoice invokes the dyvmsapi.SingleCallByVoice API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbyvoice.html
+func (client *Client) SingleCallByVoice(request *SingleCallByVoiceRequest) (response *SingleCallByVoiceResponse, err error) {
+	response = CreateSingleCallByVoiceResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SingleCallByVoiceWithChan invokes the dyvmsapi.SingleCallByVoice API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbyvoice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SingleCallByVoiceWithChan(request *SingleCallByVoiceRequest) (<-chan *SingleCallByVoiceResponse, <-chan error) {
+	responseChan := make(chan *SingleCallByVoiceResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SingleCallByVoice(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SingleCallByVoiceWithCallback invokes the dyvmsapi.SingleCallByVoice API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/singlecallbyvoice.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SingleCallByVoiceWithCallback(request *SingleCallByVoiceRequest, callback func(response *SingleCallByVoiceResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SingleCallByVoiceResponse
+		var err error
+		defer close(result)
+		response, err = client.SingleCallByVoice(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SingleCallByVoiceRequest is the request struct for api SingleCallByVoice
+type SingleCallByVoiceRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CalledShowNumber     string           `position:"Query" name:"CalledShowNumber"`
+	CalledNumber         string           `position:"Query" name:"CalledNumber"`
+	VoiceCode            string           `position:"Query" name:"VoiceCode"`
+	PlayTimes            requests.Integer `position:"Query" name:"PlayTimes"`
+	Volume               requests.Integer `position:"Query" name:"Volume"`
+	Speed                requests.Integer `position:"Query" name:"Speed"`
+	OutId                string           `position:"Query" name:"OutId"`
+}
+
+// SingleCallByVoiceResponse is the response struct for api SingleCallByVoice
+type SingleCallByVoiceResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CallId    string `json:"CallId" xml:"CallId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateSingleCallByVoiceRequest creates a request to invoke SingleCallByVoice API
+func CreateSingleCallByVoiceRequest() (request *SingleCallByVoiceRequest) {
+	request = &SingleCallByVoiceRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "SingleCallByVoice", "", "")
+	return
+}
+
+// CreateSingleCallByVoiceResponse creates a response to parse from SingleCallByVoice response
+func CreateSingleCallByVoiceResponse() (response *SingleCallByVoiceResponse) {
+	response = &SingleCallByVoiceResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 120 - 0
services/dyvmsapi/smart_call.go

@@ -0,0 +1,120 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// SmartCall invokes the dyvmsapi.SmartCall API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/smartcall.html
+func (client *Client) SmartCall(request *SmartCallRequest) (response *SmartCallResponse, err error) {
+	response = CreateSmartCallResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SmartCallWithChan invokes the dyvmsapi.SmartCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/smartcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SmartCallWithChan(request *SmartCallRequest) (<-chan *SmartCallResponse, <-chan error) {
+	responseChan := make(chan *SmartCallResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SmartCall(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SmartCallWithCallback invokes the dyvmsapi.SmartCall API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/smartcall.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SmartCallWithCallback(request *SmartCallRequest, callback func(response *SmartCallResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SmartCallResponse
+		var err error
+		defer close(result)
+		response, err = client.SmartCall(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SmartCallRequest is the request struct for api SmartCall
+type SmartCallRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	CalledShowNumber     string           `position:"Query" name:"CalledShowNumber"`
+	CalledNumber         string           `position:"Query" name:"CalledNumber"`
+	VoiceCode            string           `position:"Query" name:"VoiceCode"`
+	RecordFlag           requests.Boolean `position:"Query" name:"RecordFlag"`
+	Volume               requests.Integer `position:"Query" name:"Volume"`
+	Speed                requests.Integer `position:"Query" name:"Speed"`
+	AsrModelId           string           `position:"Query" name:"AsrModelId"`
+	PauseTime            requests.Integer `position:"Query" name:"PauseTime"`
+	MuteTime             requests.Integer `position:"Query" name:"MuteTime"`
+	ActionCodeBreak      requests.Boolean `position:"Query" name:"ActionCodeBreak"`
+	OutId                string           `position:"Query" name:"OutId"`
+	DynamicId            string           `position:"Query" name:"DynamicId"`
+}
+
+// SmartCallResponse is the response struct for api SmartCall
+type SmartCallResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	CallId    string `json:"CallId" xml:"CallId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateSmartCallRequest creates a request to invoke SmartCall API
+func CreateSmartCallRequest() (request *SmartCallRequest) {
+	request = &SmartCallRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "SmartCall", "", "")
+	return
+}
+
+// CreateSmartCallResponse creates a response to parse from SmartCall response
+func CreateSmartCallResponse() (response *SmartCallResponse) {
+	response = &SmartCallResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/dyvmsapi/voip_add_account.go

@@ -0,0 +1,109 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// VoipAddAccount invokes the dyvmsapi.VoipAddAccount API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipaddaccount.html
+func (client *Client) VoipAddAccount(request *VoipAddAccountRequest) (response *VoipAddAccountResponse, err error) {
+	response = CreateVoipAddAccountResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// VoipAddAccountWithChan invokes the dyvmsapi.VoipAddAccount API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipaddaccount.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) VoipAddAccountWithChan(request *VoipAddAccountRequest) (<-chan *VoipAddAccountResponse, <-chan error) {
+	responseChan := make(chan *VoipAddAccountResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.VoipAddAccount(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// VoipAddAccountWithCallback invokes the dyvmsapi.VoipAddAccount API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipaddaccount.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) VoipAddAccountWithCallback(request *VoipAddAccountRequest, callback func(response *VoipAddAccountResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *VoipAddAccountResponse
+		var err error
+		defer close(result)
+		response, err = client.VoipAddAccount(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// VoipAddAccountRequest is the request struct for api VoipAddAccount
+type VoipAddAccountRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	DeviceId             string           `position:"Query" name:"DeviceId"`
+}
+
+// VoipAddAccountResponse is the response struct for api VoipAddAccount
+type VoipAddAccountResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Module    string `json:"Module" xml:"Module"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateVoipAddAccountRequest creates a request to invoke VoipAddAccount API
+func CreateVoipAddAccountRequest() (request *VoipAddAccountRequest) {
+	request = &VoipAddAccountRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "VoipAddAccount", "", "")
+	return
+}
+
+// CreateVoipAddAccountResponse creates a response to parse from VoipAddAccount response
+func CreateVoipAddAccountResponse() (response *VoipAddAccountResponse) {
+	response = &VoipAddAccountResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/dyvmsapi/voip_get_token.go

@@ -0,0 +1,110 @@
+package dyvmsapi
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// VoipGetToken invokes the dyvmsapi.VoipGetToken API synchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipgettoken.html
+func (client *Client) VoipGetToken(request *VoipGetTokenRequest) (response *VoipGetTokenResponse, err error) {
+	response = CreateVoipGetTokenResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// VoipGetTokenWithChan invokes the dyvmsapi.VoipGetToken API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipgettoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) VoipGetTokenWithChan(request *VoipGetTokenRequest) (<-chan *VoipGetTokenResponse, <-chan error) {
+	responseChan := make(chan *VoipGetTokenResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.VoipGetToken(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// VoipGetTokenWithCallback invokes the dyvmsapi.VoipGetToken API asynchronously
+// api document: https://help.aliyun.com/api/dyvmsapi/voipgettoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) VoipGetTokenWithCallback(request *VoipGetTokenRequest, callback func(response *VoipGetTokenResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *VoipGetTokenResponse
+		var err error
+		defer close(result)
+		response, err = client.VoipGetToken(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// VoipGetTokenRequest is the request struct for api VoipGetToken
+type VoipGetTokenRequest struct {
+	*requests.RpcRequest
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	VoipId               string           `position:"Query" name:"VoipId"`
+	DeviceId             string           `position:"Query" name:"DeviceId"`
+}
+
+// VoipGetTokenResponse is the response struct for api VoipGetToken
+type VoipGetTokenResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Module    string `json:"Module" xml:"Module"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateVoipGetTokenRequest creates a request to invoke VoipGetToken API
+func CreateVoipGetTokenRequest() (request *VoipGetTokenRequest) {
+	request = &VoipGetTokenRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Dyvmsapi", "2017-05-25", "VoipGetToken", "", "")
+	return
+}
+
+// CreateVoipGetTokenResponse creates a response to parse from VoipGetToken response
+func CreateVoipGetTokenResponse() (response *VoipGetTokenResponse) {
+	response = &VoipGetTokenResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}