# -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.

from alibabacloud_ccc20170705.client import Client as CCC20170705Client
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_ccc20170705 import models as ccc20170705_models


class Sample:
    def __init__(self):
        pass

    @staticmethod
    def create_client(
        access_key_id: str,
        access_key_secret: str,
    ) -> CCC20170705Client:
        """
        使用AK&SK初始化账号Client
        @param access_key_id:
        @param access_key_secret:
        @return: Client
        @throws Exception
        """
        config = open_api_models.Config(
            # 您的AccessKey ID,
            access_key_id=access_key_id,
            # 您的AccessKey Secret,
            access_key_secret=access_key_secret)
        # 访问的域名
        config.endpoint = 'ccc.cn-shanghai.aliyuncs.com'
        return CCC20170705Client(config)

    @staticmethod
    def main(args: str, ) -> None:
        client = Sample.create_client('LTAI4GFPk6uubhM384Frznyy',
                                      'xi7wcoibNoHW9bkHAVMOZ9z4vTnEpT')
        dial_ex_request = ccc20170705_models.DialExRequest(
            instance_id='0fa543c2-28d7-43be-a746-3d9f828669bb',
            caller='089836690281',
            callee='{}'.format(args),
            answer_mode=0,
            rout_point='Kl8X_2H9royG')
        # 复制代码运行请自行打印 API 的返回值
        client.dial_ex(dial_ex_request)

    @staticmethod
    async def main_async(args: str, ) -> None:
        client = Sample.create_client('LTAI4GFPk6uubhM384Frznyy',
                                      'xi7wcoibNoHW9bkHAVMOZ9z4vTnEpT')
        dial_ex_request = ccc20170705_models.DialExRequest(
            instance_id='0fa543c2-28d7-43be-a746-3d9f828669bb',
            caller='089836690281',
            callee='17343184154',
            answer_mode=0,
            rout_point='Kl8X_2H9royG')
        # 复制代码运行请自行打印 API 的返回值
        await client.dial_ex_async(dial_ex_request)


if __name__ == '__main__':
    for phone in ["18378941573", "13757877578"]:
        Sample.main(phone)
