Class AsteriskOriginator


  • public class AsteriskOriginator
    extends Object
    Originates a call using the Asterisk Manager API
    Version:
    $Id: $
    Author:
    Jeff Gehlbach
    • Method Detail

      • buildOriginateAction

        public org.asteriskjava.manager.action.OriginateAction buildOriginateAction()
                                                                             throws AsteriskOriginatorException
        Build a complete OriginateAction ready for dispatching.
        Returns:
        completed OriginateAction, ready to be passed to ManagerConnection.sendAction
        Throws:
        AsteriskOriginatorException - if any of the underlying operations fail
      • getCallerId

        public String getCallerId()

        getCallerId

        Returns:
        Returns the Caller ID
      • setCallerId

        public void setCallerId​(String cid)

        setCallerId

        Parameters:
        cid - The from address to set.
      • getAmiHost

        public String getAmiHost()

        getAmiHost

        Returns:
        Returns the AMI host.
      • getMessageText

        public String getMessageText()

        getMessageText

        Returns:
        Returns the message text.
      • setMessageText

        public void setMessageText​(String messageText)

        setMessageText

        Parameters:
        messageText - Sets the message text.
      • getSubject

        public String getSubject()

        getSubject

        Returns:
        Returns the message Subject.
      • setSubject

        public void setSubject​(String subject)

        setSubject

        Parameters:
        subject - Sets the message Subject.
      • getLegAExtension

        public String getLegAExtension()

        getLegAExtension

        Returns:
        Returns the extension for Leg A
      • setLegAExtension

        public void setLegAExtension​(String exten)

        setLegAExtension

        Parameters:
        exten - Sets the extension for Leg A
      • getLegAChannel

        public String getLegAChannel()

        getLegAChannel

        Returns:
        Returns the channel for Leg A
      • setLegAChannel

        public void setLegAChannel​(String chan)

        setLegAChannel

        Parameters:
        chan - Sets the channel for Leg A
      • isDebug

        public boolean isDebug()

        isDebug

        Returns:
        a boolean.
      • setDebug

        public void setDebug​(boolean debug)

        setDebug

        Parameters:
        debug - a boolean.
      • getAmiProps

        public Properties getAmiProps()
        This returns the properties configured in the asterisk-configuration.properties file.
        Returns:
        a Properties object.
      • setChannelVariable

        public void setChannelVariable​(String name,
                                       String value)
        Sets a variable on the channel used for the originated call
        Parameters:
        name - Name of variable to set
        value - Value to set for variable
      • getChannelVariables

        public Map<String,​String> getChannelVariables()
        Retrieves a Map of channel variables for the originated call
        Returns:
        A Map of channel variable names and values
      • getChannelVariable

        public String getChannelVariable​(String name)
        Retrieves a named channel variable for the originated call
        Parameters:
        name - Name of variable to retrieve
        Returns:
        Value of named variable