All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.asteriskjava.pbx.CallDirection Maven / Gradle / Ivy

There is a newer version: 3.41.0
Show newest version
package org.asteriskjava.pbx;

/**
 * Describes the direction of the call.
 * 
 * @author bsutton
 */
public enum CallDirection
{
    /**
     * INBOUND - call
     */
    INBOUND(0),
    /**
     * OUTBOUND - call.
     */
    OUTBOUND(1);
    // /**
    // * JOIN - call was created by joining two existing calls
    // */
    // JOIN(2),
    //
    // /**
    // * Often temporary channels are brought up for actions such as parking a
    // * call. These calls don't really have a direction in their own right.
    // *
    // * TODO: is this really need, should the originating call be the
    // controlling
    // * entity. The problem is that currently we really track 'channels' rather
    // * than Calls.
    // */
    // TRANSIENT(3);

    private final int dbValue;

    CallDirection(final int dbValue)
    {
        this.dbValue = dbValue;
    }

    public static CallDirection valueOf(final int dbValue)
    {
        CallDirection result = null;

        for (final CallDirection direction : CallDirection.values())
        {
            if (direction.dbValue == dbValue)
            {
                result = direction;
                break;
            }
        }
        return result;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy