|
@@ -26,14 +26,9 @@ Stefan-Cristian Mititelu
|
|
3. Parameters
|
|
3. Parameters
|
|
|
|
|
|
3.1. url (string)
|
|
3.1. url (string)
|
|
- 3.2. username (string)
|
|
|
|
- 3.3. password (string)
|
|
|
|
- 3.4. host (string)
|
|
|
|
- 3.5. vhost (string)
|
|
|
|
- 3.6. port (int)
|
|
|
|
- 3.7. timeout_sec (int)
|
|
|
|
- 3.8. timeout_usec (int)
|
|
|
|
- 3.9. direct_reply_to (int)
|
|
|
|
|
|
+ 3.2. timeout_sec (int)
|
|
|
|
+ 3.3. timeout_usec (int)
|
|
|
|
+ 3.4. direct_reply_to (int)
|
|
|
|
|
|
4. Functions
|
|
4. Functions
|
|
|
|
|
|
@@ -46,16 +41,11 @@ Stefan-Cristian Mititelu
|
|
List of Examples
|
|
List of Examples
|
|
|
|
|
|
1.1. Set the “url” parameter
|
|
1.1. Set the “url” parameter
|
|
- 1.2. Set the “username” parameter
|
|
|
|
- 1.3. Set the “password” parameter
|
|
|
|
- 1.4. Set the “host” parameter
|
|
|
|
- 1.5. Set the “vhost” parameter
|
|
|
|
- 1.6. Set the “port” parameter
|
|
|
|
- 1.7. Set the “timeout_sec” parameter
|
|
|
|
- 1.8. Set the “timeout_usec” parameter
|
|
|
|
- 1.9. Set the “direct_reply_to” parameter
|
|
|
|
- 1.10. rabbitmq_publish usage
|
|
|
|
- 1.11. rabbitmq_publish_consume usage
|
|
|
|
|
|
+ 1.2. Set the “timeout_sec” parameter
|
|
|
|
+ 1.3. Set the “timeout_usec” parameter
|
|
|
|
+ 1.4. Set the “direct_reply_to” parameter
|
|
|
|
+ 1.5. rabbitmq_publish usage
|
|
|
|
+ 1.6. rabbitmq_publish_consume usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
Chapter 1. Admin Guide
|
|
|
|
|
|
@@ -70,14 +60,9 @@ Chapter 1. Admin Guide
|
|
3. Parameters
|
|
3. Parameters
|
|
|
|
|
|
3.1. url (string)
|
|
3.1. url (string)
|
|
- 3.2. username (string)
|
|
|
|
- 3.3. password (string)
|
|
|
|
- 3.4. host (string)
|
|
|
|
- 3.5. vhost (string)
|
|
|
|
- 3.6. port (int)
|
|
|
|
- 3.7. timeout_sec (int)
|
|
|
|
- 3.8. timeout_usec (int)
|
|
|
|
- 3.9. direct_reply_to (int)
|
|
|
|
|
|
+ 3.2. timeout_sec (int)
|
|
|
|
+ 3.3. timeout_usec (int)
|
|
|
|
+ 3.4. direct_reply_to (int)
|
|
|
|
|
|
4. Functions
|
|
4. Functions
|
|
|
|
|
|
@@ -118,20 +103,13 @@ Chapter 1. Admin Guide
|
|
3. Parameters
|
|
3. Parameters
|
|
|
|
|
|
3.1. url (string)
|
|
3.1. url (string)
|
|
- 3.2. username (string)
|
|
|
|
- 3.3. password (string)
|
|
|
|
- 3.4. host (string)
|
|
|
|
- 3.5. vhost (string)
|
|
|
|
- 3.6. port (int)
|
|
|
|
- 3.7. timeout_sec (int)
|
|
|
|
- 3.8. timeout_usec (int)
|
|
|
|
- 3.9. direct_reply_to (int)
|
|
|
|
|
|
+ 3.2. timeout_sec (int)
|
|
|
|
+ 3.3. timeout_usec (int)
|
|
|
|
+ 3.4. direct_reply_to (int)
|
|
|
|
|
|
3.1. url (string)
|
|
3.1. url (string)
|
|
|
|
|
|
- The amqp connection url. If set to something else than the default
|
|
|
|
- value, it will overwrite the values of all connection parameters below
|
|
|
|
- (e.g. username, password, host, vhost, port)
|
|
|
|
|
|
+ The amqp connection url.
|
|
|
|
|
|
Default value is “amqp://guest:guest@localhost:5672/%2F”.
|
|
Default value is “amqp://guest:guest@localhost:5672/%2F”.
|
|
|
|
|
|
@@ -141,62 +119,7 @@ modparam("rabbitmq", "url", "amqp://kamailio:kamailio@localhost:5672/%2Fkamailio
|
|
")
|
|
")
|
|
...
|
|
...
|
|
|
|
|
|
-3.2. username (string)
|
|
|
|
-
|
|
|
|
- The user name of amqp connection.
|
|
|
|
-
|
|
|
|
- Default value is “"guest"”.
|
|
|
|
-
|
|
|
|
- Example 1.2. Set the “username” parameter
|
|
|
|
-...
|
|
|
|
-modparam("rabbitmq", "username", "user")
|
|
|
|
-...
|
|
|
|
-
|
|
|
|
-3.3. password (string)
|
|
|
|
-
|
|
|
|
- The password of amqp connection.
|
|
|
|
-
|
|
|
|
- Default value is “"guest"”.
|
|
|
|
-
|
|
|
|
- Example 1.3. Set the “password” parameter
|
|
|
|
-...
|
|
|
|
-modparam("rabbitmq", "password", "pass")
|
|
|
|
-...
|
|
|
|
-
|
|
|
|
-3.4. host (string)
|
|
|
|
-
|
|
|
|
- The host of amqp connection.
|
|
|
|
-
|
|
|
|
- Default value is “"localhost"”.
|
|
|
|
-
|
|
|
|
- Example 1.4. Set the “host” parameter
|
|
|
|
-...
|
|
|
|
-modparam("rabbitmq", "host", "127.0.0.1")
|
|
|
|
-...
|
|
|
|
-
|
|
|
|
-3.5. vhost (string)
|
|
|
|
-
|
|
|
|
- The vhost of the amqp connection.
|
|
|
|
-
|
|
|
|
- Default value is “"/"”.
|
|
|
|
-
|
|
|
|
- Example 1.5. Set the “vhost” parameter
|
|
|
|
-...
|
|
|
|
-modparam("rabbitmq", "vhost", "/vhost")
|
|
|
|
-...
|
|
|
|
-
|
|
|
|
-3.6. port (int)
|
|
|
|
-
|
|
|
|
- The port of the amqp connection.
|
|
|
|
-
|
|
|
|
- Default value is “5672”.
|
|
|
|
-
|
|
|
|
- Example 1.6. Set the “port” parameter
|
|
|
|
-...
|
|
|
|
-modparam("rabbitmq", "port", 5672)
|
|
|
|
-...
|
|
|
|
-
|
|
|
|
-3.7. timeout_sec (int)
|
|
|
|
|
|
+3.2. timeout_sec (int)
|
|
|
|
|
|
The timeout in seconds. The timeout_sec + timeout_usec combination
|
|
The timeout in seconds. The timeout_sec + timeout_usec combination
|
|
gives the time to wait for an amqp reply, when
|
|
gives the time to wait for an amqp reply, when
|
|
@@ -204,12 +127,12 @@ modparam("rabbitmq", "port", 5672)
|
|
|
|
|
|
Default value is “1”.
|
|
Default value is “1”.
|
|
|
|
|
|
- Example 1.7. Set the “timeout_sec” parameter
|
|
|
|
|
|
+ Example 1.2. Set the “timeout_sec” parameter
|
|
...
|
|
...
|
|
modparam("rabbitmq", "timeout_sec", 1)
|
|
modparam("rabbitmq", "timeout_sec", 1)
|
|
...
|
|
...
|
|
|
|
|
|
-3.8. timeout_usec (int)
|
|
|
|
|
|
+3.3. timeout_usec (int)
|
|
|
|
|
|
The timeout in micro seconds. The timeout_sec + timeout_usec
|
|
The timeout in micro seconds. The timeout_sec + timeout_usec
|
|
combination gives the time to wait for an amqp reply, when
|
|
combination gives the time to wait for an amqp reply, when
|
|
@@ -217,12 +140,12 @@ modparam("rabbitmq", "timeout_sec", 1)
|
|
|
|
|
|
Default value is “0”.
|
|
Default value is “0”.
|
|
|
|
|
|
- Example 1.8. Set the “timeout_usec” parameter
|
|
|
|
|
|
+ Example 1.3. Set the “timeout_usec” parameter
|
|
...
|
|
...
|
|
modparam("rabbitmq", "timeout_usec", 0)
|
|
modparam("rabbitmq", "timeout_usec", 0)
|
|
...
|
|
...
|
|
|
|
|
|
-3.9. direct_reply_to (int)
|
|
|
|
|
|
+3.4. direct_reply_to (int)
|
|
|
|
|
|
Setting this parameter to 1, enables rabbitmq direct reply-to feature.
|
|
Setting this parameter to 1, enables rabbitmq direct reply-to feature.
|
|
More info about this, can be found at
|
|
More info about this, can be found at
|
|
@@ -230,7 +153,7 @@ modparam("rabbitmq", "timeout_usec", 0)
|
|
|
|
|
|
Default value is “0”.
|
|
Default value is “0”.
|
|
|
|
|
|
- Example 1.9. Set the “direct_reply_to” parameter
|
|
|
|
|
|
+ Example 1.4. Set the “direct_reply_to” parameter
|
|
...
|
|
...
|
|
modparam("rabbitmq", "direct_reply_to", 1)
|
|
modparam("rabbitmq", "direct_reply_to", 1)
|
|
...
|
|
...
|
|
@@ -254,7 +177,7 @@ modparam("rabbitmq", "direct_reply_to", 1)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.10. rabbitmq_publish usage
|
|
|
|
|
|
+ Example 1.5. rabbitmq_publish usage
|
|
rabbitmq_publish("exchange", "routing_key", "application/json", "$avp(json_reque
|
|
rabbitmq_publish("exchange", "routing_key", "application/json", "$avp(json_reque
|
|
st)");
|
|
st)");
|
|
|
|
|
|
@@ -274,6 +197,6 @@ messagebody, reply)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.11. rabbitmq_publish_consume usage
|
|
|
|
|
|
+ Example 1.6. rabbitmq_publish_consume usage
|
|
rabbitmq_publish_consume("exchange", "routing_key", "application/json", "$avp(js
|
|
rabbitmq_publish_consume("exchange", "routing_key", "application/json", "$avp(js
|
|
on_request)", "$avp(json_reply)");
|
|
on_request)", "$avp(json_reply)");
|