Asterisk Component

Table of Contents

URI format
Options
Action

Available as of Camel 2.18

The asterisk: component allows you to work easily with an Asterisk PBX Server http://www.asterisk.org/ using asterisk-java

This component help to interface with Asterisk Manager Interface

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-asterisk</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

URI format

asterisk:name[?options]

Options

The Asterisk component has no options.

The Asterisk component supports 9 endpoint options which are listed below:

{% raw %}

NameGroupDefaultJava TypeDescription

name

common

 

String

Required Logical name

hostname

common

 

String

The hostname of the asterix server

password

common

 

String

Login password

username

common

 

String

Login username

bridgeErrorHandler

consumer

false

boolean

Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.

exceptionHandler

consumer (advanced)

 

ExceptionHandler

To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.

exchangePattern

consumer (advanced)

 

ExchangePattern

Sets the exchange pattern when the consumer creates an exchange.

action

producer

 

AsteriskActionEnum

What action to perform such as getting queue status sip peers or extension state.

synchronous

advanced

false

boolean

Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).

{% endraw %}

Action

Supported actions are:

  • QUEUE_STATUS, Queue Status
  • SIP_PEERS, List SIP Peers
  • EXTENSION_STATE, Check Extension Status