mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 23:08:35 +00:00
Adding mod_amqp as an event_handler module
AMQP(Advanced Message Queueing Protocol) is an event bus protocol with more info here http://www.amqp.org/about/what mod_amqp implements the client side of the amqp protocol. Currently the module supports two separate, but not mutually exclusive usages: 1. Sending a filtered whitelist of events to an AMQP server. The before the events are sent an amqp routing header is generated so that downstream subscriptions can subscribe using filters. If the connection to the remote server is interrupted, the module will attempt to reconnect. 2. Subscribing to a 'control' channel on the remote AMQP server. When events are received on this channel if they match a configured filter, the commands are run locally as api commands. If the filter for the events being sent to the remote AMQP server include SWITCH_EVENT_API then the results of the api commands will be sent back to the AMQP server. FS-7060 #resolve Thanks-to: Daniel Bryars <danb@aeriandi.com> and Tim Brown <tim.brown@aeriandi.com>
This commit is contained in:
1 parent
c6ef0558ff
commit
1a96f23f27
11 files changed
+1701
No files matched your search
@@ -0,0 +1,56 @@
|
||||
<configuration name="amqp.conf" description="mod_amqp">
|
||||
<producers>
|
||||
<profile name="default">
|
||||
<connections>
|
||||
<connection name="primary">
|
||||
<param name="hostname" value="localhost"/>
|
||||
<param name="virtualhost" value="/"/>
|
||||
<param name="username" value="guest"/>
|
||||
<param name="password" value="guest"/>
|
||||
<param name="port" value="5673"/>
|
||||
<param name="heartbeat" value="0"/>
|
||||
</connection>
|
||||
<connection name="secondary">
|
||||
<param name="hostname" value="localhost"/>
|
||||
<param name="virtualhost" value="/"/>
|
||||
<param name="username" value="guest"/>
|
||||
<param name="password" value="guest"/>
|
||||
<param name="port" value="5672"/>
|
||||
<param name="heartbeat" value="0"/>
|
||||
</connection>
|
||||
</connections>
|
||||
<params>
|
||||
<param name="exchange" value="TAP.Events"/>
|
||||
<param name="exchange_type" value="topic"/>
|
||||
<param name="circuit_breaker_ms" value="10000"/>
|
||||
<param name="reconnect_interval_ms" value="1000"/>
|
||||
<param name="send_queue_size" value="5000"/>
|
||||
|
||||
<!-- The routing key is made from the format string, using the header values in the event specified in the format_fields.-->
|
||||
<!-- Fields that are prefixed with a # are treated as literals rather than doing a header lookup -->
|
||||
<param name="format_fields" value="#FreeSWITCH,FreeSWITCH-Hostname,Event-Name,Event-Subclass,Unique-ID"/>
|
||||
|
||||
<!-- <param name="eventFilter" value="SWITCH_EVENT_ALL"/> -->
|
||||
<param name="event_filter" value="SWITCH_EVENT_CHANNEL_CREATE,SWITCH_EVENT_CHANNEL_DESTROY,SWITCH_EVENT_HEARTBEAT,SWITCH_EVENT_DTMF"/>
|
||||
</params>
|
||||
</profile>
|
||||
</producers>
|
||||
<commands>
|
||||
<profile name="default">
|
||||
<connections>
|
||||
<connection name="primary">
|
||||
<param name="hostname" value="localhost"/>
|
||||
<param name="virtualhost" value="/"/>
|
||||
<param name="username" value="guest"/>
|
||||
<param name="password" value="guest"/>
|
||||
<param name="port" value="5672"/>
|
||||
<param name="heartbeat" value="0"/>
|
||||
</connection>
|
||||
</connections>
|
||||
<params>
|
||||
<param name="eventExchange" value="TAP.Events"/>
|
||||
<param name="eventExchangetype" value="topic"/>
|
||||
</params>
|
||||
</profile>
|
||||
</commands>
|
||||
</configuration>
|
||||
Reference in new issue
Block a user