o
    lWiI                     @   sz   d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZmZ e e jd	ZG d
d dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions),ConversationInitiationClientDataRequestInput)SipTrunkOutboundCallResponse   )AsyncRawSipTrunkClientRawSipTrunkClient.c                   @   b   e Zd ZdefddZedefddZeddd	e	d
e	de	de
je de
je defddZdS )SipTrunkClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   q/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/conversational_ai/sip_trunk/client.py__init__      zSipTrunkClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSipTrunkClient
        r   r   r   r   r   with_raw_response      	z SipTrunkClient.with_raw_responseN#conversation_initiation_client_datarequest_optionsagent_idagent_phone_number_id	to_numberr   r   c                C   s   | j j|||||d}|jS )aI  
        Handle an outbound call via SIP trunk

        Parameters
        ----------
        agent_id : str

        agent_phone_number_id : str

        to_number : str

        conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        SipTrunkOutboundCallResponse
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.sip_trunk.outbound_call(
            agent_id="agent_id",
            agent_phone_number_id="agent_phone_number_id",
            to_number="to_number",
        )
        r    r!   r"   r   r   r   outbound_calldatar   r    r!   r"   r   r   	_responser   r   r   r%      s   +zSipTrunkClient.outbound_call)__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalr   r   r   r%   r   r   r   r   r      &    r   c                   @   r   )AsyncSipTrunkClientr   c                C   r   r   )r	   r   r   r   r   r   r   T   r   zAsyncSipTrunkClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSipTrunkClient
        r   r   r   r   r   r   W   r   z%AsyncSipTrunkClient.with_raw_responseNr   r    r!   r"   r   r   c                   s$   | j j|||||dI dH }|jS )a  
        Handle an outbound call via SIP trunk

        Parameters
        ----------
        agent_id : str

        agent_phone_number_id : str

        to_number : str

        conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        SipTrunkOutboundCallResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.sip_trunk.outbound_call(
                agent_id="agent_id",
                agent_phone_number_id="agent_phone_number_id",
                to_number="to_number",
            )


        asyncio.run(main())
        r#   Nr$   r'   r   r   r   r%   b   s   3z!AsyncSipTrunkClient.outbound_call)r)   r*   r+   r   r   r,   r	   r   r-   r.   r/   r0   r   r   r   r%   r   r   r   r   r2   S   r1   r2   )r/   core.client_wrapperr   r   core.request_optionsr   7types.conversation_initiation_client_data_request_inputr   &types.sip_trunk_outbound_call_responser   
raw_clientr	   r
   castAnyr-   r   r2   r   r   r   r   <module>   s   D