Package org.asteriskjava.manager

Examples of org.asteriskjava.manager.ManagerConnection


     * @param username the username to use for login
     * @param password the password to use for login
     */
    public DefaultAsteriskServer(String hostname, String username, String password)
    {
        final ManagerConnection connection;
        connection = createManagerConnection(hostname, 0, username, password);
        impl = new AsteriskServerImpl(connection);
    }
View Full Code Here


     * @param username the username to use for login
     * @param password the password to use for login
     */
    public DefaultAsteriskServer(String hostname, int port, String username, String password)
    {
        final ManagerConnection connection;
        connection = createManagerConnection(hostname, port, username, password);
        impl = new AsteriskServerImpl(connection);
    }
View Full Code Here

        put(connection);
    }

    ManagerResponse sendAction(ManagerAction action) throws ManagerCommunicationException
    {
        ManagerConnection connection;
        ManagerResponse response;

        connection = get();
        try
        {
            response = connection.sendAction(action);
        }
        catch (Exception e)
        {
            throw ManagerCommunicationExceptionMapper.mapSendActionException(action.getAction(), e);
        }
View Full Code Here

    }

    ResponseEvents sendEventGeneratingAction(EventGeneratingAction action, long timeout)
            throws ManagerCommunicationException
    {
        ManagerConnection connection;
        ResponseEvents responseEvents;

        connection = get();
        try
        {
            if (timeout > 0)
            {
                responseEvents = connection.sendEventGeneratingAction(action, timeout);
            }
            else
            {
                responseEvents = connection.sendEventGeneratingAction(action);
            }
        }
        catch (Exception e)
        {
            throw ManagerCommunicationExceptionMapper.mapSendActionException(action.getAction(), e);
View Full Code Here

        }
    }

    private void handleAsyncAgiEvent(AsyncAgiEvent asyncAgiEvent)
    {
        final ManagerConnection connection;
        final String channelName;
        final AsyncAgiConnectionHandler connectionHandler;

        connection = (ManagerConnection) asyncAgiEvent.getSource();
        channelName = asyncAgiEvent.getChannel();
View Full Code Here

        }
    }

    private void handleRenameEvent(RenameEvent renameEvent)
    {
        final ManagerConnection connection = (ManagerConnection) renameEvent.getSource();
        final AsyncAgiConnectionHandler connectionHandler = getConnectionHandler(connection, renameEvent.getChannel());

        if (connectionHandler == null)
        {
            return;
View Full Code Here

        channel.sayDateTime(new Date().getTime());
    }

    public static void main(String[] args) throws Exception
    {
        ManagerConnection connection;
        AsyncAgiServer agiServer;

        connection = new DefaultManagerConnection("localhost", "manager", "obelisk");
        agiServer = new AsyncAgiServer(new GetDataScript());
        connection.addEventListener(agiServer);
        connection.login();

        while (true)
        {
            Thread.sleep(1000L);
        }
View Full Code Here

     * @param username the username to use for login
     * @param password the password to use for login
     */
    public DefaultAsteriskServer(String hostname, String username, String password)
    {
        final ManagerConnection connection;
        connection = createManagerConnection(hostname, 0, username, password);
        impl = new AsteriskServerImpl(connection);
    }
View Full Code Here

     * @param username the username to use for login
     * @param password the password to use for login
     */
    public DefaultAsteriskServer(String hostname, int port, String username, String password)
    {
        final ManagerConnection connection;
        connection = createManagerConnection(hostname, port, username, password);
        impl = new AsteriskServerImpl(connection);
    }
View Full Code Here

        }
    }

    private void handleAsyncAgiEvent(AsyncAgiEvent asyncAgiEvent)
    {
        final ManagerConnection connection;
        final String channelName;
        final AsyncAgiConnectionHandler connectionHandler;

        connection = (ManagerConnection) asyncAgiEvent.getSource();
        channelName = asyncAgiEvent.getChannel();
View Full Code Here

TOP

Related Classes of org.asteriskjava.manager.ManagerConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.